]> The Tcpdump Group git mirrors - tcpdump/commitdiff
Dismiss unused IPPROTO_CARP.
authorDenis Ovsienko <[email protected]>
Sun, 27 Aug 2017 11:19:59 +0000 (12:19 +0100)
committerDenis Ovsienko <[email protected]>
Sun, 27 Aug 2017 13:16:34 +0000 (14:16 +0100)
In ipproto_values[] IPPROTO_CARP never matched because of IPPROTO_VRRP,
which matched earlier. Remove the array element and the macro and leave
some comments instead.

ipproto.c
ipproto.h

index 74a75d457799d0458ad1cb1b2f3f065edf42b2bc..8083da517b6e7febeb176bd865b07d3f3d43965f 100644 (file)
--- a/ipproto.c
+++ b/ipproto.c
@@ -46,11 +46,10 @@ const struct tok ipproto_values[] = {
     { IPPROTO_OSPF, "OSPF" },
     { IPPROTO_PIM, "PIM" },
     { IPPROTO_IPCOMP, "Compressed IP" },
     { IPPROTO_OSPF, "OSPF" },
     { IPPROTO_PIM, "PIM" },
     { IPPROTO_IPCOMP, "Compressed IP" },
-    { IPPROTO_VRRP, "VRRP" },
+    { IPPROTO_VRRP, "VRRP" }, /* See also CARP. */
     { IPPROTO_PGM, "PGM" },
     { IPPROTO_SCTP, "SCTP" },
     { IPPROTO_MOBILITY, "Mobility" },
     { IPPROTO_PGM, "PGM" },
     { IPPROTO_SCTP, "SCTP" },
     { IPPROTO_MOBILITY, "Mobility" },
-    { IPPROTO_CARP, "CARP" },
     { 0, NULL }
 };
 
     { 0, NULL }
 };
 
index 75def3d85f01b6e4a973f8a91d552072f57fbe1a..ac6fd2cb15ece142903eaceedf39a7cc87d39e92 100644 (file)
--- a/ipproto.h
+++ b/ipproto.h
@@ -129,10 +129,7 @@ extern const struct tok ipproto_values[];
 #define IPPROTO_IPCOMP         108
 #endif
 #ifndef IPPROTO_VRRP
 #define IPPROTO_IPCOMP         108
 #endif
 #ifndef IPPROTO_VRRP
-#define IPPROTO_VRRP           112
-#endif
-#ifndef IPPROTO_CARP
-#define IPPROTO_CARP           112
+#define IPPROTO_VRRP           112 /* See also CARP. */
 #endif
 #ifndef IPPROTO_PGM
 #define IPPROTO_PGM             113
 #endif
 #ifndef IPPROTO_PGM
 #define IPPROTO_PGM             113