In L3 modes, the ipvlan driver can't set up a default gateway with
a next hop address, because there's no L2 for it to resolve the
gateway IP into a MAC address.
Instead, it sets up a route to 0.0.0.0 or [::] that's connected to
the network's interface. The end result is the same - the container
has a default route.
So, don't set up routes to 0.0.0.0/:: when applying routes when an
endpoint joins a sandbox, set them up when the endpoint is selected
as the container's gateway. And, drop those routes when another
endpoint becomes the gateway.
Signed-off-by: Rob Murray <rob.murray@docker.com>
Libnetwork provides a native Go implementation for connecting containers
The goal of libnetwork is to deliver a robust Container Network Model that provides a consistent programming interface and the required network abstractions for applications.
There are many networking solutions available to suit a broad range of use-cases. libnetwork uses a driver / plugin model to support all of these solutions while abstracting the complexity of the driver implementations by exposing a simple and consistent Network Model to users.