[syslinux] [PATCH] Fix byte order of plain IP addresses in TFTP URLs and old TFTP syntax
Alexander Wuerstlein
arw at arw.name
Mon Jul 19 18:52:28 PDT 2010
Signed-off-by: Alexander Wuerstlein <arw at arw.name>
---
core/fs/pxe/pxe.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/core/fs/pxe/pxe.c b/core/fs/pxe/pxe.c
index 25bd094..7562b95 100644
--- a/core/fs/pxe/pxe.c
+++ b/core/fs/pxe/pxe.c
@@ -703,6 +703,8 @@ static void pxe_searchdir(const char *filename, struct file *file)
buf = stpcpy(buf, np+2);
if (parse_dotquad(filename, &ip) != np)
ip = dns_resolv(filename);
+ else
+ ip = htonl(ip);
break;
case PXE_URL_TFTP:
@@ -712,6 +714,8 @@ static void pxe_searchdir(const char *filename, struct file *file)
if (np > filename + 7) {
if (parse_dotquad(filename + 7, &ip) != np)
ip = dns_resolv(filename + 7);
+ else
+ ip = htonl(ip);
}
if (*np == ':') {
np++;
--
1.6.3.3
More information about the Syslinux
mailing list