Print names for protocols that are supported by (Linux) conntrack
(DCCP, UDPLITE) and IGMP, which has been seen in logs.

Signed-off-by: Jarno Rajahalme <ja...@ovn.org>
---
 lib/ct-dpif.c |  3 +++
 lib/packets.h | 12 ++++++++++++
 2 files changed, 15 insertions(+)

diff --git a/lib/ct-dpif.c b/lib/ct-dpif.c
index 2cdecf6..8f0b4ed 100644
--- a/lib/ct-dpif.c
+++ b/lib/ct-dpif.c
@@ -202,6 +202,9 @@ ct_dpif_format_ipproto(struct ds *ds, uint16_t ipproto)
         : (ipproto == IPPROTO_TCP) ? "tcp"
         : (ipproto == IPPROTO_UDP) ? "udp"
         : (ipproto == IPPROTO_SCTP) ? "sctp"
+        : (ipproto == IPPROTO_UDPLITE) ? "udplite"
+        : (ipproto == IPPROTO_DCCP) ? "dccp"
+        : (ipproto == IPPROTO_IGMP) ? "igmp"
         : NULL;
 
     if (name) {
diff --git a/lib/packets.h b/lib/packets.h
index a5a483b..a4de7a5 100644
--- a/lib/packets.h
+++ b/lib/packets.h
@@ -591,6 +591,18 @@ char *ip_parse_cidr_len(const char *s, int *n, ovs_be32 
*ip,
 #define IPPROTO_SCTP 132
 #endif
 
+#ifndef IPPROTO_DCCP
+#define IPPROTO_DCCP 33
+#endif
+
+#ifndef IPPROTO_IGMP
+#define IPPROTO_IGMP 2
+#endif
+
+#ifndef IPPROTO_UDPLITE
+#define IPPROTO_UDPLITE 136
+#endif
+
 /* TOS fields. */
 #define IP_ECN_NOT_ECT 0x0
 #define IP_ECN_ECT_1 0x01
-- 
2.1.4

_______________________________________________
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to