Properly uses default-route in annotation to set the gateway. Fixes network status results.

This commit is contained in:
dougbtv
2019-10-23 11:40:44 -04:00
committed by Doug Smith
parent 165e23b72c
commit 3a9dd7ed76
5 changed files with 99 additions and 9 deletions

View File

@@ -204,7 +204,6 @@ func LoadNetworkStatus(r types.Result, netName string, defaultNet bool) (*Networ
logging.Debugf("LoadNetworkStatus: %v, %s, %t", r, netName, defaultNet)
netstatus := &NetworkStatus{}
netstatus.Name = netName
netstatus.Default = defaultNet
// Convert whatever the IPAM result was into the current Result type
result, err := current.NewResultFromResult(r)

View File

@@ -86,7 +86,6 @@ type NetworkStatus struct {
Interface string `json:"interface,omitempty"`
IPs []string `json:"ips,omitempty"`
Mac string `json:"mac,omitempty"`
Default bool `json:"default,omitempty"`
DNS types.DNS `json:"dns,omitempty"`
Gateway []net.IP `json:"default-route,omitempty"`
}