diff options
author | dlg <dlg@openbsd.org> | 2019-04-05 00:59:24 +0000 |
---|---|---|
committer | dlg <dlg@openbsd.org> | 2019-04-05 00:59:24 +0000 |
commit | 4575e0277e8faac66ace9adf5eccf602b75e5576 (patch) | |
tree | 2d84b58bea843ad5126c3747e1a1fab5a376e776 /usr.sbin/tcpdump/print-gre.c | |
parent | support printing cdp over gre and ppp (diff) | |
download | wireguard-openbsd-4575e0277e8faac66ace9adf5eccf602b75e5576.tar.xz wireguard-openbsd-4575e0277e8faac66ace9adf5eccf602b75e5576.zip |
print the gre protocol number as hex when vflag is enabled
this is useful for telling the MPLSes apart, and generally understanding
what you're seeing.
Diffstat (limited to 'usr.sbin/tcpdump/print-gre.c')
-rw-r--r-- | usr.sbin/tcpdump/print-gre.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.sbin/tcpdump/print-gre.c b/usr.sbin/tcpdump/print-gre.c index a1ed13d3392..f2529584954 100644 --- a/usr.sbin/tcpdump/print-gre.c +++ b/usr.sbin/tcpdump/print-gre.c @@ -1,4 +1,4 @@ -/* $OpenBSD: print-gre.c,v 1.24 2019/04/05 00:57:59 dlg Exp $ */ +/* $OpenBSD: print-gre.c,v 1.25 2019/04/05 00:59:24 dlg Exp $ */ /* * Copyright (c) 2002 Jason L. Wright (jason@thought.net) @@ -147,6 +147,9 @@ gre_print_0(const u_char *p, u_int length) l -= sizeof(proto); length -= sizeof(proto); + if (vflag) + printf(" %04x", proto); + if ((flags & GRE_CP) | (flags & GRE_RP)) { if (l < 2) goto trunc; |