commit:     5dc13a0ff21f2e0a0b23e32e864a19f7f0a2766f
Author:     Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
AuthorDate: Mon Oct 24 21:19:22 2016 +0000
Commit:     William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Thu Nov  3 18:20:48 2016 +0000
URL:        https://gitweb.gentoo.org/proj/openrc.git/commit/?id=5dc13a0f

init.d/loopback: drop scope on loopback

Busybox does not support the 'scope' argument on 'ip address add' or 'ip
route add', this is documented in BUSYBOX.md, but is no longer actually
needed, as the kernel does get it right without manual specification,
and the ifconfig variant already relies on the kernel to get it right.
This is part of #103.

X-Gentoo-Bug: 487208
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=487208

 BUSYBOX.md         | 3 ---
 init.d/loopback.in | 4 ++--
 2 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/BUSYBOX.md b/BUSYBOX.md
index db7ca51..c8a78e7 100644
--- a/BUSYBOX.md
+++ b/BUSYBOX.md
@@ -22,9 +22,6 @@ or recognize the nofail option in fstab.
 
 CONFIG_SETFONT -- The setfont applet does not support the -u option from kbd.
 
-CONFIG_IP -- The ip applet  doesn't support the "scope" modifier for
-"ip route add" and "ip address add".
-
 CONFIG_BB_SYSCTL -- The sysctl applet does not support the --system command
 line switch.
 

diff --git a/init.d/loopback.in b/init.d/loopback.in
index f76dfce..59bdae2 100644
--- a/init.d/loopback.in
+++ b/init.d/loopback.in
@@ -21,8 +21,8 @@ start()
        if [ "$RC_UNAME" = Linux ]; then
                ebegin "Bringing up network interface lo"
                if command -v ip > /dev/null 2>&1; then
-                       ip addr add 127.0.0.1/8 dev lo brd + scope host
-                       ip route add 127.0.0.0/8 dev lo scope host
+                       ip addr add 127.0.0.1/8 dev lo brd +
+                       ip route add 127.0.0.0/8 dev lo
                        ip link set lo up
                else
                        ifconfig lo 127.0.0.1 netmask 255.0.0.0

Reply via email to