- config_get LAN_MASK lan netmask
- config_get LAN_IP lan ipaddr
- LAN_NET=$(/bin/ipcalc.sh $LAN_IP $LAN_MASK | grep NETWORK | cut -d= -f2)
+ config_get_bool NAT_LAN lan nat 1
+ if [ $NAT_LAN -ne 0 ]
+ then
+ config_get LAN_MASK lan netmask
+ config_get LAN_IP lan ipaddr
+ LAN_NET=$(/bin/ipcalc.sh $LAN_IP $LAN_MASK | grep NETWORK | cut -d= -f2)
+ fi