summaryrefslogtreecommitdiffstats
path: root/extensions/libct_proto_icmp.c
diff options
context:
space:
mode:
Diffstat (limited to 'extensions/libct_proto_icmp.c')
-rw-r--r--extensions/libct_proto_icmp.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/extensions/libct_proto_icmp.c b/extensions/libct_proto_icmp.c
index f81c3b4..62ad00f 100644
--- a/extensions/libct_proto_icmp.c
+++ b/extensions/libct_proto_icmp.c
@@ -74,6 +74,9 @@ static int parse(char c,
nfct_set_attr_u8(ct,
ATTR_ICMP_TYPE,
atoi(optarg));
+
+ nfct_set_attr_u8(ct, ATTR_L4PROTO, IPPROTO_ICMP);
+
*flags |= ICMP_TYPE;
break;
case '2':
@@ -83,6 +86,9 @@ static int parse(char c,
nfct_set_attr_u8(ct,
ATTR_ICMP_CODE,
atoi(optarg));
+
+ nfct_set_attr_u8(ct, ATTR_L4PROTO, IPPROTO_ICMP);
+
*flags |= ICMP_CODE;
break;
case '3':
@@ -92,6 +98,9 @@ static int parse(char c,
nfct_set_attr_u16(ct,
ATTR_ICMP_ID,
htons(atoi(optarg)));
+
+ nfct_set_attr_u8(ct, ATTR_L4PROTO, IPPROTO_ICMP);
+
*flags |= ICMP_ID;
break;
}