I attempted to use a line like this in /etc/shorewall/providers:
#NAME NUMBER MARK DUPLIC. INTERFACE GATEWAY OPTIONS
#
ISP1 1 - - eth0 detect track,balance=1
but the "detect" didn't work. I forget the error message, but you
don't need that because I found a fix.
I tracked it down to the detect_dynamic_gateway function in
/usr/share/shorewall/lib.core, which was not handling the
${VARLIB}/dhcp/dhclient.${1}.leases file.
On my system (Debian 7.6 with isc-dhcp-client version
4.2.2.dfsg.1-5+deb70u6), the file name is dhclient.eth0.leases,
not dhclient-eth0.lease ("." instead of "-", and plural
"leases"
instead of singular "lease"). Also, the relevant line in the file
looks like
option routers 192.0.2.1;
with a trailing semicolon that needs to be removed when the
value is printed.
I attach a patch that should fix this issue.
--apb (Alan Barrett)
------------------------------------------------------------------------------
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds