summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJozsef Kadlecsik <kadlec@blackhole.kfki.hu>2011-11-16 22:49:01 +0100
committerJozsef Kadlecsik <kadlec@blackhole.kfki.hu>2011-11-16 22:49:01 +0100
commit7ced13f1beeb9c115627347a1fd27746f14eb3d8 (patch)
treea5289281a8560cfb41ca7a82ed219e355e02542c /lib
parent20125f0086b5fddcef9f909e6e4aab475552eaba (diff)
ICMP/ICMPv6 type/code parser bug fixed
The ICMP/ICMPv6 type/code parser swapped the type and code values. (Bug reported by Sabitov)
Diffstat (limited to 'lib')
-rw-r--r--lib/parse.c4
1 files 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;