Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F153247898
D18885.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D18885.diff
View Options
Index: head/sys/netinet/siftr.c
===================================================================
--- head/sys/netinet/siftr.c
+++ head/sys/netinet/siftr.c
@@ -1219,7 +1219,7 @@
if ((s = sbuf_new(NULL, NULL, 200, SBUF_AUTOEXTEND)) == NULL)
return (-1);
- if (action == SIFTR_ENABLE) {
+ if (action == SIFTR_ENABLE && siftr_pkt_manager_thr == NULL) {
/*
* Create our alq
* XXX: We should abort if alq_open fails!
@@ -1424,7 +1424,8 @@
alq_close(siftr_alq);
siftr_alq = NULL;
- }
+ } else
+ error = EINVAL;
sbuf_delete(s);
@@ -1445,13 +1446,15 @@
new = siftr_enabled;
error = sysctl_handle_int(oidp, &new, 0, req);
- if (error != 0 && req->newptr != NULL) {
+ if (error == 0 && req->newptr != NULL) {
if (new > 1)
return (EINVAL);
else if (new != siftr_enabled) {
- error = siftr_manage_ops(new);
- if (error != 0)
+ if ((error = siftr_manage_ops(new)) == 0) {
+ siftr_enabled = new;
+ } else {
siftr_manage_ops(SIFTR_DISABLE);
+ }
}
}
@@ -1462,7 +1465,9 @@
static void
siftr_shutdown_handler(void *arg)
{
- siftr_manage_ops(SIFTR_DISABLE);
+ if (siftr_enabled == 1) {
+ siftr_manage_ops(SIFTR_DISABLE);
+ }
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Apr 21, 1:30 AM (13 h, 41 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31877451
Default Alt Text
D18885.diff (1 KB)
Attached To
Mode
D18885: Make SIFTR work again
Attached
Detach File
Event Timeline
Log In to Comment