diff options
author | luigi <luigi@FreeBSD.org> | 2009-06-05 12:49:54 +0000 |
---|---|---|
committer | luigi <luigi@FreeBSD.org> | 2009-06-05 12:49:54 +0000 |
commit | c59f82aeabade67bd57b0159a726a03503021d92 (patch) | |
tree | d7c7243f6c266e61a6be37340fb69e00f083e634 /sys/netinet | |
parent | 8a4e071b7271a82ac39476786b0281f970445da9 (diff) | |
download | FreeBSD-src-c59f82aeabade67bd57b0159a726a03503021d92.zip FreeBSD-src-c59f82aeabade67bd57b0159a726a03503021d92.tar.gz |
Small changes (no actual code changes) in preparation of moving ipfw-related
stuff to its own directory, and cleaning headers and dependencies:
In this commit:
+ remove one use of a typedef;
+ document dn_rule_delete();
+ replace one usage of the DUMMYNET_LOADED macro with its value;
No MFC planned until the cleanup is complete.
Diffstat (limited to 'sys/netinet')
-rw-r--r-- | sys/netinet/ip_dummynet.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/sys/netinet/ip_dummynet.c b/sys/netinet/ip_dummynet.c index 5816be9..2f11ae0 100644 --- a/sys/netinet/ip_dummynet.c +++ b/sys/netinet/ip_dummynet.c @@ -242,7 +242,7 @@ static void dummynet(void *); static void dummynet_flush(void); static void dummynet_send(struct mbuf *); void dummynet_drain(void); -static ip_dn_io_t dummynet_io; +static int dummynet_io(struct mbuf **, int , struct ip_fw_args *); static void dn_rule_delete(void *); /* @@ -1638,9 +1638,11 @@ dn_rule_delete_fs(struct dn_flow_set *fs, void *r) pkt->rule = ip_fw_default_rule ; } } + /* - * when a firewall rule is deleted, scan all queues and remove the flow-id - * from packets matching this rule. + * When a firewall rule is deleted, scan all queues and remove the pointer + * to the rule from matching packets, making them point to the default rule. + * The pointer is used to reinject packets in case one_pass = 0. */ void dn_rule_delete(void *r) @@ -2337,7 +2339,7 @@ dummynet_modevent(module_t mod, int type, void *data) switch (type) { case MOD_LOAD: - if (DUMMYNET_LOADED) { + if (ip_dn_io_ptr) { printf("DUMMYNET already loaded\n"); return EEXIST ; } |