aboutsummaryrefslogtreecommitdiffstats
path: root/main/busybox
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2016-08-06 12:54:09 +0200
committerNatanael Copa <ncopa@alpinelinux.org>2016-08-06 12:54:39 +0200
commit9eec4cc2bc06cbffadb1e3c60fdbc41f9b419965 (patch)
treeba279dbb3278a2930dfcc0ca1cfc2d0534a3dac7 /main/busybox
parentdafc578d4dd9612bf00b324f2c8cd1b6ff14a96e (diff)
downloadaports-9eec4cc2bc06cbffadb1e3c60fdbc41f9b419965.tar.bz2
aports-9eec4cc2bc06cbffadb1e3c60fdbc41f9b419965.tar.xz
main/busybox: add fix for ip route
Diffstat (limited to 'main/busybox')
-rw-r--r--main/busybox/0001-iproute-ensure-scope-is-correctly-initialised.patch56
-rw-r--r--main/busybox/APKBUILD6
2 files changed, 61 insertions, 1 deletions
diff --git a/main/busybox/0001-iproute-ensure-scope-is-correctly-initialised.patch b/main/busybox/0001-iproute-ensure-scope-is-correctly-initialised.patch
new file mode 100644
index 0000000000..95c01a3f8d
--- /dev/null
+++ b/main/busybox/0001-iproute-ensure-scope-is-correctly-initialised.patch
@@ -0,0 +1,56 @@
+From b64e50214e1af64a94bd73f4e70da2a1a7659c75 Mon Sep 17 00:00:00 2001
+From: Ron Yorston <rmy@pobox.com>
+Date: Fri, 5 Aug 2016 19:39:31 +0100
+Subject: [PATCH] iproute: ensure scope is correctly initialised
+
+Code in iproute.c attempted to avoid assigning values to structure
+elements which were know to be zero unless the value to be assigned
+was non-zero.
+
+Commit ce4bc1ed added some more such cases. However, the treatment
+of req.r.rtm_scope was incorrect. Although this saved a few bytes it
+resulted in incorrect behaviour like:
+
+ $ sudo busybox ip route add 192.168.0.0/24 via 10.98.106.9 dev wlan0
+ ip: RTNETLINK answers: Invalid argument
+
+In practice this attempt at optimisation results in no saving, so
+remove it.
+
+Reported-by: Natanael Copa <ncopa@alpinelinux.org>
+Signed-off-by: Ron Yorston <rmy@pobox.com>
+---
+ networking/libiproute/iproute.c | 15 +++++----------
+ 1 file changed, 5 insertions(+), 10 deletions(-)
+
+diff --git a/networking/libiproute/iproute.c b/networking/libiproute/iproute.c
+index e674e9a..8db9aef 100644
+--- a/networking/libiproute/iproute.c
++++ b/networking/libiproute/iproute.c
+@@ -356,18 +356,13 @@ IF_FEATURE_IP_RULE(ARG_table,)
+ req.n.nlmsg_flags = NLM_F_REQUEST | flags;
+ req.n.nlmsg_type = cmd;
+ req.r.rtm_family = preferred_family;
+- if (RT_TABLE_MAIN != 0) /* if it is zero, memset already did it */
+- req.r.rtm_table = RT_TABLE_MAIN;
+- if (RT_SCOPE_NOWHERE != 0)
+- req.r.rtm_scope = RT_SCOPE_NOWHERE;
++ req.r.rtm_table = RT_TABLE_MAIN;
++ req.r.rtm_scope = RT_SCOPE_NOWHERE;
+
+ if (cmd != RTM_DELROUTE) {
+- if (RTPROT_BOOT != 0)
+- req.r.rtm_protocol = RTPROT_BOOT;
+- if (RT_SCOPE_UNIVERSE != 0)
+- req.r.rtm_scope = RT_SCOPE_UNIVERSE;
+- if (RTN_UNICAST != 0)
+- req.r.rtm_type = RTN_UNICAST;
++ req.r.rtm_protocol = RTPROT_BOOT;
++ req.r.rtm_scope = RT_SCOPE_UNIVERSE;
++ req.r.rtm_type = RTN_UNICAST;
+ }
+
+ mxrta->rta_type = RTA_METRICS;
+--
+2.9.1
+
diff --git a/main/busybox/APKBUILD b/main/busybox/APKBUILD
index 2d81309cfc..de4e5e1713 100644
--- a/main/busybox/APKBUILD
+++ b/main/busybox/APKBUILD
@@ -2,7 +2,7 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=busybox
pkgver=1.25.0
-pkgrel=2
+pkgrel=3
pkgdesc="Size optimized toolbox of many common UNIX utilities"
url=http://busybox.net
arch="all"
@@ -16,6 +16,7 @@ options="suid"
triggers="busybox.trigger=/bin:/usr/bin:/sbin:/usr/sbin:/lib/modules/*"
source="http://busybox.net/downloads/$pkgname-$pkgver.tar.bz2
0001-ash-exec-busybox.static.patch
+ 0001-iproute-ensure-scope-is-correctly-initialised.patch
0002-set-applet-location-to-correspond-to-upstream-for-vi.patch
0003-udhcpc-set-default-discover-retries-to-5.patch
0004-ping-make-ping-work-without-root-privileges.patch
@@ -146,6 +147,7 @@ static() {
md5sums="b05af9645076f75429a8683f8afcbdb3 busybox-1.25.0.tar.bz2
59028ad98544ec71c37f637df9d5c8f8 0001-ash-exec-busybox.static.patch
+4fbdfeeecbe01ee6353d9521827155f1 0001-iproute-ensure-scope-is-correctly-initialised.patch
d6ca0a022af2f68746297b3673ca0467 0002-set-applet-location-to-correspond-to-upstream-for-vi.patch
59298fbff57e569a736e93395035cfec 0003-udhcpc-set-default-discover-retries-to-5.patch
c0ee8629bb7f2c75e6da39431b736572 0004-ping-make-ping-work-without-root-privileges.patch
@@ -166,6 +168,7 @@ bcfa838ecc36ea8f2012a27561d6910d 0014-ntpd-respond-only-to-client-and-symmetric
d64b58a30892c558bdbab7f0d0997577 nologin.c"
sha256sums="5a0fe06885ee1b805fb459ab6aaa023fe4f2eccee4fb8c0fd9a6c17c0daca2fc busybox-1.25.0.tar.bz2
4c28b5613123af696399cd6caed99aaa1a86715fde3ebc00c704425c4f086b0c 0001-ash-exec-busybox.static.patch
+51443d85c36a17cd434f56709b2792c239662538a857fe61c9810be672d44ba3 0001-iproute-ensure-scope-is-correctly-initialised.patch
7a955bf237e965394ee4c96c3cbe39aa41fa638531b9185838df7ee5b2d97240 0002-set-applet-location-to-correspond-to-upstream-for-vi.patch
996304829ad49ffc08e38800021a7da43ddda6e12081360fe766178106d0b452 0003-udhcpc-set-default-discover-retries-to-5.patch
b9766d28fa8dcee8ffcbc00795c1b2edea82d99ef7a39b024876c54d258a6b59 0004-ping-make-ping-work-without-root-privileges.patch
@@ -186,6 +189,7 @@ f7cbeb5a5a47395ad30454ce8262abcd3e91c33ef803c2ae31a9258d7142dd48 acpid.logrotat
9bbf0bec82e6d6907474958f3be048c54657fbf49207810b7e4d4d6146f0069d nologin.c"
sha512sums="4122a457709a19f697547f1f84fb37da6ae85dd22afefcb49f551b2c6386838e07bfed0d7d58e70ee8199ae8fd35fd4397bf7d8b3bdd66f60aefb3153376efe4 busybox-1.25.0.tar.bz2
1d5eaba0531263c2b60697d5c7652a2f700a23132c6d2923b45127ba6d7dcc8ccc6c9bd9054e1639fe0dc40e61147348399692c4f08dbf6a6b7bac3c1f2811f7 0001-ash-exec-busybox.static.patch
+5a0ecbfd5b494fc04cac04996187c975c1a2c39608226668861b639c3011384275e7762e2fc9a66295023e68d86bf6a0af1f07b85f47b68b5e4976af6b81cb60 0001-iproute-ensure-scope-is-correctly-initialised.patch
14a8c43be87b6d6c19787f476405ad6de1a575198ff2420e32d7f952bc72f4869419ef8189ff0e7b11f078a48013eb1f6c73e4b82aff316abba287a5bda96195 0002-set-applet-location-to-correspond-to-upstream-for-vi.patch
1157d65dbb0b2391b29222770dc8d67c87cea40c66e8734db15435dce413437f7bc54fa0b88412fb3618f63c5d244084870373b85d9616111d9a15a458f9734b 0003-udhcpc-set-default-discover-retries-to-5.patch
91033878d9e5efa8b1e5cebb6b18ea9a87af68b9939ac9441f791c8493b144dff46bafcc9c8d2ff3f8bc3b2c4891faad8fddf3e7335417c099b4b3051cbe9ba4 0004-ping-make-ping-work-without-root-privileges.patch