X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=net%2Fcore%2Futils.c;h=2030bb8c2d30c4c27fccf960f87acd51fc5fac54;hb=40b77c943468236c6dfad3e7b94348fe70c70331;hp=61556065f07ec23b3d115fa05a71b156b0ae2ce1;hpb=f0eef25339f92f7cd4aeea23d9ae97987a5a1e82;p=linux-2.6 diff --git a/net/core/utils.c b/net/core/utils.c index 61556065f0..2030bb8c2d 100644 --- a/net/core/utils.c +++ b/net/core/utils.c @@ -30,12 +30,14 @@ #include #include -int net_msg_cost = 5*HZ; -int net_msg_burst = 10; +int net_msg_cost __read_mostly = 5*HZ; +int net_msg_burst __read_mostly = 10; +int net_msg_warn __read_mostly = 1; +EXPORT_SYMBOL(net_msg_warn); -/* +/* * All net warning printk()s should be guarded by this function. - */ + */ int net_ratelimit(void) { return __printk_ratelimit(net_msg_cost, net_msg_burst); @@ -137,16 +139,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;