From 4ded0f11d382c37a57c04077f453b3978eeded17 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Mon, 30 Jun 2008 14:57:08 +0200 Subject: libxt_TOS: make sure --set-tos value/mask is recognized Only when a 'stop' pointer is passed, the string may consist of more than just a number. Reported-by: Anonymous Signed-off-by: Jan Engelhardt Signed-off-by: Patrick McHardy --- extensions/tos_values.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/extensions/tos_values.c b/extensions/tos_values.c index 1630834e..4c0b0bcb 100644 --- a/extensions/tos_values.c +++ b/extensions/tos_values.c @@ -56,8 +56,9 @@ static bool tos_parse_symbolic(const char *str, struct tos_value_mask *tvm, { const unsigned int max = 255; const struct tos_symbol_info *symbol; + char *tmp; - if (strtonum(str, NULL, NULL, 0, max)) + if (strtonum(str, &tmp, NULL, 0, max)) return tos_parse_numeric(str, tvm, max); /* Do not consider ECN bits */ -- cgit v1.2.3