diff --git a/libnetwork/drivers/bridge/bridge_test.go b/libnetwork/drivers/bridge/bridge_test.go index aba46977e6..6597ca1b96 100644 --- a/libnetwork/drivers/bridge/bridge_test.go +++ b/libnetwork/drivers/bridge/bridge_test.go @@ -159,7 +159,7 @@ func (te *testEndpoint) SetResolvConfPath(path string) error { } func (te *testEndpoint) AddStaticRoute(destination *net.IPNet, routeType int, nextHop net.IP, interfaceID int) error { - te.routes = append(te.routes, types.StaticRoute{destination, routeType, nextHop, interfaceID}) + te.routes = append(te.routes, types.StaticRoute{Destination: destination, RouteType: routeType, NextHop: nextHop, InterfaceID: interfaceID}) return nil } diff --git a/libnetwork/endpoint_info.go b/libnetwork/endpoint_info.go index 1c7a85cce6..bd989f291b 100644 --- a/libnetwork/endpoint_info.go +++ b/libnetwork/endpoint_info.go @@ -155,7 +155,7 @@ func (ep *endpoint) AddStaticRoute(destination *net.IPNet, routeType int, nextHo ep.Lock() defer ep.Unlock() - r := types.StaticRoute{destination, routeType, nextHop, interfaceID} + r := types.StaticRoute{Destination: destination, RouteType: routeType, NextHop: nextHop, InterfaceID: interfaceID} if routeType == types.NEXTHOP { // If the route specifies a next-hop, then it's loosely routed (i.e. not bound to a particular interface).