mirror of
https://github.com/fwbuilder/fwbuilder
synced 2026-09-13 08:29:32 +02:00
see #2137 delete ip address first, then add new one, but only if the interface is a carp interface
This commit is contained in:
@@ -113,7 +113,18 @@ update_addresses_of_interface() {
|
|||||||
test -z "$FWBDEBUG" && exit 1
|
test -z "$FWBDEBUG" && exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
diff_intf missing_address "$FWB_ADDRS" "$CURRENT_ADDRS_ALL_SCOPES" add
|
## carp interface on FreeBSD does not like to have two ip
|
||||||
diff_intf missing_address "$CURRENT_ADDRS_GLOBAL_SCOPE" "$FWB_ADDRS" del
|
## addresses. This means we should delete address first, then add new
|
||||||
|
## one. All other interfaces work with >1 address, so we add first,
|
||||||
|
## then delete to make sure there is no time window when interface has
|
||||||
|
## no address at all.
|
||||||
|
|
||||||
|
echo "$interface" | grep -q carp && {
|
||||||
|
diff_intf missing_address "$CURRENT_ADDRS_GLOBAL_SCOPE" "$FWB_ADDRS" del
|
||||||
|
diff_intf missing_address "$FWB_ADDRS" "$CURRENT_ADDRS_ALL_SCOPES" add
|
||||||
|
} || {
|
||||||
|
diff_intf missing_address "$FWB_ADDRS" "$CURRENT_ADDRS_ALL_SCOPES" add
|
||||||
|
diff_intf missing_address "$CURRENT_ADDRS_GLOBAL_SCOPE" "$FWB_ADDRS" del
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user