mirror of
https://github.com/samba-team/samba.git
synced 2025-03-26 18:50:30 +03:00
config/11.natgw: use delete_ip_from_iface() instead of remove_ip()
This also initializes the variables correctly for the shutdown|removenatgw code path to delete_all. metze (This used to be ctdb commit 2c2cbed4fcbc868a990fa6b32fc96126ffc61bb5)
This commit is contained in:
parent
d71c40cad7
commit
90769bf4eb
@ -11,8 +11,11 @@ loadconfig
|
||||
[ -z "$CTDB_NATGW_PUBLIC_IFACE" ] && exit 0
|
||||
|
||||
delete_all() {
|
||||
remove_ip $CTDB_NATGW_PUBLIC_IP $CTDB_NATGW_PUBLIC_IFACE
|
||||
remove_ip $CTDB_NATGW_PUBLIC_IP_HOST lo
|
||||
local _ip=`echo $CTDB_NATGW_PUBLIC_IP | cut -d '/' -f1`
|
||||
local _maskbits=`echo $CTDB_NATGW_PUBLIC_IP | cut -d '/' -f2`
|
||||
|
||||
delete_ip_from_iface $CTDB_NATGW_PUBLIC_IFACE $_ip $_maskbits
|
||||
delete_ip_from_iface lo $_ip 32
|
||||
|
||||
ip route del 0.0.0.0/0 metric 10 >/dev/null 2>/dev/null
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user