From: Jozsef Kadlecsik Date: Wed, 16 Nov 2011 21:49:01 +0000 (+0100) Subject: ICMP/ICMPv6 type/code parser bug fixed X-Git-Tag: v6.10~2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7ced13f1beeb9c115627347a1fd27746f14eb3d8;p=ipset ICMP/ICMPv6 type/code parser bug fixed The ICMP/ICMPv6 type/code parser swapped the type and code values. (Bug reported by Sabitov) --- 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;