Page MenuHomeFreeBSD

D56356.diff
No OneTemporary

D56356.diff

diff --git a/sys/net/if_loop.c b/sys/net/if_loop.c
--- a/sys/net/if_loop.c
+++ b/sys/net/if_loop.c
@@ -350,9 +350,13 @@
m_freem(m);
return (EAFNOSUPPORT);
}
- if_inc_counter(ifp, IFCOUNTER_IPACKETS, 1);
- if_inc_counter(ifp, IFCOUNTER_IBYTES, m->m_pkthdr.len);
- netisr_queue(isr, m); /* mbuf is free'd on failure. */
+ if (netisr_queue(isr, m) == 0) {
+ if_inc_counter(ifp, IFCOUNTER_IPACKETS, 1);
+ if_inc_counter(ifp, IFCOUNTER_IBYTES, m->m_pkthdr.len);
+ } else {
+ /* mbuf is free'd on failure. */
+ if_inc_counter(ifp, IFCOUNTER_IQDROPS, 1);
+ }
return (0);
}

File Metadata

Mime Type
text/plain
Expires
Mon, Apr 20, 7:55 AM (3 h, 26 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31552832
Default Alt Text
D56356.diff (584 B)

Event Timeline