aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-core
diff options
context:
space:
mode:
authorHaiqing Bai <Haiqing.Bai@windriver.com>2017-03-08 17:27:30 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-05-18 13:04:47 +0100
commit4d9fcf9f2fa573218cda3a133e0da34c4185838a (patch)
tree04491abec700985112ba75b7ecf3984a8a4e68ed /meta/recipes-core
parent8ab20681730a3cbd75ed0c7c208a30b437714915 (diff)
downloadopenembedded-core-4d9fcf9f2fa573218cda3a133e0da34c4185838a.tar.gz
busybox: ifupdown:pass interface device name for ipv6 route command
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: Haiqing Bai <Haiqing.Bai@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> (cherry picked from commit 96ed437d57316153453bb5e170a4fd4f3a95883d) Signed-off-by: Armin Kuster <akuster808@gmail.com>
Diffstat (limited to 'meta/recipes-core')
-rw-r--r--meta/recipes-core/busybox/busybox-1.24.1/ifupdown-pass-interface-device-name-for-ipv6-route-c.patch52
-rw-r--r--meta/recipes-core/busybox/busybox_1.24.1.bb1
2 files changed, 53 insertions, 0 deletions
diff --git a/meta/recipes-core/busybox/busybox-1.24.1/ifupdown-pass-interface-device-name-for-ipv6-route-c.patch b/meta/recipes-core/busybox/busybox-1.24.1/ifupdown-pass-interface-device-name-for-ipv6-route-c.patch
new file mode 100644
index 0000000000..5715378afc
--- /dev/null
+++ b/meta/recipes-core/busybox/busybox-1.24.1/ifupdown-pass-interface-device-name-for-ipv6-route-c.patch
@@ -0,0 +1,52 @@
+From 06fcf98f6ca40dc6b823d7d6231a240a1794ef2d Mon Sep 17 00:00:00 2001
+From: Haiqing Bai <Haiqing.Bai@windriver.com>
+Date: Tue, 28 Feb 2017 10:40:37 +0800
+Subject: [PATCH] ifupdown: pass interface device name for ipv6 route commands
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+commit 028524317d8d0011ed38e86e507a06738a5b5a97 from upstream
+
+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>
+Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
+
+Upstream-Status: Backport
+Signed-off-by: Haiqing Bai <Haiqing.Bai@windriver.com>
+---
+ networking/ifupdown.c | 7 ++++---
+ 1 file changed, 4 insertions(+), 3 deletions(-)
+
+diff --git a/networking/ifupdown.c b/networking/ifupdown.c
+index 17bc4e9..a00f68d 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)
+ # if ENABLE_FEATURE_IFUPDOWN_IP
+ 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%]][[ metric %metric%]]", ifd, exec);
++ /* Reportedly, IPv6 needs "dev %iface%", but IPv4 does not: */
++ result += execute("[[ip route add ::/0 via %gateway% dev %iface%]][[ metric %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);
+@@ -421,7 +421,8 @@ 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);
++ /* Reportedly, IPv6 needs "dev %iface%", but IPv4 does not: */
++ result += execute("[[ip route add ::/0 via %gateway% dev %iface%]]", ifd, exec);
+ return ((result == 4) ? 4 : 0);
+ }
+
+--
+1.9.1
+
diff --git a/meta/recipes-core/busybox/busybox_1.24.1.bb b/meta/recipes-core/busybox/busybox_1.24.1.bb
index c35cba3222..f6c759584f 100644
--- a/meta/recipes-core/busybox/busybox_1.24.1.bb
+++ b/meta/recipes-core/busybox/busybox_1.24.1.bb
@@ -54,6 +54,7 @@ SRC_URI = "http://www.busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \
file://commit-applet_tables-fix-commit-0dddbc1.patch \
file://makefile-libbb-race.patch \
file://0001-libiproute-handle-table-ids-larger-than-255.patch \
+ file://ifupdown-pass-interface-device-name-for-ipv6-route-c.patch \
"
SRC_URI_append_libc-musl = " file://musl.cfg "