diff options
| -rw-r--r-- | meta/recipes-core/busybox/busybox-1.24.1/ifupdown-pass-interface-device-name-for-ipv6-route-c.patch | 52 | ||||
| -rw-r--r-- | meta/recipes-core/busybox/busybox_1.24.1.bb | 1 |
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 @@ | |||
| 1 | From 06fcf98f6ca40dc6b823d7d6231a240a1794ef2d Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Haiqing Bai <Haiqing.Bai@windriver.com> | ||
| 3 | Date: Tue, 28 Feb 2017 10:40:37 +0800 | ||
| 4 | Subject: [PATCH] ifupdown: pass interface device name for ipv6 route commands | ||
| 5 | MIME-Version: 1.0 | ||
| 6 | Content-Type: text/plain; charset=UTF-8 | ||
| 7 | Content-Transfer-Encoding: 8bit | ||
| 8 | |||
| 9 | commit 028524317d8d0011ed38e86e507a06738a5b5a97 from upstream | ||
| 10 | |||
| 11 | IPv6 routes need the device argument for link-local routes, or they | ||
| 12 | cannot be used at all. E.g. "gateway fe80::def" seems to be used in | ||
| 13 | some places, but kernel refuses to insert the route unless device | ||
| 14 | name is explicitly specified in the route addition. | ||
| 15 | |||
| 16 | Signed-off-by: Timo Teräs <timo.teras@iki.fi> | ||
| 17 | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com> | ||
| 18 | |||
| 19 | Upstream-Status: Backport | ||
| 20 | Signed-off-by: Haiqing Bai <Haiqing.Bai@windriver.com> | ||
| 21 | --- | ||
| 22 | networking/ifupdown.c | 7 ++++--- | ||
| 23 | 1 file changed, 4 insertions(+), 3 deletions(-) | ||
| 24 | |||
| 25 | diff --git a/networking/ifupdown.c b/networking/ifupdown.c | ||
| 26 | index 17bc4e9..a00f68d 100644 | ||
| 27 | --- a/networking/ifupdown.c | ||
| 28 | +++ b/networking/ifupdown.c | ||
| 29 | @@ -394,8 +394,8 @@ static int FAST_FUNC static_up6(struct interface_defn_t *ifd, execfn *exec) | ||
| 30 | # if ENABLE_FEATURE_IFUPDOWN_IP | ||
| 31 | result = execute("ip addr add %address%/%netmask% dev %iface%[[ label %label%]]", ifd, exec); | ||
| 32 | result += execute("ip link set[[ mtu %mtu%]][[ addr %hwaddress%]] %iface% up", ifd, exec); | ||
| 33 | - /* Was: "[[ ip ....%gateway% ]]". Removed extra spaces w/o checking */ | ||
| 34 | - result += execute("[[ip route add ::/0 via %gateway%]][[ metric %metric%]]", ifd, exec); | ||
| 35 | + /* Reportedly, IPv6 needs "dev %iface%", but IPv4 does not: */ | ||
| 36 | + result += execute("[[ip route add ::/0 via %gateway% dev %iface%]][[ metric %metric%]]", ifd, exec); | ||
| 37 | # else | ||
| 38 | result = execute("ifconfig %iface%[[ media %media%]][[ hw %hwaddress%]][[ mtu %mtu%]] up", ifd, exec); | ||
| 39 | result += execute("ifconfig %iface% add %address%/%netmask%", ifd, exec); | ||
| 40 | @@ -421,7 +421,8 @@ static int FAST_FUNC v4tunnel_up(struct interface_defn_t *ifd, execfn *exec) | ||
| 41 | "%endpoint%[[ local %local%]][[ ttl %ttl%]]", ifd, exec); | ||
| 42 | result += execute("ip link set %iface% up", ifd, exec); | ||
| 43 | result += execute("ip addr add %address%/%netmask% dev %iface%", ifd, exec); | ||
| 44 | - result += execute("[[ip route add ::/0 via %gateway%]]", ifd, exec); | ||
| 45 | + /* Reportedly, IPv6 needs "dev %iface%", but IPv4 does not: */ | ||
| 46 | + result += execute("[[ip route add ::/0 via %gateway% dev %iface%]]", ifd, exec); | ||
| 47 | return ((result == 4) ? 4 : 0); | ||
| 48 | } | ||
| 49 | |||
| 50 | -- | ||
| 51 | 1.9.1 | ||
| 52 | |||
diff --git a/meta/recipes-core/busybox/busybox_1.24.1.bb b/meta/recipes-core/busybox/busybox_1.24.1.bb index afb69d13e6..41fc64175e 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 \ | |||
| 54 | file://commit-applet_tables-fix-commit-0dddbc1.patch \ | 54 | file://commit-applet_tables-fix-commit-0dddbc1.patch \ |
| 55 | file://makefile-libbb-race.patch \ | 55 | file://makefile-libbb-race.patch \ |
| 56 | file://0001-libiproute-handle-table-ids-larger-than-255.patch \ | 56 | file://0001-libiproute-handle-table-ids-larger-than-255.patch \ |
| 57 | file://ifupdown-pass-interface-device-name-for-ipv6-route-c.patch \ | ||
| 57 | " | 58 | " |
| 58 | SRC_URI_append_libc-musl = " file://musl.cfg " | 59 | SRC_URI_append_libc-musl = " file://musl.cfg " |
| 59 | 60 | ||
