diff options
author | dlg <dlg@openbsd.org> | 2019-09-19 23:23:58 +0000 |
---|---|---|
committer | dlg <dlg@openbsd.org> | 2019-09-19 23:23:58 +0000 |
commit | 1e14b8a65fc56eddf941b689db9239153f8a81be (patch) | |
tree | dda8374e371b362a77fbef2428768961be041968 /usr.sbin/tcpdump | |
parent | Add RK3328 GMAC clocks. (diff) | |
download | wireguard-openbsd-1e14b8a65fc56eddf941b689db9239153f8a81be.tar.xz wireguard-openbsd-1e14b8a65fc56eddf941b689db9239153f8a81be.zip |
print the IPs on ESP packets.
this was lost when tcpdump learnt to look inside udpencap.
found by, and ok markus@
Diffstat (limited to 'usr.sbin/tcpdump')
-rw-r--r-- | usr.sbin/tcpdump/print-ip.c | 5 | ||||
-rw-r--r-- | usr.sbin/tcpdump/print-ip6.c | 4 |
2 files changed, 6 insertions, 3 deletions
diff --git a/usr.sbin/tcpdump/print-ip.c b/usr.sbin/tcpdump/print-ip.c index 5d6d8735110..b4e17f29b97 100644 --- a/usr.sbin/tcpdump/print-ip.c +++ b/usr.sbin/tcpdump/print-ip.c @@ -1,4 +1,4 @@ -/* $OpenBSD: print-ip.c,v 1.51 2018/10/22 16:12:45 kn Exp $ */ +/* $OpenBSD: print-ip.c,v 1.52 2019/09/19 23:23:58 dlg Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997 @@ -472,6 +472,9 @@ ip_print(const u_char *bp, u_int length) #define IPPROTO_ESP 50 #endif case IPPROTO_ESP: + (void)printf("%s > %s: ", + ipaddr_string(&ip->ip_src), + ipaddr_string(&ip->ip_dst)); esp_print(cp, len, (const u_char *)ip); break; diff --git a/usr.sbin/tcpdump/print-ip6.c b/usr.sbin/tcpdump/print-ip6.c index 615742d71d5..b82128280c6 100644 --- a/usr.sbin/tcpdump/print-ip6.c +++ b/usr.sbin/tcpdump/print-ip6.c @@ -1,4 +1,4 @@ -/* $OpenBSD: print-ip6.c,v 1.28 2018/10/22 16:12:45 kn Exp $ */ +/* $OpenBSD: print-ip6.c,v 1.29 2019/09/19 23:23:58 dlg Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1991, 1992, 1993, 1994 @@ -117,7 +117,7 @@ ip6_print(const u_char *bp, u_int length) #endif if (cp == (u_char *)(ip6 + 1) && nh != IPPROTO_TCP && nh != IPPROTO_UDP && - nh != IPPROTO_ESP && nh != IPPROTO_AH && + nh != IPPROTO_AH && (vflag || (nh != IPPROTO_IPV4 && nh != IPPROTO_IPV6))) { (void)printf("%s > %s: ", ip6addr_string(&ip6->ip6_src), ip6addr_string(&ip6->ip6_dst)); |