mirror of
https://github.com/opnsense/src.git
synced 2026-06-09 00:32:25 -04:00
Count per-address statistics for IP fragments.
Requested by: ru Obtained from: BSD/OS
This commit is contained in:
parent
19c34d1596
commit
fe93767490
2 changed files with 12 additions and 2 deletions
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue