45 lines
1.4 KiB
Diff
45 lines
1.4 KiB
Diff
https://bugs.gentoo.org/432998
|
|
|
|
snipped from OpenSUSE
|
|
|
|
From 19248f4207e55ecb1f5cdd9eb084f1a69470afaf Mon Sep 17 00:00:00 2001
|
|
From: Marius Tomaschewski <mt@suse.de>
|
|
Date: Thu, 5 Jan 2012 16:20:42 +0100
|
|
Subject: [PATCH] dhclient: parse_option_param: Bad format a
|
|
|
|
When the server provides options using the "a" array type, such as:
|
|
option rfc3442-classless-routes code 121 = array of unsigned integer 8;
|
|
the option is stored into the lease file, but when the client reads the
|
|
lease file next time, it complains about, because "a" array type aren't
|
|
recognized in the parsing loop and the option (lease?) discarded.
|
|
|
|
Signed-off-by: Marius Tomaschewski <mt@suse.de>
|
|
---
|
|
common/parse.c | 4 ++--
|
|
1 files changed, 2 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/common/parse.c b/common/parse.c
|
|
index 865522e..b4a821b 100644
|
|
--- a/common/parse.c
|
|
+++ b/common/parse.c
|
|
@@ -5409,7 +5409,7 @@ int parse_option_decl (oc, cfile)
|
|
/* Parse the option data... */
|
|
do {
|
|
for (fmt = option -> format; *fmt; fmt++) {
|
|
- if (*fmt == 'A')
|
|
+ if (*fmt == 'A' || *fmt == 'a')
|
|
break;
|
|
if (*fmt == 'o' && fmt != option -> format)
|
|
continue;
|
|
@@ -5623,7 +5623,7 @@ int parse_option_decl (oc, cfile)
|
|
}
|
|
}
|
|
token = next_token (&val, (unsigned *)0, cfile);
|
|
- } while (*fmt == 'A' && token == COMMA);
|
|
+ } while ((*fmt == 'A' || *fmt == 'a') && token == COMMA);
|
|
|
|
if (token != SEMI) {
|
|
parse_warn (cfile, "semicolon expected.");
|
|
--
|
|
1.7.7
|