1 |
commit: 5dc13a0ff21f2e0a0b23e32e864a19f7f0a2766f |
2 |
Author: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Oct 24 21:19:22 2016 +0000 |
4 |
Commit: William Hubbs <williamh <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Nov 3 18:20:48 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/openrc.git/commit/?id=5dc13a0f |
7 |
|
8 |
init.d/loopback: drop scope on loopback |
9 |
|
10 |
Busybox does not support the 'scope' argument on 'ip address add' or 'ip |
11 |
route add', this is documented in BUSYBOX.md, but is no longer actually |
12 |
needed, as the kernel does get it right without manual specification, |
13 |
and the ifconfig variant already relies on the kernel to get it right. |
14 |
This is part of #103. |
15 |
|
16 |
X-Gentoo-Bug: 487208 |
17 |
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=487208 |
18 |
|
19 |
BUSYBOX.md | 3 --- |
20 |
init.d/loopback.in | 4 ++-- |
21 |
2 files changed, 2 insertions(+), 5 deletions(-) |
22 |
|
23 |
diff --git a/BUSYBOX.md b/BUSYBOX.md |
24 |
index db7ca51..c8a78e7 100644 |
25 |
--- a/BUSYBOX.md |
26 |
+++ b/BUSYBOX.md |
27 |
@@ -22,9 +22,6 @@ or recognize the nofail option in fstab. |
28 |
|
29 |
CONFIG_SETFONT -- The setfont applet does not support the -u option from kbd. |
30 |
|
31 |
-CONFIG_IP -- The ip applet doesn't support the "scope" modifier for |
32 |
-"ip route add" and "ip address add". |
33 |
- |
34 |
CONFIG_BB_SYSCTL -- The sysctl applet does not support the --system command |
35 |
line switch. |
36 |
|
37 |
|
38 |
diff --git a/init.d/loopback.in b/init.d/loopback.in |
39 |
index f76dfce..59bdae2 100644 |
40 |
--- a/init.d/loopback.in |
41 |
+++ b/init.d/loopback.in |
42 |
@@ -21,8 +21,8 @@ start() |
43 |
if [ "$RC_UNAME" = Linux ]; then |
44 |
ebegin "Bringing up network interface lo" |
45 |
if command -v ip > /dev/null 2>&1; then |
46 |
- ip addr add 127.0.0.1/8 dev lo brd + scope host |
47 |
- ip route add 127.0.0.0/8 dev lo scope host |
48 |
+ ip addr add 127.0.0.1/8 dev lo brd + |
49 |
+ ip route add 127.0.0.0/8 dev lo |
50 |
ip link set lo up |
51 |
else |
52 |
ifconfig lo 127.0.0.1 netmask 255.0.0.0 |