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

Ashwini Sharma ak.ashwini1981 at gmail.com
Thu Mar 13 04:40:01 PDT 2014


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);

   return len;


but it was other way around. Attached is the patch for the same.


regards,
Ashwini

PS:- The submissions for __modprobe__ and __getty__ are in the mail box
from long time, hope you will get to that soon.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.landley.net/pipermail/toybox-landley.net/attachments/20140313/f329a721/attachment-0003.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ifconfig.c.patch
Type: application/octet-stream
Size: 352 bytes
Desc: not available
URL: <http://lists.landley.net/pipermail/toybox-landley.net/attachments/20140313/f329a721/attachment-0005.obj>


More information about the Toybox mailing list