fix broadcast address (#1611)
authorMike Baker <mbm@openwrt.org>
Thu, 28 Jun 2007 23:07:29 +0000 (23:07 +0000)
committerMike Baker <mbm@openwrt.org>
Thu, 28 Jun 2007 23:07:29 +0000 (23:07 +0000)
SVN-Revision: 7766

package/base-files/files/lib/network/config.sh

index c6d909fd0aaf25b6a34b9f173dbd4707c430fe83..2c15b5e2313c91601c19291ec153e4e2aa7e94db 100755 (executable)
@@ -149,10 +149,9 @@ setup_interface() {
                        config_get dns "$config" dns
                        config_get bcast "$config" broadcast
                        
-                       [ -z "$ipaddr" ] || $DEBUG ifconfig "$iface" "$ipaddr" netmask "$netmask"
+                       [ -z "$ipaddr" ] || $DEBUG ifconfig "$iface" "$ipaddr" netmask "$netmask" broadcast "${bcast:-+}"
                        [ -z "$ip6addr" ] || $DEBUG ifconfig "$iface" add "$ip6addr"
                        [ -z "$gateway" ] || $DEBUG route add default gw "$gateway"
-                       [ -z "$bcast" ] || $DEBUG ifconfig "$iface" broadcast "$bcast"
                        [ -z "$dns" ] || {
                                for ns in $dns; do
                                        grep "$ns" /tmp/resolv.conf.auto 2>/dev/null >/dev/null || {