summaryrefslogtreecommitdiffstats
path: root/usr.sbin/tcpdump/print-ip.c
diff options
context:
space:
mode:
authorlteo <lteo@openbsd.org>2014-01-11 04:35:52 +0000
committerlteo <lteo@openbsd.org>2014-01-11 04:35:52 +0000
commitb2b5e59be16c5901db999da017e311c22743216c (patch)
treeaa2e9152a27560a32f44f64110d18873aadf02d5 /usr.sbin/tcpdump/print-ip.c
parentCheck the return value of fstat() in readmsg(). (diff)
downloadwireguard-openbsd-b2b5e59be16c5901db999da017e311c22743216c.tar.xz
wireguard-openbsd-b2b5e59be16c5901db999da017e311c22743216c.zip
Make icmp_print() accept the length variable, which is the length of the
packet without the IP header. This is needed by the next commit that will allow tcpdump to detect bad ICMP checksums. Related functions like {tcp,udp,icmp6}_print() already accept this length variable, so this change makes icmp_print() consistent with them as well. This commit makes no functional change to tcpdump itself. OK florian@
Diffstat (limited to 'usr.sbin/tcpdump/print-ip.c')
-rw-r--r--usr.sbin/tcpdump/print-ip.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/tcpdump/print-ip.c b/usr.sbin/tcpdump/print-ip.c
index dacbeef78e5..c3324980fef 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.36 2010/01/12 06:10:33 naddy Exp $ */
+/* $OpenBSD: print-ip.c,v 1.37 2014/01/11 04:35:52 lteo Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997
@@ -427,7 +427,7 @@ ip_print(register const u_char *bp, register u_int length)
break;
case IPPROTO_ICMP:
- icmp_print(cp, (const u_char *)ip);
+ icmp_print(cp, len, (const u_char *)ip);
break;
#ifndef IPPROTO_IGRP