Fix a couple more ifupdown bugs
authorEric Andersen <andersen@codepoet.org>
Mon, 3 Feb 2003 12:44:59 +0000 (12:44 -0000)
committerEric Andersen <andersen@codepoet.org>
Mon, 3 Feb 2003 12:44:59 +0000 (12:44 -0000)
networking/ifupdown.c

index fcedfd0cfe6ae2634ed054dbd7b90beb13750c80..0511a5b95a60f8199b61491ca7d8f5317af230ee 100644 (file)
@@ -457,7 +457,7 @@ static int loopback_up(interface_defn_t *ifd, execfn *exec)
 #ifdef CONFIG_FEATURE_IFUPDOWN_IP
        if (!execute("ip link set %iface% up", ifd, exec))
                return(0);
-       if (!execute("ip addr add 127.0.0.1 dev %iface%", ifd, exec))
+       if (!execute("ip addr add 127.0.0.1/8 dev %iface%", ifd, exec))
                return(0);
 #else
        if (!execute("ifconfig %iface% 127.0.0.1 up", ifd, exec)) {
@@ -487,7 +487,7 @@ static int static_up(interface_defn_t *ifd, execfn *exec)
 #ifdef CONFIG_FEATURE_IFUPDOWN_IP
        if (!execute("ip link set %iface% up", ifd, exec))
                return(0);
-       if (!execute("ip addr add %address%/%bnmask% dev %iface%", ifd, exec))
+       if (!execute("ip addr add %address%/%bnmask% [[broadcast %broadcast%]] dev %iface%", ifd, exec))
                return(0);
        if (!execute("[[ ip route add default via %gateway% dev %iface% ]]", ifd, exec))
                return(0);