Selaa lähdekoodia

Merge pull request #91 from aboch/gnames

Rename setGatewayIP() in sandbox pkg
Madhu Venugopal 10 vuotta sitten
vanhempi
commit
5c442d3c76

+ 1 - 1
libnetwork/sandbox/configure_linux.go

@@ -29,7 +29,7 @@ func configureInterface(iface netlink.Link, settings *Interface) error {
 	return nil
 }
 
-func setGatewayIP(path string, gw net.IP) error {
+func programGateway(path string, gw net.IP) error {
 	runtime.LockOSThread()
 	defer runtime.UnlockOSThread()
 

+ 2 - 2
libnetwork/sandbox/namespace_linux.go

@@ -130,7 +130,7 @@ func (n *networkNamespace) AddInterface(i *Interface) error {
 }
 
 func (n *networkNamespace) SetGateway(gw net.IP) error {
-	err := setGatewayIP(n.path, gw)
+	err := programGateway(n.path, gw)
 	if err == nil {
 		n.sinfo.Gateway = gw
 	}
@@ -143,7 +143,7 @@ func (n *networkNamespace) SetGatewayIPv6(gw net.IP) error {
 		return nil
 	}
 
-	err := setGatewayIP(n.path, gw)
+	err := programGateway(n.path, gw)
 	if err == nil {
 		n.sinfo.GatewayIPv6 = gw
 	}