diff options
-rw-r--r-- | networking/ifupdown.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/networking/ifupdown.c b/networking/ifupdown.c index 7c45e8927..d477ff6d1 100644 --- a/networking/ifupdown.c +++ b/networking/ifupdown.c | |||
@@ -394,8 +394,8 @@ static int FAST_FUNC static_up6(struct interface_defn_t *ifd, execfn *exec) | |||
394 | # if ENABLE_FEATURE_IFUPDOWN_IP | 394 | # if ENABLE_FEATURE_IFUPDOWN_IP |
395 | result = execute("ip addr add %address%/%netmask% dev %iface%[[ label %label%]]", ifd, exec); | 395 | result = execute("ip addr add %address%/%netmask% dev %iface%[[ label %label%]]", ifd, exec); |
396 | result += execute("ip link set[[ mtu %mtu%]][[ addr %hwaddress%]] %iface% up", ifd, exec); | 396 | result += execute("ip link set[[ mtu %mtu%]][[ addr %hwaddress%]] %iface% up", ifd, exec); |
397 | /* Was: "[[ ip ....%gateway% ]]". Removed extra spaces w/o checking */ | 397 | /* Reportedly, IPv6 needs "dev %iface%", but IPv4 does not: */ |
398 | result += execute("[[ip route add ::/0 via %gateway%]][[ metric %metric%]]", ifd, exec); | 398 | result += execute("[[ip route add ::/0 via %gateway% dev %iface%]][[ metric %metric%]]", ifd, exec); |
399 | # else | 399 | # else |
400 | result = execute("ifconfig %iface%[[ media %media%]][[ hw %hwaddress%]][[ mtu %mtu%]] up", ifd, exec); | 400 | result = execute("ifconfig %iface%[[ media %media%]][[ hw %hwaddress%]][[ mtu %mtu%]] up", ifd, exec); |
401 | result += execute("ifconfig %iface% add %address%/%netmask%", ifd, exec); | 401 | result += execute("ifconfig %iface% add %address%/%netmask%", ifd, exec); |
@@ -421,7 +421,8 @@ static int FAST_FUNC v4tunnel_up(struct interface_defn_t *ifd, execfn *exec) | |||
421 | "%endpoint%[[ local %local%]][[ ttl %ttl%]]", ifd, exec); | 421 | "%endpoint%[[ local %local%]][[ ttl %ttl%]]", ifd, exec); |
422 | result += execute("ip link set %iface% up", ifd, exec); | 422 | result += execute("ip link set %iface% up", ifd, exec); |
423 | result += execute("ip addr add %address%/%netmask% dev %iface%", ifd, exec); | 423 | result += execute("ip addr add %address%/%netmask% dev %iface%", ifd, exec); |
424 | result += execute("[[ip route add ::/0 via %gateway%]]", ifd, exec); | 424 | /* Reportedly, IPv6 needs "dev %iface%", but IPv4 does not: */ |
425 | result += execute("[[ip route add ::/0 via %gateway% dev %iface%]]", ifd, exec); | ||
425 | return ((result == 4) ? 4 : 0); | 426 | return ((result == 4) ? 4 : 0); |
426 | } | 427 | } |
427 | 428 | ||