[prev in list] [next in list] [prev in thread] [next in thread]
List: busybox
Subject: [PATCH] ifupdown: pass interface device name for ipv6 route commands
From: Timo Teräs <timo.teras () iki ! fi>
Date: 2012-08-20 10:55:28
Message-ID: 1345460128-26966-1-git-send-email-timo.teras () iki ! fi
[Download RAW message or body]
IPv6 routes need the device argument for link-local routes, or they
cannot be used at all. E.g. "gateway fe80::def" seems to be used in
some places, but kernel refuses to insert the route unless device
name is explicitly specified in the route addition.
Signed-off-by: Timo Teräs <timo.teras@iki.fi>
---
networking/ifupdown.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/networking/ifupdown.c b/networking/ifupdown.c
index 9b34986..11a8cec 100644
--- a/networking/ifupdown.c
+++ b/networking/ifupdown.c
@@ -401,11 +401,11 @@ static int FAST_FUNC static_up6(struct interface_defn_t *ifd, \
execfn *exec) result = execute("ip addr add %address%/%netmask% dev %iface%[[ label \
%label%]]", ifd, exec); result += execute("ip link set[[ mtu %mtu%]][[ addr \
%hwaddress%]] %iface% up", ifd, exec); /* Was: "[[ ip ....%gateway% ]]". Removed \
extra spaces w/o checking */
- result += execute("[[ip route add ::/0 via %gateway%]][[ prio %metric%]]", ifd, \
exec); + result += execute("[[ip route add ::/0 via %gateway% dev %iface%]][[ prio \
%metric%]]", ifd, exec); # else
result = execute("ifconfig %iface%[[ media %media%]][[ hw %hwaddress%]][[ mtu \
%mtu%]] up", ifd, exec); result += execute("ifconfig %iface% add \
%address%/%netmask%", ifd, exec);
- result += execute("[[route -A inet6 add ::/0 gw %gateway%[[ metric %metric%]]]]", \
ifd, exec); + result += execute("[[route -A inet6 add ::/0 gw %gateway% dev %iface%[[ \
metric %metric%]]]]", ifd, exec); # endif
return ((result == 3) ? 3 : 0);
}
@@ -427,7 +427,7 @@ static int FAST_FUNC v4tunnel_up(struct interface_defn_t *ifd, \
execfn *exec) "%endpoint%[[ local %local%]][[ ttl %ttl%]]", ifd, exec);
result += execute("ip link set %iface% up", ifd, exec);
result += execute("ip addr add %address%/%netmask% dev %iface%", ifd, exec);
- result += execute("[[ip route add ::/0 via %gateway%]]", ifd, exec);
+ result += execute("[[ip route add ::/0 via %gateway% dev %iface%]]", ifd, exec);
return ((result == 4) ? 4 : 0);
}
--
1.7.11.5
_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic