diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/core/utils.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net/core/utils.c b/net/core/utils.c index adecfd281ae9..2030bb8c2d30 100644 --- a/net/core/utils.c +++ b/net/core/utils.c | |||
@@ -139,16 +139,16 @@ int in4_pton(const char *src, int srclen, | |||
139 | while(1) { | 139 | while(1) { |
140 | int c; | 140 | int c; |
141 | c = xdigit2bin(srclen > 0 ? *s : '\0', delim); | 141 | c = xdigit2bin(srclen > 0 ? *s : '\0', delim); |
142 | if (!(c & (IN6PTON_DIGIT | IN6PTON_DOT | IN6PTON_DELIM))) { | 142 | if (!(c & (IN6PTON_DIGIT | IN6PTON_DOT | IN6PTON_DELIM | IN6PTON_COLON_MASK))) { |
143 | goto out; | 143 | goto out; |
144 | } | 144 | } |
145 | if (c & (IN6PTON_DOT | IN6PTON_DELIM)) { | 145 | if (c & (IN6PTON_DOT | IN6PTON_DELIM | IN6PTON_COLON_MASK)) { |
146 | if (w == 0) | 146 | if (w == 0) |
147 | goto out; | 147 | goto out; |
148 | *d++ = w & 0xff; | 148 | *d++ = w & 0xff; |
149 | w = 0; | 149 | w = 0; |
150 | i++; | 150 | i++; |
151 | if (c & IN6PTON_DELIM) { | 151 | if (c & (IN6PTON_DELIM | IN6PTON_COLON_MASK)) { |
152 | if (i != 4) | 152 | if (i != 4) |
153 | goto out; | 153 | goto out; |
154 | break; | 154 | break; |