mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Rename setGatewayIP() in sandbox pkg
- setGatewayIP() => programGateway() becsause it is causing confusion with setGateway() and setGatewayIPv6() Signed-off-by: Alessandro Boch <aboch@docker.com>
This commit is contained in:
parent
293cf1b4db
commit
21ed154c79
2 changed files with 3 additions and 3 deletions
|
@ -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()
|
||||
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue