mirror of
https://gitlab.com/shorewall/code.git
synced 2024-11-23 16:13:18 +01:00
Detect dhclient dynamic gateway
Signed-off-by: Tom Eastep <teastep@shorewall.net> git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@9734 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
parent
f28494b802
commit
9328f0fc4c
@ -820,6 +820,10 @@ detect_dynamic_gateway() { # $1 = interface
|
||||
[ -n "$GATEWAYS" ] && GATEWAYS=${GATEWAYS%,*} && gateway=$GATEWAYS
|
||||
fi
|
||||
|
||||
if [ -z "$gateway" -a -f /var/lib/dhcp/dhclient-${1}.lease ]; then
|
||||
gateway=$(grep 'option routers' /var/lib/dhcp/dhclient-${1}.lease | tail -n 1 | while read j1 j2 gateway; do echo $gateway; return 0; done)
|
||||
fi
|
||||
|
||||
[ -n "$gateway" ] && echo $gateway
|
||||
}
|
||||
|
||||
|
@ -6,6 +6,8 @@ Changes in Shorewall 4.3.8
|
||||
|
||||
3) Fix swping
|
||||
|
||||
4) Detect gateway via dhclient leases file.
|
||||
|
||||
Changes in Shorewall 4.3.7
|
||||
|
||||
1) Fix forward treatment of interface options.
|
||||
|
@ -61,6 +61,10 @@ None.
|
||||
error message is generated and the state of the firewall is not
|
||||
changed.
|
||||
|
||||
2) Shorewall will now attempt to detect a dynamic gateway by reading
|
||||
the dhclient lease file for the interface
|
||||
(/var/run/dhcp/dhclient-<if>.lease).
|
||||
|
||||
----------------------------------------------------------------------------
|
||||
N E W F E A T U R E S IN 4 . 3
|
||||
----------------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user