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 <mschwenke@ddn.com>
Reviewed-by: John Mulligan <jmulligan@redhat.com>
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