X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;f=net%2Fcore%2Futils.c;h=0bf17da40d52e0b60158052c20783ea5f5fe24ba;hb=14ae856645dba5b9ba56b2d0627b3b9825fa37b2;hp=adecfd281ae98d6b8239eada1b26de0dbe459890;hpb=fabb5c4e4a474ff0f7d6c1d3466a1b79bbce5f49;p=~andy%2Flinux diff --git a/net/core/utils.c b/net/core/utils.c index adecfd281ae..0bf17da40d5 100644 --- a/net/core/utils.c +++ b/net/core/utils.c @@ -25,6 +25,7 @@ #include #include #include +#include #include #include @@ -139,16 +140,16 @@ int in4_pton(const char *src, int srclen, while(1) { int c; c = xdigit2bin(srclen > 0 ? *s : '\0', delim); - if (!(c & (IN6PTON_DIGIT | IN6PTON_DOT | IN6PTON_DELIM))) { + if (!(c & (IN6PTON_DIGIT | IN6PTON_DOT | IN6PTON_DELIM | IN6PTON_COLON_MASK))) { goto out; } - if (c & (IN6PTON_DOT | IN6PTON_DELIM)) { + if (c & (IN6PTON_DOT | IN6PTON_DELIM | IN6PTON_COLON_MASK)) { if (w == 0) goto out; *d++ = w & 0xff; w = 0; i++; - if (c & IN6PTON_DELIM) { + if (c & (IN6PTON_DELIM | IN6PTON_COLON_MASK)) { if (i != 4) goto out; break;