]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-icmp.c
Correctly check for various values of the ICMP type field.
[tcpdump] / print-icmp.c
index d9b8c8eedc12cd034f1c41152843e614f6755913..36bff6a41214c217d54560c7ca46cd75f406f2a2 100644 (file)
@@ -21,7 +21,7 @@
 
 #ifndef lint
 static const char rcsid[] _U_ =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-icmp.c,v 1.85 2006-12-12 14:31:51 hannes Exp $ (LBL)";
+    "@(#) $Header: /tcpdump/master/tcpdump/print-icmp.c,v 1.87 2007-09-13 17:42:31 guy Exp $ (LBL)";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -300,9 +300,6 @@ struct icmp_ext_t {
     u_int8_t icmp_ext_data[1];
 };
 
-struct icmp_mpls_ext_common_header_t {
-};
-
 struct icmp_mpls_ext_object_header_t {
     u_int8_t length[2];
     u_int8_t class_num;
@@ -415,7 +412,7 @@ icmp_print(const u_char *bp, u_int plen, const u_char *bp2, int fragmented)
                case ICMP_UNREACH_NEEDFRAG:
                    {
                        register const struct mtu_discovery *mp;
-                       mp = (struct mtu_discovery *)&dp->icmp_void;
+                       mp = (struct mtu_discovery *)(u_char *)&dp->icmp_void;
                        mtu = EXTRACT_16BITS(&mp->nexthopmtu);
                        if (mtu) {
                                (void)snprintf(buf, sizeof(buf),