Count per-address statistics for IP fragments.

Requested by:	ru
Obtained from:	BSD/OS
This commit is contained in:
Josef Karthauser 2000-10-29 01:05:09 +00:00
parent 19c34d1596
commit fe93767490
2 changed files with 12 additions and 2 deletions

View file

@ -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);
}

View file

@ -1012,6 +1012,12 @@ sendorfree:
m0 = m->m_nextpkt;
m->m_nextpkt = 0;
if (error == 0) {
/* Record statistics for this interface address. */
if (ia) {
ia->ia_ifa.if_opackets++;
ia->ia_ifa.if_obytes += m->m_pkthdr.len;
}
error = nd6_output(ifp, origifp, m, dst, ro->ro_rt);
} else
m_freem(m);