aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAshwini Sharma <ak.ashwini1981@gmail.com>2014-04-02 06:35:33 -0500
committerAshwini Sharma <ak.ashwini1981@gmail.com>2014-04-02 06:35:33 -0500
commit18720dc21a8de3e5cff780f6b89111fe1d9b17a1 (patch)
treef125ac47fcb155e7ef1981cd0be170b8b9bba57a
parent2b0b548381c2872cc1d6ea0603632c0ee7cad211 (diff)
downloadtoybox-18720dc21a8de3e5cff780f6b89111fe1d9b17a1.tar.gz
In ifconfig.c, there is a glitch in function get_addrinfo() when computing the prefix length.
-rw-r--r--toys/other/ifconfig.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/toys/other/ifconfig.c b/toys/other/ifconfig.c
index 2542d791..6dcda835 100644
--- a/toys/other/ifconfig.c
+++ b/toys/other/ifconfig.c
@@ -88,7 +88,7 @@ int get_addrinfo(char *host, sa_family_t af, void *addr)
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;
}