aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMitch Williams <mitch.a.williams@intel.com>2005-11-09 13:34:01 -0500
committerJohn W. Linville <linville@tuxdriver.com>2005-11-13 14:48:17 -0500
commit1e2e5659656b8b9bd9fa4714355d91282cb74178 (patch)
treedd7aa1b83de409743b21d9e71b3e8a1834ad6f67
parentcd52d1ee9a92587b242d946a2300a3245d3b885a (diff)
[PATCH] net: allow newline terminated IP addresses in in_aton
in_aton() gives weird results if it sees a newline at the end of the input. This patch makes it able to handle such input correctly. Signed-off-by: Mitch Williams <mitch.a.williams@intel.com> Acked-by: Jay Vosburgh <fubar@us.ibm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--net/core/utils.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/core/utils.c b/net/core/utils.c
index 7b5970fc9e40..587eb7787deb 100644
--- a/net/core/utils.c
+++ b/net/core/utils.c
@@ -175,7 +175,7 @@ __u32 in_aton(const char *str)
175 if (*str != '\0') 175 if (*str != '\0')
176 { 176 {
177 val = 0; 177 val = 0;
178 while (*str != '\0' && *str != '.') 178 while (*str != '\0' && *str != '.' && *str != '\n')
179 { 179 {
180 val *= 10; 180 val *= 10;
181 val += *str - '0'; 181 val += *str - '0';