This patch broke parsing of 0/0 in ip applet

Bernhard Reutner-Fischer rep.dot.nop at gmail.com
Thu Feb 10 23:58:54 UTC 2011


On Wed, Feb 09, 2011 at 04:25:16AM +0100, Denys Vlasenko wrote:
>commit 8fbd8ac8ddad83f7ea724f12a1f5e6bf4af50f88
>Author: Bernhard Reutner-Fischer <rep.dot.nop at gmail.com>
>Date:   Tue Oct 21 12:42:45 2008 +0000
>
>    - fix ip route rejecting dotted quads as prefix
>    - adjust error message for wrong prefix not to mention address
>      Previously e.g. ip route add 127.0.0.0/255.0.0.0 dev dummy0
>      was rejected, saying
>    ip: an inet address is expected rather than "127.0.0.0/255.0.0.0"
>
>
>
>Symptom:
>
>Before (for example, try 1.12.x binary):
>
># ./busybox ip r l root 0/0
>10.0.0.0/24 dev if  src 10.0.0.1
>192.168.0.0/24 dev if  src 192.168.0.1
>169.254.0.0/16 dev if  src 169.254.0.1
>default via 10.0.0.138 dev if
>
>After (1.13.x):
>
># ./busybox ip r l root 0/0
>ip: an inet prefix is expected rather than "0/0"
>
>
>I believe the rule here is to allow N[.N[.N[.N]]]
>to be treated as valid IPv4 address. Unfortunately,
>inet_pton() doesn't allow that.
>
>
>Do you have time to fix this?

Not really, sorry. :-/


More information about the busybox mailing list