diff options
-rw-r--r-- | networking/ifupdown.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/networking/ifupdown.c b/networking/ifupdown.c index 73da26085..dfda20670 100644 --- a/networking/ifupdown.c +++ b/networking/ifupdown.c | |||
@@ -403,11 +403,11 @@ static int FAST_FUNC static_up6(struct interface_defn_t *ifd, execfn *exec) | |||
403 | result = execute("ip addr add %address%/%netmask% dev %iface%[[ label %label%]]", ifd, exec); | 403 | result = execute("ip addr add %address%/%netmask% dev %iface%[[ label %label%]]", ifd, exec); |
404 | result += execute("ip link set[[ mtu %mtu%]][[ addr %hwaddress%]] %iface% up", ifd, exec); | 404 | result += execute("ip link set[[ mtu %mtu%]][[ addr %hwaddress%]] %iface% up", ifd, exec); |
405 | /* Was: "[[ ip ....%gateway% ]]". Removed extra spaces w/o checking */ | 405 | /* Was: "[[ ip ....%gateway% ]]". Removed extra spaces w/o checking */ |
406 | result += execute("[[ip route add ::/0 via %gateway%]]", ifd, exec); | 406 | result += execute("[[ip route add ::/0 via %gateway%]][[ prio %metric%]]", ifd, exec); |
407 | # else | 407 | # else |
408 | result = execute("ifconfig %iface%[[ media %media%]][[ hw %hwaddress%]][[ mtu %mtu%]] up", ifd, exec); | 408 | result = execute("ifconfig %iface%[[ media %media%]][[ hw %hwaddress%]][[ mtu %mtu%]] up", ifd, exec); |
409 | result += execute("ifconfig %iface% add %address%/%netmask%", ifd, exec); | 409 | result += execute("ifconfig %iface% add %address%/%netmask%", ifd, exec); |
410 | result += execute("[[route -A inet6 add ::/0 gw %gateway%]]", ifd, exec); | 410 | result += execute("[[route -A inet6 add ::/0 gw %gateway%[[ metric %metric%]]]]", ifd, exec); |
411 | # endif | 411 | # endif |
412 | return ((result == 3) ? 3 : 0); | 412 | return ((result == 3) ? 3 : 0); |
413 | } | 413 | } |
@@ -490,7 +490,7 @@ static int FAST_FUNC static_up(struct interface_defn_t *ifd, execfn *exec) | |||
490 | result = execute("ip addr add %address%/%bnmask%[[ broadcast %broadcast%]] " | 490 | result = execute("ip addr add %address%/%bnmask%[[ broadcast %broadcast%]] " |
491 | "dev %iface%[[ peer %pointopoint%]][[ label %label%]]", ifd, exec); | 491 | "dev %iface%[[ peer %pointopoint%]][[ label %label%]]", ifd, exec); |
492 | result += execute("ip link set[[ mtu %mtu%]][[ addr %hwaddress%]] %iface% up", ifd, exec); | 492 | result += execute("ip link set[[ mtu %mtu%]][[ addr %hwaddress%]] %iface% up", ifd, exec); |
493 | result += execute("[[ip route add default via %gateway% dev %iface%]]", ifd, exec); | 493 | result += execute("[[ip route add default via %gateway% dev %iface%[[ prio %metric%]]]]", ifd, exec); |
494 | return ((result == 3) ? 3 : 0); | 494 | return ((result == 3) ? 3 : 0); |
495 | # else | 495 | # else |
496 | /* ifconfig said to set iface up before it processes hw %hwaddress%, | 496 | /* ifconfig said to set iface up before it processes hw %hwaddress%, |
@@ -500,7 +500,7 @@ static int FAST_FUNC static_up(struct interface_defn_t *ifd, execfn *exec) | |||
500 | result += execute("ifconfig %iface% %address% netmask %netmask%" | 500 | result += execute("ifconfig %iface% %address% netmask %netmask%" |
501 | "[[ broadcast %broadcast%]][[ pointopoint %pointopoint%]] ", | 501 | "[[ broadcast %broadcast%]][[ pointopoint %pointopoint%]] ", |
502 | ifd, exec); | 502 | ifd, exec); |
503 | result += execute("[[route add default gw %gateway% %iface%]]", ifd, exec); | 503 | result += execute("[[route add default gw %gateway%[[ metric %metric%]] %iface%]]", ifd, exec); |
504 | return ((result == 3) ? 3 : 0); | 504 | return ((result == 3) ? 3 : 0); |
505 | # endif | 505 | # endif |
506 | } | 506 | } |