]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-gre.c
Fix the pointer tests in the non-ndoified TTEST2() macro as well.
[tcpdump] / print-gre.c
index e785308546bf722d536c19eb63581430a5867a3d..106e6fd3111abd173fdd49418bbc18148047e821 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.28 2005-04-06 21:32:39 mcr Exp $ (LBL)";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -206,11 +206,13 @@ gre_print_0(const u_char *bp, u_int length)
 
        switch (prot) {
        case ETHERTYPE_IP:
-               ip_print(bp, len);
+               ip_print(gndo, bp, len);
                break;
+#ifdef INET6
        case ETHERTYPE_IPV6:
                ip6_print(bp, len);
                break;
+#endif
        case ETHERTYPE_MPLS:
                mpls_print(bp, len);
                break;
@@ -223,6 +225,9 @@ gre_print_0(const u_char *bp, u_int length)
        case ETHERTYPE_GRE_ISO:
                isoclns_print(bp, len, len);
                break;
+       case ETHERTYPE_TEB:
+               ether_print(bp, len, len, NULL, NULL);
+               break;
        default:
                printf("gre-proto-0x%x", prot);
        }
@@ -280,10 +285,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 +295,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