Bug 8561

Summary: ip lacks support for the scope modifier
Product: Busybox Reporter: austinenglish <austinenglish>
Component: NetworkingAssignee: unassigned
Status: RESOLVED FIXED    
Severity: normal CC: busybox-cvs
Priority: P5    
Version: 1.24.x   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
See Also: https://bugs.gentoo.org/show_bug.cgi?id=507290
Host: Target:
Build:

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