diff options
author | darrenr <darrenr@FreeBSD.org> | 2004-06-21 22:53:03 +0000 |
---|---|---|
committer | darrenr <darrenr@FreeBSD.org> | 2004-06-21 22:53:03 +0000 |
commit | a444d606d5af7d0dd9ff970754ad95595a3b64f3 (patch) | |
tree | 8c812415a26f6e084b0a0b81079b87781f9eb672 /contrib/ipfilter/ipmon.c | |
parent | ac063842a53f02c0a131cdb35e49e784a4d881ac (diff) | |
download | FreeBSD-src-a444d606d5af7d0dd9ff970754ad95595a3b64f3.zip FreeBSD-src-a444d606d5af7d0dd9ff970754ad95595a3b64f3.tar.gz |
Committ changes from 3.4.31 -> 3.4.35
* fix bug parsing port comparisons in proxy rules
* make parsing errors in ipf/ipnat return an error rather than return
indicating success.
* make parsing errors in ipf/ipnat return an error rather than return
indicating success.
* make ipfstat work as a set{g,u}id thing - gave up privs before opening
/dev/ipl
* fix ipfstat -A
* make "ipfstat -f" output more informative
* various changes to ipsend for sending packets with ipv4 options
* ipmon was not correctly calculating the length of the IPv6 packet (excluded
ipv6 header length)
MFC: 1 week
Diffstat (limited to 'contrib/ipfilter/ipmon.c')
-rw-r--r-- | contrib/ipfilter/ipmon.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/contrib/ipfilter/ipmon.c b/contrib/ipfilter/ipmon.c index 4f557ef..7919430 100644 --- a/contrib/ipfilter/ipmon.c +++ b/contrib/ipfilter/ipmon.c @@ -994,7 +994,7 @@ int blen; p = (u_short)ip6->ip6_nxt; s = (u_32_t *)&ip6->ip6_src; d = (u_32_t *)&ip6->ip6_dst; - plen = ntohs(ip6->ip6_plen); + plen = hl + ntohs(ip6->ip6_plen); #else sprintf(t, "ipv6"); goto printipflog; @@ -1108,11 +1108,12 @@ int blen; ipc->ip_hl << 2, i); t += strlen(t); if (ipoff & IP_OFFMASK) { - (void) sprintf(t, " frag %s%s%hu@%hu", - ipoff & IP_MF ? "+" : "", - ipoff & IP_DF ? "-" : "", + (void) sprintf(t, " (frag %d:%hu@%hu%s%s)", + ntohs(ipc->ip_id), i - (ipc->ip_hl<<2), - (ipoff & IP_OFFMASK) << 3); + (ipoff & IP_OFFMASK) << 3, + ipoff & IP_MF ? "+" : "", + ipoff & IP_DF ? "-" : ""); } } } @@ -1123,10 +1124,11 @@ int blen; hostname(res, v, d), proto, hl, plen); t += strlen(t); if (off & IP_OFFMASK) - (void) sprintf(t, " frag %s%s%hu@%hu", + (void) sprintf(t, " (frag %d:%hu@%hu%s%s)", + ntohs(ip->ip_id), + plen - hl, (off & IP_OFFMASK) << 3, ipoff & IP_MF ? "+" : "", - ipoff & IP_DF ? "-" : "", - plen - hl, (off & IP_OFFMASK) << 3); + ipoff & IP_DF ? "-" : ""); } t += strlen(t); |