v0.42h: finish previous commit
This commit is contained in:
parent
1006207fc2
commit
f33b3cfec4
10
cmd/start.go
10
cmd/start.go
@ -1009,11 +1009,15 @@ func setupVnetInterfaceJailSide(jail *Jail, hostepairs []string) error {
|
||||
}
|
||||
// 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)
|
||||
printablemac := hex.EncodeToString(jsmac)
|
||||
for i := 2 ; i < len(printablemac) ; i += 3 {
|
||||
printablemac = printablemac[:i] + ":" + printablemac[i:]
|
||||
}
|
||||
log.Debugf("Set %s.%d as static to %s in %s address cache\n", nic, jail.JID, printablemac, bridge)
|
||||
cmd = fmt.Sprintf("/sbin/ifconfig %s static %s.%d %s", bridge, nic, jail.JID, printablemac)
|
||||
out, err := executeCommand(cmd)
|
||||
if err != nil {
|
||||
return fmt.Errorf("Error adding member %s to %s: %v: %s\n", nic, bridge, err, out)
|
||||
return fmt.Errorf("Error setting %s.%d static with %s on %s: %v: %s\n", nic, jail.JID, printablemac, bridge, err, out)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user