mirror of
https://github.com/samba-team/samba.git
synced 2025-01-08 21:18:16 +03:00
ctdb-scripts: Fix regression in VLAN interface support
Commit 6471541d6d
broke support for VLAN
interfaces. Releasing a public IP address depends on
ip_maskbits_iface() and for a VLAN interface this will return an
interface of the form <vlan>@<iface>, which can't be fed back into
"ip" commands.
Update ip_maskbits_iface() to drop the '@' and everything after it.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Reported-by: Jan Schwaratzki <jschwaratzki@ddn.com>
This commit is contained in:
parent
539125c99d
commit
87c5c96b76
@ -957,7 +957,8 @@ ip_maskbits_iface ()
|
||||
|
||||
ip addr show to "${_addr}/${_bits}" 2>/dev/null | \
|
||||
awk -v family="${_family}" \
|
||||
'NR == 1 { iface = $2; sub(":$", "", iface) } \
|
||||
'NR == 1 { iface = $2; sub(":$", "", iface) ; \
|
||||
sub("@.*", "", iface) } \
|
||||
$1 ~ /inet/ { mask = $2; sub(".*/", "", mask); \
|
||||
print mask, iface, family }'
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user