Bug 8561 - ip lacks support for the scope modifier
Summary: ip lacks support for the scope modifier
Status: RESOLVED FIXED
Alias: None
Product: Busybox
Classification: Unclassified
Component: Networking (show other bugs)
Version: 1.24.x
Hardware: PC Linux
: P5 normal
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-12-23 19:59 UTC by austinenglish@gmail.com
Modified: 2015-12-30 16:36 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description austinenglish@gmail.com 2015-12-23 19:59:59 UTC
austin@austin1:~$ ip route add 127.0.0.0/8 dev lo scope host
RTNETLINK answers: Operation not permitted

austin@austin1:~$ busybox ip route add 127.0.0.0/8 dev lo scope host
ip: either "to" is duplicate, or "scope" is garbage

But if 'scope host' is removed, busybox matches iproute2:
austin@austin1:~$ busybox ip route add 127.0.0.0/8 dev lo 
ip: RTNETLINK answers: Operation not permitted

This is needed by OpenRC:
In the loopback script in OpenRC, we use the following commands to
initialize the loopback interface:

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 link set lo up

This works for iproute2, but not for busybox's internal ip command,
because busybox's ip command appears to not support the scope modifier.

See https://bugs.gentoo.org/show_bug.cgi?id=507290
Comment 1 Denys Vlasenko 2015-12-30 16:36:02 UTC
Fixed in git