mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Merge pull request #11495 from sunyuan3/m3
correct comment errors for netlink_linux.go
This commit is contained in:
commit
70092e5ebb
1 changed files with 2 additions and 2 deletions
|
@ -659,7 +659,7 @@ func networkSetNsAction(iface *net.Interface, rtattr *RtAttr) error {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Move a particular network interface to a particular network namespace
|
// Move a particular network interface to a particular network namespace
|
||||||
// specified by PID. This is idential to running: ip link set dev $name netns $pid
|
// specified by PID. This is identical to running: ip link set dev $name netns $pid
|
||||||
func NetworkSetNsPid(iface *net.Interface, nspid int) error {
|
func NetworkSetNsPid(iface *net.Interface, nspid int) error {
|
||||||
data := uint32Attr(syscall.IFLA_NET_NS_PID, uint32(nspid))
|
data := uint32Attr(syscall.IFLA_NET_NS_PID, uint32(nspid))
|
||||||
return networkSetNsAction(iface, data)
|
return networkSetNsAction(iface, data)
|
||||||
|
@ -673,7 +673,7 @@ func NetworkSetNsFd(iface *net.Interface, fd int) error {
|
||||||
return networkSetNsAction(iface, data)
|
return networkSetNsAction(iface, data)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Rname a particular interface to a different name
|
// Rename a particular interface to a different name
|
||||||
// !!! Note that you can't rename an active interface. You need to bring it down before renaming it.
|
// !!! Note that you can't rename an active interface. You need to bring it down before renaming it.
|
||||||
// This is identical to running: ip link set dev ${oldName} name ${newName}
|
// This is identical to running: ip link set dev ${oldName} name ${newName}
|
||||||
func NetworkChangeName(iface *net.Interface, newName string) error {
|
func NetworkChangeName(iface *net.Interface, newName string) error {
|
||||||
|
|
Loading…
Add table
Reference in a new issue