From 845dc5b01cefe918597061f3b0534fd2a7b4ee1d Mon Sep 17 00:00:00 2001 From: "/C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org" Date: Tue, 25 Mar 2008 14:32:49 +0000 Subject: This rather trivial patch adds ICMPv6 support for libnetfilter_conntrack, but only for the new API - deprecated/extensions was left unchanged. Signed-off-by: Krzysztof Oledzki --- src/conntrack/snprintf_default.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/conntrack/snprintf_default.c') diff --git a/src/conntrack/snprintf_default.c b/src/conntrack/snprintf_default.c index 675be7a..5811290 100644 --- a/src/conntrack/snprintf_default.c +++ b/src/conntrack/snprintf_default.c @@ -12,6 +12,7 @@ static char *proto2str[IPPROTO_MAX] = { [IPPROTO_UDP] = "udp", [IPPROTO_UDPLITE] = "udplite", [IPPROTO_ICMP] = "icmp", + [IPPROTO_ICMPV6] = "icmpv6", [IPPROTO_SCTP] = "sctp" }; @@ -144,7 +145,9 @@ int __snprintf_proto(char *buf, ntohs(tuple->l4src.tcp.port), ntohs(tuple->l4dst.tcp.port)); break; + case IPPROTO_ICMP: + case IPPROTO_ICMPV6: /* The ID only makes sense some ICMP messages but we want to * display the same output that /proc/net/ip_conntrack does */ return (snprintf(buf, len, "type=%d code=%d id=%d ", -- cgit v1.2.3