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:
teastep 2006-02-26 01:47:50 +00:00
parent 7c2c8f495c
commit 7454e8331a
3 changed files with 31 additions and 17 deletions

View File

@ -84,10 +84,15 @@ Changes in 3.1.x.
37) Fix "shorewall capabilities" with VERBOSITY < 2.
-------------------------------------------------------------------------------
3.1.7
3.1.8
38) Remove compile-time running of extension scripts.
39) Correctly handle interfaces named 'inet'.
40) SUBSYSLOCK functionality restored.
-------------------------------------------------------------------------------
3.1.9
41) Fix Provider route generation when a specific gateway is specified.

View File

@ -250,7 +250,6 @@ createchain2() # $1 = chain name, $2 = If "yes", create default rules
finish_chain_section $1 ESTABLISHED
;;
esac
fi
eval exists_${c}=Yes
@ -1137,7 +1136,7 @@ __EOF__
}
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"
@ -1183,7 +1182,10 @@ ${INDENT}fi
__EOF__
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
if [ x${mark} != x- ]; then
@ -1211,7 +1213,19 @@ __EOF__
;;
balance=*)
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=yes
@ -1224,6 +1238,7 @@ __EOF__
error_message "WARNING: Invalid option ($option) ignored in provider \"$provider\""
;;
esac
first=
done
rulenum=0

View File

@ -1,4 +1,4 @@
Shorewall 3.1.8
Shorewall 3.1.9
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
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
interface named 'inet'.
1) Route generation is now correct when a specific gateway IP address is
given in the GATEWAY column of the providers file.
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
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.
None.
Migration Considerations: