summaryrefslogtreecommitdiffstats
path: root/sys/netinet
diff options
context:
space:
mode:
authorjoe <joe@FreeBSD.org>2000-10-29 01:05:09 +0000
committerjoe <joe@FreeBSD.org>2000-10-29 01:05:09 +0000
commit1ade5b1eab73d10a65241fbbd57c9c5fc68012c0 (patch)
tree76552212b318f1173f304e318d9402b7ce7993b5 /sys/netinet
parentcdd71a9d715a944e7fc2d70376e9a62ac5c0ab47 (diff)
downloadFreeBSD-src-1ade5b1eab73d10a65241fbbd57c9c5fc68012c0.zip
FreeBSD-src-1ade5b1eab73d10a65241fbbd57c9c5fc68012c0.tar.gz
Count per-address statistics for IP fragments.
Requested by: ru Obtained from: BSD/OS
Diffstat (limited to 'sys/netinet')
-rw-r--r--sys/netinet/ip_output.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/sys/netinet/ip_output.c b/sys/netinet/ip_output.c
index 7c166b7..ed3d873 100644
--- a/sys/netinet/ip_output.c
+++ b/sys/netinet/ip_output.c
@@ -934,10 +934,14 @@ sendorfree:
for (m = m0; m; m = m0) {
m0 = m->m_nextpkt;
m->m_nextpkt = 0;
- if (error == 0)
+ if (error == 0) {
+ /* Record statistics for this interface address. */
+ ia->ia_ifa.if_opackets++;
+ ia->ia_ifa.if_obytes += m->m_pkthdr.len;
+
error = (*ifp->if_output)(ifp, m,
(struct sockaddr *)dst, ro->ro_rt);
- else
+ } else
m_freem(m);
}
OpenPOWER on IntegriCloud