From: Martin Schwenke Date: Thu, 9 Apr 2026 02:08:40 +0000 (+1000) Subject: ctdb-scripts: Add address with specified mask bits in updateip X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=5cb4cdc4cf43e0842376d6d5624d482f8a32e152;p=thirdparty%2Fsamba.git ctdb-scripts: Add address with specified mask bits in updateip That is, add using $_maskbits, not $maskbits. In the rare case where the mask bits were inconsistent on the old interface, $maskbits will be needed for removal from the old interface. However, the specified mask bits ($_maskbits) must always be used when adding to the new interface. Circumstances where this matters are likely to be very rare. It matters more if the address is unexpectedly not assigned at all. In this case $maskbits will not be set, so the address can't be added to the new interface using that variable. This got confused in commit 6471541d6d2bc9f2af0ff92b280abbd1d933cf88. Signed-off-by: Martin Schwenke Reviewed-by: John Mulligan --- diff --git a/ctdb/config/events/legacy/10.interface.script b/ctdb/config/events/legacy/10.interface.script index 5f947305741..4c1371176fd 100755 --- a/ctdb/config/events/legacy/10.interface.script +++ b/ctdb/config/events/legacy/10.interface.script @@ -228,7 +228,7 @@ updateip) fi delete_ip_from_iface "$niface" "$ip" "$maskbits" >/dev/null 2>&1 - if ! add_ip_to_iface "$niface" "$ip" "$maskbits"; then + if ! add_ip_to_iface "$niface" "$ip" "$_maskbits"; then ip_unblock "$ip" "$oiface" exit 1 fi