mirror of
https://gitlab.com/shorewall/code.git
synced 2024-12-18 20:30:43 +01:00
Correct one more default route save/restore defect
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
0b18c37a91
commit
d42a65fd11
@ -567,9 +567,14 @@ restore_default_route() # $1 = USE_DEFAULT_RT
|
||||
|
||||
if [ $result = 1 ]; then
|
||||
#
|
||||
# We added a default route with metric 0 but there wasn't one previously
|
||||
# We didn't restore a default route with metric 0
|
||||
#
|
||||
qt -4 ip route del default metric 0 && progress_message "Default route with metric 0 deleted"
|
||||
if $IP -4 -o route ls 2> /dev/null | fgrep default | fgrep -qv metric; then
|
||||
#
|
||||
# But we added a default route with metric 0
|
||||
#
|
||||
qt $IP -4 route del default metric 0 && progress_message "Default route with metric 0 deleted"
|
||||
fi
|
||||
fi
|
||||
|
||||
rm -f ${VARDIR}/default_route
|
||||
|
@ -555,9 +555,14 @@ restore_default_route() # $1 = USE_DEFAULT_RT
|
||||
|
||||
if [ $result = 1 ]; then
|
||||
#
|
||||
# We added a default route with metric 0 but there wasn't one previously
|
||||
# We didn't restore a default route with metric 0
|
||||
#
|
||||
qt -6 ip route del default metric 0 && progress_message "Default route with metric 0 deleted"
|
||||
if $IP -6 -o route ls 2> /dev/null | fgrep default | fgrep -qv metric; then
|
||||
#
|
||||
# But we added a default route with metric 0
|
||||
#
|
||||
qt $IP -6 route del default metric 0 && progress_message "Default route with metric 0 deleted"
|
||||
fi
|
||||
fi
|
||||
|
||||
rm -f ${VARDIR}/default_route
|
||||
|
Loading…
Reference in New Issue
Block a user