]> The Tcpdump Group git mirrors - tcpdump/commitdiff
- print packet length even after no-payload frames
authorhannes <hannes>
Fri, 2 Jul 2004 06:39:11 +0000 (06:39 +0000)
committerhannes <hannes>
Fri, 2 Jul 2004 06:39:11 +0000 (06:39 +0000)
- from alex medvedev <[email protected]>:

  case ETHERTYPE_IPV6:
          ip6_print(bp, len);
          break;

  needs a #ifdef INET6 around

print-gre.c

index e785308546bf722d536c19eb63581430a5867a3d..ed4c957b661f1472e193fce8291e4202d05d1362 100644 (file)
@@ -38,7 +38,7 @@
 
 #ifndef lint
 static const char rcsid[] _U_ =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-gre.c,v 1.26 2004-06-29 08:12:06 hannes Exp $ (LBL)";
+    "@(#) $Header: /tcpdump/master/tcpdump/print-gre.c,v 1.27 2004-07-02 06:39:11 hannes Exp $ (LBL)";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -208,9 +208,11 @@ gre_print_0(const u_char *bp, u_int length)
        case ETHERTYPE_IP:
                ip_print(bp, len);
                break;
+#ifdef INET6
        case ETHERTYPE_IPV6:
                ip6_print(bp, len);
                break;
+#endif
        case ETHERTYPE_MPLS:
                mpls_print(bp, len);
                break;
@@ -280,10 +282,8 @@ gre_print_1(const u_char *bp, u_int length)
                len -= 4;
        }
 
-       if ((flags & GRE_SP) == 0) {
+       if ((flags & GRE_SP) == 0)
                printf(", no-payload");
-               return;
-       }
 
         if (eflag)
             printf(", proto %s (0x%04x)",
@@ -292,6 +292,9 @@ gre_print_1(const u_char *bp, u_int length)
 
         printf(", length %u",length);
 
+        if ((flags & GRE_SP) == 0)
+            return;
+
         if (vflag < 1)
             printf(": "); /* put in a colon as protocol demarc */
         else