Moved the updating of if_ibytes from ether_demux() to ether_input() to fix
a bug where the interface input bytes count wasn't updated when bridging is enabled. MFC after: 3 days
This commit is contained in:
parent
0c9755a23b
commit
05463bb58d
@ -421,6 +421,8 @@ ether_input(ifp, eh, m)
|
|||||||
bpf_mtap(ifp, (struct mbuf *)&mh);
|
bpf_mtap(ifp, (struct mbuf *)&mh);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ifp->if_ibytes += m->m_pkthdr.len + sizeof (*eh);
|
||||||
|
|
||||||
/* Handle ng_ether(4) processing, if any */
|
/* Handle ng_ether(4) processing, if any */
|
||||||
if (ng_ether_input_p != NULL) {
|
if (ng_ether_input_p != NULL) {
|
||||||
(*ng_ether_input_p)(ifp, &m, eh);
|
(*ng_ether_input_p)(ifp, &m, eh);
|
||||||
@ -506,7 +508,6 @@ ether_demux(ifp, eh, m)
|
|||||||
m_freem(m);
|
m_freem(m);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
ifp->if_ibytes += m->m_pkthdr.len + sizeof (*eh);
|
|
||||||
if (eh->ether_dhost[0] & 1) {
|
if (eh->ether_dhost[0] & 1) {
|
||||||
if (bcmp((caddr_t)etherbroadcastaddr, (caddr_t)eh->ether_dhost,
|
if (bcmp((caddr_t)etherbroadcastaddr, (caddr_t)eh->ether_dhost,
|
||||||
sizeof(etherbroadcastaddr)) == 0)
|
sizeof(etherbroadcastaddr)) == 0)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user