pxe: fix byte order of output from parse_dotquad()
authorH. Peter Anvin <hpa@zytor.com>
Tue, 20 Jul 2010 06:42:41 +0000 (23:42 -0700)
committerH. Peter Anvin <hpa@zytor.com>
Tue, 20 Jul 2010 06:42:41 +0000 (23:42 -0700)
parse_dotquad() incorrectly returned output in host byte order.

Reported-by: Alexander Wuerstlein <arw@arw.name>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
core/fs/pxe/pxe.c

index 25bd094..0238ed4 100644 (file)
@@ -245,7 +245,7 @@ static const char *parse_dotquad(const char *ip_str, uint32_t *res)
     }
     p--;
 
-    *res = ip;
+    *res = htonl(ip);
     return p;
 }