Commit
176ae6c704528c021fcc34a41878584f43a00119 caused these functions
to exit on failure. This is incorrect and broke NAT gateway.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
ip link set "$_iface" up || \
die "Failed to bringup interface $_iface"
ip link set "$_iface" up || \
die "Failed to bringup interface $_iface"
- ip addr add "$_ip/$_maskbits" brd + dev "$_iface" || \
- die "Failed to add $_ip/$_maskbits on dev $_iface"
+ ip addr add "$_ip/$_maskbits" brd + dev "$_iface" || {
+ echo "Failed to add $_ip/$_maskbits on dev $_iface"
+ return 1
+ }
# remembering and re-adding secondaries.
set_proc "sys/net/ipv4/conf/${_iface}/promote_secondaries" 1
# remembering and re-adding secondaries.
set_proc "sys/net/ipv4/conf/${_iface}/promote_secondaries" 1
- ip addr del "$_ip/$_maskbits" dev "$_iface" || \
- die "Failed to del $_ip on dev $_iface"
+ ip addr del "$_ip/$_maskbits" dev "$_iface" || {
+ echo "Failed to del $_ip on dev $_iface"
+ return 1
+ }
}
# If the given IP is hosted then print 2 items: maskbits and iface
}
# If the given IP is hosted then print 2 items: maskbits and iface