From 3e3874a4e322536a683d2c22602c6c1a3f39df8e Mon Sep 17 00:00:00 2001 From: Marius Tomaschewski 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 --- common/parse.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/common/parse.c b/common/parse.c index 61488c1..0fca63c 100644 --- a/common/parse.c +++ b/common/parse.c @@ -5518,7 +5518,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; @@ -5732,7 +5732,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