Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F98899435
D23477.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
713 B
Referenced Files
None
Subscribers
None
D23477.diff
View Options
diff --git a/sys/netgraph/ng_source.c b/sys/netgraph/ng_source.c
--- a/sys/netgraph/ng_source.c
+++ b/sys/netgraph/ng_source.c
@@ -284,7 +284,7 @@
NG_NODE_SET_PRIVATE(node, sc);
sc->node = node;
- sc->snd_queue.ifq_maxlen = 2048; /* XXX not checked */
+ sc->snd_queue.ifq_maxlen = 2048;
ng_callout_init(&sc->intr_ch);
return (0);
@@ -567,8 +567,11 @@
}
KASSERT(hook == sc->input, ("%s: no hook!", __func__));
- /* Enqueue packet. */
- /* XXX should we check IF_QFULL() ? */
+ /* Enqueue packet if the queue isn't full. */
+ if (_IF_QFULL(&sc->snd_queue)) {
+ NG_FREE_M(m);
+ return (ENOBUFS);
+ }
_IF_ENQUEUE(&sc->snd_queue, m);
sc->queueOctets += m->m_pkthdr.len;
sc->last_packet = m;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Oct 6, 5:23 AM (21 h, 50 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
13707069
Default Alt Text
D23477.diff (713 B)
Attached To
Mode
D23477: netgraph: If queue is full, don't enqueue in ng_source_rcvdata()
Attached
Detach File
Event Timeline
Log In to Comment