40network/ifup: add "brd +" to "ip addr add"

Unlike "ifconfig", the "ip" command does not set a broadcast address
unless explicitly requested.

add "brd +" to make "ip" calculate the broadcast address on the fly
master
Harald Hoyer 2011-11-15 11:54:14 +01:00
parent d00f97a7db
commit d1b7efd578
1 changed files with 1 additions and 1 deletions

View File

@ -63,7 +63,7 @@ do_static() {
# do not flush addr for ipv6
strstr $ip '*:*:*' || \
echo ip addr flush dev $netif
echo ip addr add $ip/$mask dev $netif
echo ip addr add $ip/$mask brd + dev $netif
} > /tmp/net.$netif.up

[ -n "$gw" ] && echo ip route add default via $gw dev $netif > /tmp/net.$netif.gw