X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=net%2Fcore%2Futils.c;h=ac1d1fcf8673f63158691ee0004952b803206f84;hb=292dd876ee765c478b27c93cc51e93a558ed58bf;hp=88eb8b68e26b2c21b18a6e5f1256f24d6104d36c;hpb=c1b054d03f5b31c33eaa0b267c629b118eaf3790;p=linux-2.6 diff --git a/net/core/utils.c b/net/core/utils.c index 88eb8b68e2..ac1d1fcf86 100644 --- a/net/core/utils.c +++ b/net/core/utils.c @@ -16,7 +16,9 @@ #include #include #include +#include #include +#include #include #include #include @@ -160,7 +162,7 @@ EXPORT_SYMBOL(net_srandom); * is otherwise not dependent on the TCP/IP stack. */ -__u32 in_aton(const char *str) +__be32 in_aton(const char *str) { unsigned long l; unsigned int val; @@ -173,7 +175,7 @@ __u32 in_aton(const char *str) if (*str != '\0') { val = 0; - while (*str != '\0' && *str != '.') + while (*str != '\0' && *str != '.' && *str != '\n') { val *= 10; val += *str - '0';