diff options
author | Ermal <eri@pfsense.org> | 2011-02-09 19:13:51 +0000 |
---|---|---|
committer | Ermal <eri@pfsense.org> | 2011-02-09 19:13:51 +0000 |
commit | c90ba62d265223430663da04e5683ddcf0583fba (patch) | |
tree | 66e9c1603e7765ca36ec73f94bbacc9364a17b43 /sbin/dhclient-script | |
parent | 36d6af4399089ea910befb6e5b29b894ae4c50cd (diff) | |
download | pfsense-c90ba62d265223430663da04e5683ddcf0583fba.zip pfsense-c90ba62d265223430663da04e5683ddcf0583fba.tar.gz |
Fix an issue with dhcp parameters not specifying a defaultgw and the dhcp is the only interface with gateway as a result the box is left wihtout a default gw. Some sporadic reports have been done on this.
Diffstat (limited to 'sbin/dhclient-script')
-rwxr-xr-x | sbin/dhclient-script | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sbin/dhclient-script b/sbin/dhclient-script index ee98fa0..aaa8144 100755 --- a/sbin/dhclient-script +++ b/sbin/dhclient-script @@ -184,8 +184,9 @@ add_new_routes() { fi ADDED_ROUTE=no + EXISTSGW=`/bin/ls -l /tmp/*_defaultgw | /usr/bin/wc -l` # Only allow the default route to be overridden if it's on our own interface - if [ -f "/tmp/${interface}_defaultgw" ]; then + if [ -f "/tmp/${interface}_defaultgw" -o $EXISTSGW -eq 0 ]; then $ROUTE delete default for router in $new_routers; do if [ "$new_ip_address" = "$router" ]; then |