NAMESERVERS_=`netGetNameservers warn`
GW_=`netGetDefaultGateway warn`
- GW_DEV_=`/sbin/ip route get "$GW_" | awk '{ print $3; exit; }'`
- if [ "$GW_DEV_" != "$INTERFACE_" ] && [ "$GW_DEV_" != "" ]; then
+ GW_DEV_=`/sbin/ip route get "$GW_" | sed 's/^local //' | awk '{ print $3; exit; }'`
+ if [ "$GW_DEV_" != "$INTERFACE_" ] && [ "$GW_DEV_" != "" ] && [ "$GW_DEV_" != "lo" ]; then
# GW_DEV_ of server is not the same device as the one serviced by dhcpd
# so it doesn't make sense to provide the GW_ address to the clients
local do_nat_="YES"