Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F147361313
D53283.id164821.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
D53283.id164821.diff
View Options
diff --git a/sys/netpfil/ipfilter/netinet/ip_htable.c b/sys/netpfil/ipfilter/netinet/ip_htable.c
--- a/sys/netpfil/ipfilter/netinet/ip_htable.c
+++ b/sys/netpfil/ipfilter/netinet/ip_htable.c
@@ -96,6 +96,7 @@
u_long ipf_nhtnodes[LOOKUP_POOL_SZ];
iphtable_t *ipf_htables[LOOKUP_POOL_SZ];
iphtent_t *ipf_node_explist;
+ ipftunable_t *ipf_htable_tune;
} ipf_htable_softc_t;
ipf_lookup_t ipf_htable_backend = {
@@ -122,6 +123,14 @@
};
+static ipftuneable_t ipf_htable_tunables[] = {
+ { { NULL },
+ NULL,
+ 0,
+ 0, NULL, NULL }
+};
+
+
/* ------------------------------------------------------------------------ */
/* Function: ipf_htable_soft_create */
/* Returns: void * - NULL = failure, else pointer to local context */
@@ -142,6 +151,18 @@
bzero((char *)softh, sizeof(*softh));
+ softh->ipf_htable_tune = ipf_tune_array_copy(softh,
+ sizeof(ipf_htable_tunables),
+ ipf_htable_tunables);
+ if (softh->ipf_htable_tune == NULL) {
+ ipf_soft_destroy(softc, softh);
+ return (NULL);
+ }
+ if (ipf_tune_array_link(softc, softh->ipf_htable_tune) == -1) {
+ ipf_soft_destroy(softc, softh);
+ return (NULL);
+ }
+
return (softh);
}
@@ -160,6 +181,12 @@
{
ipf_htable_softc_t *softh = arg;
+ if (softh->ipf_htable_tune != NULL) {
+ ipf_tune_array_unlink(softc, softh->ipf_htable_tune);
+ KFREES(softh->ipf_htable_tune, sizeof(ipf_htable_tuneables));
+ softh->ipf_htable_tune = NULL;
+ }
+
KFREE(softh);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Mar 11, 8:06 AM (8 h, 53 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29523547
Default Alt Text
D53283.id164821.diff (1 KB)
Attached To
Mode
D53283: ipfilter: Add htable (hash table) tunable
Attached
Detach File
Event Timeline
Log In to Comment