Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F153122834
D56356.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
584 B
Referenced Files
None
Subscribers
None
D56356.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D56356: loopback: Account for packet drops
Attached
Detach File
Event Timeline
Log In to Comment