mirror of
https://github.com/vishvananda/netlink
synced 2024-12-18 21:04:56 +00:00
Create LinkSetNoMaster function
This commit is contained in:
parent
a57a12c1b1
commit
2f58676854
@ -136,6 +136,12 @@ func LinkSetMaster(link Link, master *Bridge) error {
|
||||
return LinkSetMasterByIndex(link, index)
|
||||
}
|
||||
|
||||
// LinkSetNoMaster removes the master of the link device.
|
||||
// Equivalent to: `ip link set $link nomaster`
|
||||
func LinkSetNoMaster(link Link) error {
|
||||
return LinkSetMasterByIndex(link, 0)
|
||||
}
|
||||
|
||||
// LinkSetMasterByIndex sets the master of the link device.
|
||||
// Equivalent to: `ip link set $link master $master`
|
||||
func LinkSetMasterByIndex(link Link, masterIndex int) error {
|
||||
|
Loading…
Reference in New Issue
Block a user