mirror of
https://gitlab.com/shorewall/code.git
synced 2025-06-20 17:58:07 +02:00
Fix routing when IP address in GATEWAY column of providers file
git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@3586 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
parent
7c2c8f495c
commit
7454e8331a
@ -84,10 +84,15 @@ Changes in 3.1.x.
|
|||||||
37) Fix "shorewall capabilities" with VERBOSITY < 2.
|
37) Fix "shorewall capabilities" with VERBOSITY < 2.
|
||||||
|
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
3.1.7
|
3.1.8
|
||||||
|
|
||||||
38) Remove compile-time running of extension scripts.
|
38) Remove compile-time running of extension scripts.
|
||||||
|
|
||||||
39) Correctly handle interfaces named 'inet'.
|
39) Correctly handle interfaces named 'inet'.
|
||||||
|
|
||||||
40) SUBSYSLOCK functionality restored.
|
40) SUBSYSLOCK functionality restored.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
3.1.9
|
||||||
|
|
||||||
|
41) Fix Provider route generation when a specific gateway is specified.
|
||||||
|
@ -250,7 +250,6 @@ createchain2() # $1 = chain name, $2 = If "yes", create default rules
|
|||||||
finish_chain_section $1 ESTABLISHED
|
finish_chain_section $1 ESTABLISHED
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
eval exists_${c}=Yes
|
eval exists_${c}=Yes
|
||||||
@ -1137,7 +1136,7 @@ __EOF__
|
|||||||
}
|
}
|
||||||
|
|
||||||
add_a_provider() {
|
add_a_provider() {
|
||||||
local t n iface option
|
local t n iface option first=Yes
|
||||||
|
|
||||||
[ -n "$MANGLE_ENABLED" ] || fatal_error "Providers require mangle support in your kernel and iptables"
|
[ -n "$MANGLE_ENABLED" ] || fatal_error "Providers require mangle support in your kernel and iptables"
|
||||||
|
|
||||||
@ -1183,7 +1182,10 @@ ${INDENT}fi
|
|||||||
|
|
||||||
__EOF__
|
__EOF__
|
||||||
else
|
else
|
||||||
save_command "gateway=$gateway"
|
cat >&3 << __EOF__
|
||||||
|
${INDENT}run_ip route replace $gateway src \$(find_first_interface_address $interface) dev $interface table $number
|
||||||
|
${INDENT}run_ip route add default via $gateway dev $interface table $number
|
||||||
|
__EOF__
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ x${mark} != x- ]; then
|
if [ x${mark} != x- ]; then
|
||||||
@ -1211,7 +1213,19 @@ __EOF__
|
|||||||
;;
|
;;
|
||||||
balance=*)
|
balance=*)
|
||||||
balance=yes
|
balance=yes
|
||||||
save_command "DEFAULT_ROUTE=\"\$DEFAULT_ROUTE nexthop via \$gateway dev $interface weight ${option#*=}\""
|
if [ -n "$first"]; then
|
||||||
|
if [ "x$gateway" = xdetect ] ; then
|
||||||
|
save_command "DEFAULT_ROUTE=\"nexthop via \$gateway dev $interface weight ${option#*=}\""
|
||||||
|
else
|
||||||
|
save_command "DEFAULT_ROUTE=\"nexthop via $gateway dev $interface weight ${option#*=}\""
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
if [ "x$gateway" = xdetect ] ; then
|
||||||
|
save_command "DEFAULT_ROUTE=\"\$DEFAULT_ROUTE nexthop via \$gateway dev $interface weight ${option#*=}\""
|
||||||
|
else
|
||||||
|
save_command "DEFAULT_ROUTE=\"\$DEFAULT_ROUTE nexthop via $gateway dev $interface weight ${option#*=}\""
|
||||||
|
fi
|
||||||
|
fi
|
||||||
;;
|
;;
|
||||||
balance)
|
balance)
|
||||||
balance=yes
|
balance=yes
|
||||||
@ -1224,6 +1238,7 @@ __EOF__
|
|||||||
error_message "WARNING: Invalid option ($option) ignored in provider \"$provider\""
|
error_message "WARNING: Invalid option ($option) ignored in provider \"$provider\""
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
first=
|
||||||
done
|
done
|
||||||
|
|
||||||
rulenum=0
|
rulenum=0
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
Shorewall 3.1.8
|
Shorewall 3.1.9
|
||||||
|
|
||||||
Note to users upgrading from Shorewall 2.x or 3.0
|
Note to users upgrading from Shorewall 2.x or 3.0
|
||||||
|
|
||||||
@ -27,22 +27,16 @@ Note to users upgrading from Shorewall 2.x or 3.0
|
|||||||
Please see the "Migration Considerations" below for additional upgrade
|
Please see the "Migration Considerations" below for additional upgrade
|
||||||
information.
|
information.
|
||||||
|
|
||||||
Problems Corrected in 3.1.8
|
Problems Corrected in 3.1.9
|
||||||
|
|
||||||
1) Previously, startup errors occurred if the user had configured a network
|
1) Route generation is now correct when a specific gateway IP address is
|
||||||
interface named 'inet'.
|
given in the GATEWAY column of the providers file.
|
||||||
|
|
||||||
2) SUBSYSLOCK functionality has been restored.
|
2) SUBSYSLOCK functionality has been restored.
|
||||||
|
|
||||||
Other changes in 3.1.8
|
Other changes in 3.1.9
|
||||||
|
|
||||||
1) The sillyness having to do with running certain extension scripts at
|
None.
|
||||||
compile time has been eliminated. When a configuration is compiled,
|
|
||||||
the scripts are copied unmodified (except for indentation) into the
|
|
||||||
compiled program.
|
|
||||||
|
|
||||||
Note: The /etc/shorewall/params file is still processed at
|
|
||||||
compile-time.
|
|
||||||
|
|
||||||
Migration Considerations:
|
Migration Considerations:
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user