pkg,plugins: update for Result struct Interface index changes

It's a pointer now, so we need to use the helper function to set
the field and also test for nil before accessing it.
This commit is contained in:
Dan Williams
2017-06-22 13:24:56 -05:00
parent 121362601b
commit 0da6780449
12 changed files with 107 additions and 27 deletions

View File

@ -100,7 +100,7 @@ func calcGateways(result *current.Result, n *NetConf) (*gwInfo, *gwInfo, error)
defaultNet.Mask = net.IPMask(defaultNet.IP)
// All IPs currently refer to the container interface
ipc.Interface = 2
ipc.Interface = current.Int(2)
// If not provided, calculate the gateway address corresponding
// to the selected IP address