diff options
author | tedu <tedu@openbsd.org> | 2004-02-26 20:48:29 +0000 |
---|---|---|
committer | tedu <tedu@openbsd.org> | 2004-02-26 20:48:29 +0000 |
commit | 9497624f1d65c13838673aa66842d00aaafa978b (patch) | |
tree | 6bc5606bb25c29f0a1212302da913f3745e0b9f9 /usr.sbin/mrinfo | |
parent | Deal correctly with printing interfaces with multiple trailing digits. (diff) | |
download | wireguard-openbsd-9497624f1d65c13838673aa66842d00aaafa978b.tar.xz wireguard-openbsd-9497624f1d65c13838673aa66842d00aaafa978b.zip |
fix datalen, from Esben Norby. ok deraadt itojun
Diffstat (limited to 'usr.sbin/mrinfo')
-rw-r--r-- | usr.sbin/mrinfo/mrinfo.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/mrinfo/mrinfo.c b/usr.sbin/mrinfo/mrinfo.c index 895a933cf5a..05b8ee76132 100644 --- a/usr.sbin/mrinfo/mrinfo.c +++ b/usr.sbin/mrinfo/mrinfo.c @@ -76,7 +76,7 @@ #ifndef lint static char rcsid[] = - "@(#) $OpenBSD: mrinfo.c,v 1.18 2003/11/26 01:17:12 millert Exp $"; + "@(#) $OpenBSD: mrinfo.c,v 1.19 2004/02/26 20:48:29 tedu Exp $"; /* original rcsid: "@(#) Header: mrinfo.c,v 1.6 93/04/08 15:14:16 van Exp (LBL)"; */ @@ -480,7 +480,7 @@ main(int argc, char *argv[]) src = ip->ip_src.s_addr; dst = ip->ip_dst.s_addr; iphdrlen = ip->ip_hl << 2; - ipdatalen = ntohs(ip->ip_len); + ipdatalen = ntohs(ip->ip_len) - iphdrlen; if (iphdrlen + ipdatalen != recvlen) { logit(LOG_WARNING, 0, "packet shorter (%u bytes) than " |