Marius Tomaschewski
1071b12d06
without any IPv4 address assigned (bnc#631305, reported upsteam as [ISC-Bugs #22409]). - Fixed a common infinite loop while parsing options with optional parts in the value such as in slp-service-scope option (bnc#643845, reported upsteam as [ISC-Bugs #22410]). - Fixed init scripts to report correct LSB codes in status action, when the config file or the binary do not exists (bnc#640336). - Fixed syntax of a check in the rcdhcrelay[6] (bnc#648580) - Avoid pid check error message in the rcdhcpd[6] (bnc#646875) OBS-URL: https://build.opensuse.org/package/show/network:dhcp/dhcp?expand=0&rev=38
47 lines
1.2 KiB
Diff
47 lines
1.2 KiB
Diff
From 912eb17103f764ef4486b30a4801af64321a23ed Mon Sep 17 00:00:00 2001
|
|
From: Marius Tomaschewski <mt@suse.de>
|
|
Date: Fri, 29 Oct 2010 18:51:02 +0200
|
|
Subject: [PATCH] dhcp-4.1.1-P1-optional-value-infinite-loop
|
|
|
|
Fixed dhcp server infinite loop while parsing options with optional
|
|
parts in the value such as in slp-service-scope option (bnc#643845,
|
|
[ISC-Bugs #22410]).
|
|
|
|
Signed-off-by: Marius Tomaschewski <mt@suse.de>
|
|
---
|
|
common/parse.c | 17 ++++++++++++++++-
|
|
1 files changed, 16 insertions(+), 1 deletions(-)
|
|
|
|
diff --git a/common/parse.c b/common/parse.c
|
|
index 34b909a..081dcc9 100644
|
|
--- a/common/parse.c
|
|
+++ b/common/parse.c
|
|
@@ -4931,8 +4931,23 @@ struct option *option;
|
|
do {
|
|
if ((*fmt == 'A') || (*fmt == 'a'))
|
|
break;
|
|
- if (*fmt == 'o')
|
|
+ if (*fmt == 'o') {
|
|
+ /* previous value were optional */
|
|
+ fmt++;
|
|
continue;
|
|
+ }
|
|
+ if (fmt[1] == 'o') {
|
|
+ /*
|
|
+ * value for current format code is optional
|
|
+ * check if the next token is a semicolon;
|
|
+ * it is expected to be read by our caller.
|
|
+ */
|
|
+ token = peek_token (&val, (unsigned *)0, cfile);
|
|
+ if (token == SEMI) {
|
|
+ fmt++;
|
|
+ continue;
|
|
+ }
|
|
+ }
|
|
|
|
tmp = *expr;
|
|
*expr = NULL;
|
|
--
|
|
1.7.1
|
|
|