mirror of
https://gitlab.com/shorewall/code.git
synced 2025-06-19 08:07:13 +02:00
Remove special handling of 2000::/3 routes
git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@9158 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
parent
b6c1153809
commit
d1d0f15893
@ -134,7 +134,7 @@ sub copy_table( $$$ ) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
emit ( ' case $net in',
|
emit ( ' case $net in',
|
||||||
' default|nexthop|2000::/3)',
|
' default|nexthop)',
|
||||||
' ;;',
|
' ;;',
|
||||||
' *)',
|
' *)',
|
||||||
" run_ip route add table $number \$net \$route $realm",
|
" run_ip route add table $number \$net \$route $realm",
|
||||||
@ -154,7 +154,7 @@ sub copy_and_edit_table( $$$$ ) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
emit ( ' case $net in',
|
emit ( ' case $net in',
|
||||||
' default|nexthop|2000::/3)',
|
' default|nexthop)',
|
||||||
' ;;',
|
' ;;',
|
||||||
' *)',
|
' *)',
|
||||||
' case $(find_device $route) in',
|
' case $(find_device $route) in',
|
||||||
@ -522,7 +522,7 @@ sub setup_providers() {
|
|||||||
emit ( '#',
|
emit ( '#',
|
||||||
'# Capture the default route(s) if we don\'t have it (them) already.',
|
'# Capture the default route(s) if we don\'t have it (them) already.',
|
||||||
'#',
|
'#',
|
||||||
'[ -f ${VARDIR}/default_route ] || ip -' . $family . ' route list | grep -E \'^\s*(default |nexthop |2000::/3 )\' > ${VARDIR}/default_route',
|
'[ -f ${VARDIR}/default_route ] || ip -' . $family . ' route list | grep -E \'^\s*(default |nexthop )\' > ${VARDIR}/default_route',
|
||||||
'#',
|
'#',
|
||||||
'# Initialize the file that holds \'undo\' commands',
|
'# Initialize the file that holds \'undo\' commands',
|
||||||
'#',
|
'#',
|
||||||
|
@ -396,7 +396,7 @@ find_nexthop() # $1 = interface
|
|||||||
#
|
#
|
||||||
find_default_interface() {
|
find_default_interface() {
|
||||||
ip -6 route list | while read first rest; do
|
ip -6 route list | while read first rest; do
|
||||||
[ "$first" = 2000::/3 -o "$first" = default ] && echo $(find_device $rest) && return
|
[ "$first" = default ] && echo $(find_device $rest) && return
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -504,7 +504,7 @@ get_routed_networks() # $1 = interface name, $2-n = Fatal error message
|
|||||||
ip -6 route show dev $1 2> /dev/null |
|
ip -6 route show dev $1 2> /dev/null |
|
||||||
while read address rest; do
|
while read address rest; do
|
||||||
case "$address" in
|
case "$address" in
|
||||||
default|2000::/3)
|
default)
|
||||||
if [ $# -gt 1 ]; then
|
if [ $# -gt 1 ]; then
|
||||||
shift
|
shift
|
||||||
fatal_error "$@"
|
fatal_error "$@"
|
||||||
@ -754,7 +754,7 @@ detect_gateway() # $1 = interface
|
|||||||
#
|
#
|
||||||
# Maybe there's a default route through this gateway already
|
# Maybe there's a default route through this gateway already
|
||||||
#
|
#
|
||||||
[ -n "$gateway" ] || gateway=$(find_gateway $(ip -6 route list dev $interface | grep -E '^(default |2000::/3)'))
|
[ -n "$gateway" ] || gateway=$(find_gateway $(ip -6 route list dev $interface | grep '^default'))
|
||||||
#
|
#
|
||||||
# Last hope -- is there a load-balancing route through the interface?
|
# Last hope -- is there a load-balancing route through the interface?
|
||||||
#
|
#
|
||||||
@ -859,14 +859,14 @@ restore_default_route() {
|
|||||||
|
|
||||||
while read route ; do
|
while read route ; do
|
||||||
case $route in
|
case $route in
|
||||||
2000::/3*)
|
default)
|
||||||
if [ -n "$default_route" ]; then
|
if [ -n "$default_route" ]; then
|
||||||
case "$default_route" in
|
case "$default_route" in
|
||||||
*metric*)
|
*metric*)
|
||||||
#
|
#
|
||||||
# Don't restore a route with a metric -- we only replace the one with metric == 0
|
# Don't restore a route with a metric -- we only replace the one with metric == 0
|
||||||
#
|
#
|
||||||
qt ip -6 route delete 2000::/3 metric 0 && \
|
qt ip -6 route delete default metric 0 && \
|
||||||
progress_message "Default Route with metric 0 deleted"
|
progress_message "Default Route with metric 0 deleted"
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user