From 7ced13f1beeb9c115627347a1fd27746f14eb3d8 Mon Sep 17 00:00:00 2001 From: Jozsef Kadlecsik Date: Wed, 16 Nov 2011 22:49:01 +0100 Subject: ICMP/ICMPv6 type/code parser bug fixed The ICMP/ICMPv6 type/code parser swapped the type and code values. (Bug reported by Sabitov) --- lib/parse.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/parse.c b/lib/parse.c index 3ca702c..eeb253c 100644 --- a/lib/parse.c +++ b/lib/parse.c @@ -391,8 +391,8 @@ parse_icmp_typecode(struct ipset_session *session, str, family); } *a++ = '\0'; - if ((err = string_to_u8(session, a, &type)) != 0 || - (err = string_to_u8(session, tmp, &code)) != 0) + if ((err = string_to_u8(session, tmp, &type)) != 0 || + (err = string_to_u8(session, a, &code)) != 0) goto error; typecode = (type << 8) | code; -- cgit v1.2.3