X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/32db3d2be241b76e47a8c6929906422329bcd965..01fe0ebe27b2fe957f699ffa4dbdedc46e12f85b:/print-gre.c diff --git a/print-gre.c b/print-gre.c index e7853085..55f0e9d1 100644 --- a/print-gre.c +++ b/print-gre.c @@ -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; @@ -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