All of lore.kernel.org
 help / color / mirror / Atom feed
* libxt_TOS: make sure --set-tos value/mask is recognized
@ 2008-06-27 20:09 Jan Engelhardt
  2008-06-30 12:57 ` Patrick McHardy
  0 siblings, 1 reply; 2+ messages in thread
From: Jan Engelhardt @ 2008-06-27 20:09 UTC (permalink / raw)
  To: kaber; +Cc: Netfilter Developer Mailing List

commit d30191dd6ea9e13a7a7340004872f027aa7d4d5c
Author: Jan Engelhardt <jengelh@medozas.de>
Date:   Fri Jun 27 22:00:11 2008 +0200

    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 <jengelh@medozas.de>
---
 extensions/tos_values.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/extensions/tos_values.c b/extensions/tos_values.c
index 1630834..4c0b0bc 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 */


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-06-30 12:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-27 20:09 libxt_TOS: make sure --set-tos value/mask is recognized Jan Engelhardt
2008-06-30 12:57 ` Patrick McHardy

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.