Create LinkSetNoMaster function

This commit is contained in:
Hubert Krauze 2015-12-09 12:25:42 +01:00
parent a57a12c1b1
commit 2f58676854

View File

@ -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 {