From b090e4ce1fdb46e8611694a6aff35b2f130d4763 Mon Sep 17 00:00:00 2001 From: Gleb Smirnoff Date: Tue, 29 Nov 2005 08:59:41 +0000 Subject: Garbage-collect now unused struct _ipfw_insn_pipe and flush_pipe_ptrs(), thus removing a few XXXes. Document the ABI breakage in UPDATING. --- sys/netinet/ip_fw.h | 15 --------------- sys/netinet/ip_fw2.c | 30 +----------------------------- 2 files changed, 1 insertion(+), 44 deletions(-) (limited to 'sys/netinet') diff --git a/sys/netinet/ip_fw.h b/sys/netinet/ip_fw.h index 88c13bde31b7c..dc5b563cb7ce5 100644 --- a/sys/netinet/ip_fw.h +++ b/sys/netinet/ip_fw.h @@ -270,19 +270,6 @@ typedef struct _ipfw_insn_if { char name[IFNAMSIZ]; } ipfw_insn_if; -/* - * This is used for pipe and queue actions, which need to store - * a single pointer (which can have different size on different - * architectures. - * Note that, because of previous instructions, pipe_ptr might - * be unaligned in the overall structure, so it needs to be - * manipulated with care. - */ -typedef struct _ipfw_insn_pipe { - ipfw_insn o; - void *pipe_ptr; /* XXX */ -} ipfw_insn_pipe; - /* * This is used for storing an altq queue id number. */ @@ -546,8 +533,6 @@ int ipfw_chk(struct ip_fw_args *); int ipfw_init(void); void ipfw_destroy(void); -void flush_pipe_ptrs(struct dn_flow_set *match); /* used by dummynet */ - typedef int ip_fw_ctl_t(struct sockopt *); extern ip_fw_ctl_t *ip_fw_ctl_ptr; extern int fw_one_pass; diff --git a/sys/netinet/ip_fw2.c b/sys/netinet/ip_fw2.c index fa3b0c277365e..f2c6504da5dfb 100644 --- a/sys/netinet/ip_fw2.c +++ b/sys/netinet/ip_fw2.c @@ -3168,34 +3168,6 @@ flush_rule_ptrs(struct ip_fw_chain *chain) rule->next_rule = NULL; } -/* - * When pipes/queues are deleted, clear the "pipe_ptr" pointer to a given - * pipe/queue, or to all of them (match == NULL). - */ -void -flush_pipe_ptrs(struct dn_flow_set *match) -{ - struct ip_fw *rule; - - IPFW_WLOCK(&layer3_chain); - for (rule = layer3_chain.rules; rule; rule = rule->next) { - ipfw_insn_pipe *cmd = (ipfw_insn_pipe *)ACTION_PTR(rule); - - if (cmd->o.opcode != O_PIPE && cmd->o.opcode != O_QUEUE) - continue; - /* - * XXX Use bcmp/bzero to handle pipe_ptr to overcome - * possible alignment problems on 64-bit architectures. - * This code is seldom used so we do not worry too - * much about efficiency. - */ - if (match == NULL || - !bcmp(&cmd->pipe_ptr, &match, sizeof(match)) ) - bzero(&cmd->pipe_ptr, sizeof(cmd->pipe_ptr)); - } - IPFW_WUNLOCK(&layer3_chain); -} - /* * Add a new rule to the list. Copy the rule into a malloc'ed area, then * possibly create a rule number and add the rule to the list. @@ -3685,7 +3657,7 @@ check_ipfw_struct(struct ip_fw *rule, int size) case O_PIPE: case O_QUEUE: - if (cmdlen != F_INSN_SIZE(ipfw_insn_pipe)) + if (cmdlen != F_INSN_SIZE(ipfw_insn)) goto bad_size; goto check_action; -- cgit v1.3