[PATCH] ifupdown: 'prio' should have been 'metric' in static_up and static_up6

Natanael Copa ncopa at alpinelinux.org
Fri Aug 7 13:11:54 UTC 2015


On Fri,  7 Aug 2015 11:53:26 +0200
Alex Dowad <alexinbeijing at gmail.com> wrote:

> When a static interface with explicit gateway and metric in /etc/network/interfaces
> is enabled using 'ifup', and further, the BusyBox 'ip' applet is enabled, the
> following error message appears at the console (and no default route is added):
> 
> ip: either "to" is duplicate, or "prio" is garbage
> 
> Tracing ifup reveals that it is attempting to run the following shell command:
> 
> ip route add default via <GW> dev <DEVICE> prio <METRIC>
> 
> 'ip' does not understand the 'prio' argument, causing this error. With 'metric',
> it works fine.
> 
> Signed-off-by: Alex Dowad <alexinbeijing at gmail.com>

ACK.

> ---
> 
> ncopa, I see that you originally added this code. Am I off base here? Is there
> something I'm missing? Thanks, AD

No you are right. This must been my mistake. I have used iproute2 (not
busybox) ip on the boxes where this has actually been used.

Alternatively could busybox iproute be patched to deal with 'prio' as
synonym to 'metric', but your proposed patch is better imo.

-nc


More information about the busybox mailing list