12c96a64a4
busybox ip and the original ip utility behave differently when setting the following route (verified with ip route show using the original ip utility): ip route add 10.0.0.138 dev eth0 Result for busybox ip: # ip route add 10.0.0.138 dev eth0 # /usr/local/bin/ip route show 10.0.0.138 dev eth0 Result for ip: # /usr/local/bin/ip route add 10.0.0.138 dev eth0 # /usr/local/bin/ip route show 10.0.0.138 dev eth0 scope link A following "ip route add default via 10.0.0.138" fails for busybox ip, since the kernel can not find a route to 10.0.0.138 (it replies with Network is unreachable). The reasons seems to be that the original ip utility explicitly sets the scope after parsing all parameters. This is missing in busybox, the attached patch fixes this. I took this from the original iproute sources and removed some variables, which are not needed for busybox. |
||
---|---|---|
.. | ||
ip_common.h | ||
ip_parse_common_args.c | ||
ipaddress.c | ||
iplink.c | ||
iproute.c | ||
iprule.c | ||
iptunnel.c | ||
Kbuild | ||
libnetlink.c | ||
libnetlink.h | ||
ll_addr.c | ||
ll_map.c | ||
ll_map.h | ||
ll_proto.c | ||
ll_types.c | ||
rt_names.c | ||
rt_names.h | ||
rtm_map.c | ||
rtm_map.h | ||
utils.c | ||
utils.h |