[syslinux:master] pxe: fix byte order of output from parse_dotquad()

syslinux-bot for H. Peter Anvin hpa at zytor.com
Mon Jul 19 23:45:02 PDT 2010


Commit-ID:  16834e092474b650ecd87bab2a6683a269b9f3ef
Gitweb:     http://syslinux.zytor.com/commit/16834e092474b650ecd87bab2a6683a269b9f3ef
Author:     H. Peter Anvin <hpa at zytor.com>
AuthorDate: Mon, 19 Jul 2010 23:42:41 -0700
Committer:  H. Peter Anvin <hpa at zytor.com>
CommitDate: Mon, 19 Jul 2010 23:42:41 -0700

pxe: fix byte order of output from parse_dotquad()

parse_dotquad() incorrectly returned output in host byte order.

Reported-by: Alexander Wuerstlein <arw at arw.name>
Signed-off-by: H. Peter Anvin <hpa at zytor.com>


---
 core/fs/pxe/pxe.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/core/fs/pxe/pxe.c b/core/fs/pxe/pxe.c
index 25bd094..0238ed4 100644
--- a/core/fs/pxe/pxe.c
+++ b/core/fs/pxe/pxe.c
@@ -245,7 +245,7 @@ static const char *parse_dotquad(const char *ip_str, uint32_t *res)
     }
     p--;
 
-    *res = ip;
+    *res = htonl(ip);
     return p;
 }
 



More information about the Syslinux-commits mailing list