From 87a6ed98720897b32692f9921d8b58637ef84fbb Mon Sep 17 00:00:00 2001 From: Natanael Copa Date: Tue, 4 Sep 2012 07:58:53 +0000 Subject: main/busybox: ifupdown: pass interface device name for ipv6 route cmd --- ...ss-interface-device-name-for-ipv6-route-c.patch | 48 ++++++++++++++++++++++ main/busybox/APKBUILD | 4 +- 2 files changed, 51 insertions(+), 1 deletion(-) create mode 100644 main/busybox/0001-ifupdown-pass-interface-device-name-for-ipv6-route-c.patch (limited to 'main/busybox') diff --git a/main/busybox/0001-ifupdown-pass-interface-device-name-for-ipv6-route-c.patch b/main/busybox/0001-ifupdown-pass-interface-device-name-for-ipv6-route-c.patch new file mode 100644 index 0000000000..14086269b3 --- /dev/null +++ b/main/busybox/0001-ifupdown-pass-interface-device-name-for-ipv6-route-c.patch @@ -0,0 +1,48 @@ +From 3809536eb8286e972fc7170493fffed35c301f29 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Timo=20Ter=C3=A4s?= +Date: Mon, 20 Aug 2012 13:50:46 +0300 +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 + +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 +--- + 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.12 + diff --git a/main/busybox/APKBUILD b/main/busybox/APKBUILD index 402ec6e7e3..f143d80f76 100644 --- a/main/busybox/APKBUILD +++ b/main/busybox/APKBUILD @@ -1,7 +1,7 @@ # Maintainer: Natanael Copa pkgname=busybox pkgver=1.20.2 -pkgrel=1 +pkgrel=2 pkgdesc="Size optimized toolbox of many common UNIX utilities" url=http://busybox.net arch="all" @@ -22,6 +22,7 @@ source="http://busybox.net/downloads/$pkgname-$pkgver.tar.bz2 0001-unzip-ignore-chmod-errors-so-unzipping-on-FAT-works.patch loginutils-sha512.patch + 0001-ifupdown-pass-interface-device-name-for-ipv6-route-c.patch busyboxconfig" _sdir="$srcdir"/$pkgname-$pkgver @@ -102,4 +103,5 @@ b5375210f13fd6e1ca61a565e8fabd35 busybox-uname-is-not-gnu.patch b0977368029587bab23067f0267ae309 0001-tar-Implement-no-recursion.patch 8bf65d5bc87112946675f540b46d406d 0001-unzip-ignore-chmod-errors-so-unzipping-on-FAT-works.patch 8c42c9ef0f0419c314c86bcaf7796106 loginutils-sha512.patch +04eeda8c49d4688e6dec02451f8b6aae 0001-ifupdown-pass-interface-device-name-for-ipv6-route-c.patch 8b3bcd5dd5e3245721da3d376172dcac busyboxconfig" -- cgit v1.2.3