[syslinux] [PATCH] pxe: fix OACK packet handling
liu Aleaxander
aleaxander at gmail.com
Sat Aug 8 09:10:46 PDT 2009
So, here is the new patch:
>From f7e36b4de4387f8662dbb88b550915a021e8f99b Mon Sep 17 00:00:00 2001
From: Liu Aleaxander <Aleaxander at gmail.com>
Date: Sat, 8 Aug 2009 16:05:08 +0800
Subject: [PATCH] core:PXELINUX: fix the OACK option parsing bug.
the current code can just handle one option beacuse I put the do-while loop
in the wrong position.
Signed-off-by: Liu Aleaxander <Aleaxander at gmail.com>
---
core/pxe.c | 26 +++++++++++++-------------
1 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/core/pxe.c b/core/pxe.c
index 81d3e23..bda1a54 100644
--- a/core/pxe.c
+++ b/core/pxe.c
@@ -928,20 +928,20 @@ static void pxe_searchdir(char *filename, struct file
*file)
if (*options == 0)
goto done;
- dst = src = options;
- while (buffersize--) {
- if (*src == 0)
- break; /* found a final null */
- *dst++ = *src++ | 0x20;
- if (!buffersize)
- goto done; /* found no final null */
- }
-
- /*
- * Parse option pointed to by options; guaranteed to be
null-terminated
- */
- p = options;
do {
+ dst = src = options;
+ while (buffersize--) {
+ if (*src == 0)
+ break; /* found a final null */
+ *dst++ = *src++ | 0x20;
+ if (!buffersize)
+ goto done; /* found no final null */
+ }
+
+ /*
+ * Parse option pointed to by options; guaranteed to be
null-terminated
+ */
+ p = options;
tftp_opt = tftp_options;
for (i = 0; i < tftp_opts; i++) {
if (!strncmp(p, tftp_opt->str_ptr,tftp_opt->str_len))
--
1.5.6.rc0
--
regards
liu Aleaxander
More information about the Syslinux
mailing list