diff options
author | luigi <luigi@FreeBSD.org> | 2010-03-21 15:54:07 +0000 |
---|---|---|
committer | luigi <luigi@FreeBSD.org> | 2010-03-21 15:54:07 +0000 |
commit | 2122ae15e70fb63714472344edce419cb7aaf3f8 (patch) | |
tree | af035d6aebd2227826feba60ff40e943ce1639bd /sys/netinet/ipfw | |
parent | 8cf7b4ad59c52ca8f16dbba87df917461a19309f (diff) | |
download | FreeBSD-src-2122ae15e70fb63714472344edce419cb7aaf3f8.zip FreeBSD-src-2122ae15e70fb63714472344edce419cb7aaf3f8.tar.gz |
no need for ipfw_flush_tables(), we just need ipfw_destroy_tables()
Diffstat (limited to 'sys/netinet/ipfw')
-rw-r--r-- | sys/netinet/ipfw/ip_fw_private.h | 1 | ||||
-rw-r--r-- | sys/netinet/ipfw/ip_fw_table.c | 23 |
2 files changed, 6 insertions, 18 deletions
diff --git a/sys/netinet/ipfw/ip_fw_private.h b/sys/netinet/ipfw/ip_fw_private.h index 633f98f..c29ae0a 100644 --- a/sys/netinet/ipfw/ip_fw_private.h +++ b/sys/netinet/ipfw/ip_fw_private.h @@ -274,7 +274,6 @@ int ipfw_lookup_table(struct ip_fw_chain *ch, uint16_t tbl, in_addr_t addr, int ipfw_init_tables(struct ip_fw_chain *ch); void ipfw_destroy_tables(struct ip_fw_chain *ch); int ipfw_flush_table(struct ip_fw_chain *ch, uint16_t tbl); -void ipfw_flush_tables(struct ip_fw_chain *ch); int ipfw_add_table_entry(struct ip_fw_chain *ch, uint16_t tbl, in_addr_t addr, uint8_t mlen, uint32_t value); int ipfw_dump_table_entry(struct radix_node *rn, void *arg); diff --git a/sys/netinet/ipfw/ip_fw_table.c b/sys/netinet/ipfw/ip_fw_table.c index 5c2369d..517622f 100644 --- a/sys/netinet/ipfw/ip_fw_table.c +++ b/sys/netinet/ipfw/ip_fw_table.c @@ -176,14 +176,18 @@ ipfw_flush_table(struct ip_fw_chain *ch, uint16_t tbl) } void -ipfw_flush_tables(struct ip_fw_chain *ch) +ipfw_destroy_tables(struct ip_fw_chain *ch) { uint16_t tbl; + struct radix_node_head *rnh; IPFW_WLOCK_ASSERT(ch); - for (tbl = 0; tbl < IPFW_TABLES_MAX; tbl++) + for (tbl = 0; tbl < IPFW_TABLES_MAX; tbl++) { ipfw_flush_table(ch, tbl); + rnh = ch->tables[tbl]; + rn_detachhead((void **)&rnh); + } } int @@ -203,21 +207,6 @@ ipfw_init_tables(struct ip_fw_chain *ch) return (0); } -void -ipfw_destroy_tables(struct ip_fw_chain *ch) -{ - int tbl; - struct radix_node_head *rnh; - - IPFW_WLOCK_ASSERT(ch); - - ipfw_flush_tables(ch); - for (tbl = 0; tbl < IPFW_TABLES_MAX; tbl++) { - rnh = ch->tables[tbl]; - rn_detachhead((void **)&rnh); - } -} - int ipfw_lookup_table(struct ip_fw_chain *ch, uint16_t tbl, in_addr_t addr, uint32_t *val) |