summaryrefslogtreecommitdiffstats
path: root/src/conntrack/build.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/conntrack/build.c')
-rw-r--r--src/conntrack/build.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/conntrack/build.c b/src/conntrack/build.c
index 37dded0..cf65ef3 100644
--- a/src/conntrack/build.c
+++ b/src/conntrack/build.c
@@ -55,6 +55,7 @@ void __build_tuple_proto(struct nfnlhdr *req,
nfnl_addattr_l(&req->nlh, size, CTA_PROTO_DST_PORT,
&t->l4dst.tcp.port, sizeof(u_int16_t));
break;
+
case IPPROTO_ICMP:
nfnl_addattr_l(&req->nlh, size, CTA_PROTO_ICMP_CODE,
&t->l4dst.icmp.code, sizeof(u_int8_t));
@@ -63,6 +64,16 @@ void __build_tuple_proto(struct nfnlhdr *req,
nfnl_addattr_l(&req->nlh, size, CTA_PROTO_ICMP_ID,
&t->l4src.icmp.id, sizeof(u_int16_t));
break;
+
+ case IPPROTO_ICMPV6:
+ nfnl_addattr_l(&req->nlh, size, CTA_PROTO_ICMPV6_CODE,
+ &t->l4dst.icmp.code, sizeof(u_int8_t));
+ nfnl_addattr_l(&req->nlh, size, CTA_PROTO_ICMPV6_TYPE,
+ &t->l4dst.icmp.type, sizeof(u_int8_t));
+ nfnl_addattr_l(&req->nlh, size, CTA_PROTO_ICMPV6_ID,
+ &t->l4src.icmp.id, sizeof(u_int16_t));
+ break;
+
default:
break;
}