mirror of
https://github.com/moby/moby.git
synced 2026-07-13 11:00:42 +00:00
A gateway address is always reserved before the network driver is asked to create the network. But, the driver doesn't always need a gateway address, so the address reservation can be unnecessary. This means, for example, an "--internal" IPv4 "/31" network cannot be used as a point-to-point link, because one of its two addresses is always reserved for a gateway. So, before allocating a gateway address, ask the network driver if it will need one (based on options that only the network driver can interpret). Implement that as an optional interface for network drivers. Signed-off-by: Rob Murray <rob.murray@docker.com>