v0.42h: Add static-macs option for bridged vnet setup with mac flapping
This commit is contained in:
@@ -1007,6 +1007,15 @@ func setupVnetInterfaceJailSide(jail *Jail, hostepairs []string) error {
|
||||
if err != nil {
|
||||
return fmt.Errorf("Error adding member %s to %s: %v: %s\n", nic, bridge, err, out)
|
||||
}
|
||||
// Fix mac flapping and instabilities with bridged vnet network
|
||||
if gBridgeStaticMac {
|
||||
log.Debugf("Set %s as static to %s in %s address cache\n")
|
||||
cmd = fmt.Sprintf("/sbin/ifconfig %s static %s %s", bridge, nic, jsmac)
|
||||
out, err := executeCommand(cmd)
|
||||
if err != nil {
|
||||
return fmt.Errorf("Error adding member %s to %s: %v: %s\n", nic, bridge, err, out)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Check we have an IP for the nic, and set it into jail
|
||||
|
||||
Reference in New Issue
Block a user