]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
40network/ifup: add "brd +" to "ip addr add"
authorHarald Hoyer <harald@redhat.com>
Tue, 15 Nov 2011 10:54:14 +0000 (11:54 +0100)
committerHarald Hoyer <harald@redhat.com>
Tue, 15 Nov 2011 10:54:14 +0000 (11:54 +0100)
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

modules.d/40network/ifup

index bab301466e3f84102adb2f24a0cadeb3eed448d4..a6b3a7da830afaebe37c01bf1f664473456c8daf 100755 (executable)
@@ -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