summaryrefslogtreecommitdiffstats
path: root/src/conntrack/snprintf_xml.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/conntrack/snprintf_xml.c')
-rw-r--r--src/conntrack/snprintf_xml.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/conntrack/snprintf_xml.c b/src/conntrack/snprintf_xml.c
index b14ff43..cb6fc03 100644
--- a/src/conntrack/snprintf_xml.c
+++ b/src/conntrack/snprintf_xml.c
@@ -59,7 +59,8 @@ static char *proto2str[IPPROTO_MAX] = {
[IPPROTO_UDPLITE] = "udplite",
[IPPROTO_ICMP] = "icmp",
[IPPROTO_ICMPV6] = "icmp6",
- [IPPROTO_SCTP] = "sctp"
+ [IPPROTO_SCTP] = "sctp",
+ [IPPROTO_GRE] = "gre"
};
static char *l3proto2str[AF_MAX] = {
[AF_INET] = "ipv4",
@@ -177,6 +178,17 @@ static int __snprintf_proto_xml(char *buf,
BUFFER_SIZE(ret, size, len, offset);
}
break;
+ case IPPROTO_GRE:
+ if (type == __ADDR_SRC) {
+ ret = snprintf(buf, len, "<srckey>0x%x</srckey>",
+ ntohs(tuple->l4src.all));
+ BUFFER_SIZE(ret, size, len, offset);
+ } else {
+ ret = snprintf(buf, len, "<dstkey>%u</dstkey>",
+ ntohs(tuple->l4dst.all));
+ BUFFER_SIZE(ret, size, len, offset);
+ }
+ break;
}
return ret;