[Toybox] [Patch] - a glitch in ifconfig, while finding prefix len

Rob Landley rob at landley.net
Fri Mar 14 18:41:32 PDT 2014


On 03/13/14 06:40, Ashwini Sharma wrote:
> Hi Rob,
> 
> In ifconfig.c, there is a glitch in function __get_addrinfo()__
> when computing the prefix length, the max values should have been
> 
> AF_INET ===> 32
> AF_INET6 ===> 128
> 
> @@ -88,7 +88,7 @@
>    freeaddrinfo(result);
>  
>    len = -1;
> -  if (slash) len = atolx_range(slash+1, 0, (af == AF_INET) ? 128 : 32);
> +  if (slash) len = atolx_range(slash+1, 0, (af == AF_INET) ? 32 : 128);

Oops.  Swapped.

> PS:- The submissions for __modprobe__ and __getty__ are in the mail box
> from long time, hope you will get to that soon.

Sorry about that. My day job has a ~2 hour commute each way, so by the
time I get home I'm kinda exhausted. On a good day I get an hour or two
to work on my own projects (toybox, aboriginal, doing the marketing plan
for musl 1.0, blogging, documentation writeups...). On an average day I
may not even get to turn my netbook _on_, so things tend to fall through
the cracks.

Feel free to remind me about stuff that got buried. I'll look at those
two again this weekend.

Thanks,

Rob

 1394847692.0


More information about the Toybox mailing list