diff options
author | David Gwynne <dlg@cvs.openbsd.org> | 2018-07-03 06:56:53 +0000 |
---|---|---|
committer | David Gwynne <dlg@cvs.openbsd.org> | 2018-07-03 06:56:53 +0000 |
commit | 3dcdd9268bc84789618acb36fa3d748d851cf39c (patch) | |
tree | cb79e73612196aaad5aa7be6ac032f23211e8444 | |
parent | 3ef74ac296e2700938c665549b2f152e480ffd02 (diff) |
handle gre-in-udp traffic
ok deraadt@
-rw-r--r-- | usr.sbin/tcpdump/print-udp.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/usr.sbin/tcpdump/print-udp.c b/usr.sbin/tcpdump/print-udp.c index 89f97889537..167299cac11 100644 --- a/usr.sbin/tcpdump/print-udp.c +++ b/usr.sbin/tcpdump/print-udp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: print-udp.c,v 1.40 2015/12/22 21:01:07 mmcc Exp $ */ +/* $OpenBSD: print-udp.c,v 1.41 2018/07/03 06:56:52 dlg Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996 @@ -374,6 +374,7 @@ static int udp6_cksum(const struct ip6_hdr *ip6, const struct udphdr *up, #define GTP_U_PORT 2152 #define GTP_PRIME_PORT 3386 #define UDPENCAP_PORT 4500 /*XXX*/ +#define GRE_PORT 4754 #define MULTICASTDNS_PORT 5353 #ifdef INET6 @@ -640,6 +641,10 @@ udp_print(const u_char *bp, u_int length, const u_char *bp2) iapp_print((const u_char *)(up + 1), length); else if (ISPORT(VQP_PORT)) vqp_print((const u_char *)(up + 1), length); + else if (ISPORT(GRE_PORT)) { + printf(" "); + gre_print((const u_char *)(up + 1), length); + } #ifdef INET6 else if (ISPORT(RIPNG_PORT)) ripng_print((const u_char *)(up + 1), length); |