diff options
author | hannes <hannes> | 2004-07-02 06:39:11 +0000 |
---|---|---|
committer | hannes <hannes> | 2004-07-02 06:39:11 +0000 |
commit | dcf276394747c51ef9bd01eb0c167835c365706f (patch) | |
tree | 7955bfee7245c2d92fca1f435c48e9f682386515 /print-gre.c | |
parent | 5e801bbe913307308bec980ccdb51efd73b0a55d (diff) | |
download | tcpdump-dcf276394747c51ef9bd01eb0c167835c365706f.tar.gz |
- print packet length even after no-payload frames
- from alex medvedev <alexm@pycckue.org>:
case ETHERTYPE_IPV6:
ip6_print(bp, len);
break;
needs a #ifdef INET6 around
Diffstat (limited to 'print-gre.c')
-rw-r--r-- | print-gre.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/print-gre.c b/print-gre.c index e7853085..ed4c957b 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.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 |