diff options
-rw-r--r-- | UPDATING | 4 | ||||
-rw-r--r-- | sbin/ipfw/ipfw2.c | 2 | ||||
-rw-r--r-- | sys/netinet/ip_fw.h | 15 | ||||
-rw-r--r-- | sys/netinet/ip_fw2.c | 30 |
4 files changed, 6 insertions, 45 deletions
@@ -21,6 +21,10 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 7.x IS SLOW: developers choose to disable these features on build machines to maximize performance. +20051129: + ABI between ipfw(4) and ipfw(8) has been changed. You need + to rebuild ipfw(8) when rebuilding kernel. + 20051029: /etc/rc.d/ppp-user has been renamed to /etc/rc.d/ppp. Its /etc/rc.conf.d configuration file has been `ppp' from diff --git a/sbin/ipfw/ipfw2.c b/sbin/ipfw/ipfw2.c index ee1b362..26237eb 100644 --- a/sbin/ipfw/ipfw2.c +++ b/sbin/ipfw/ipfw2.c @@ -3834,7 +3834,7 @@ add(int ac, char *av[]) case TOK_QUEUE: case TOK_PIPE: - action->len = F_INSN_SIZE(ipfw_insn_pipe); + action->len = F_INSN_SIZE(ipfw_insn); case TOK_SKIPTO: if (i == TOK_QUEUE) action->opcode = O_QUEUE; diff --git a/sys/netinet/ip_fw.h b/sys/netinet/ip_fw.h index 88c13bd..dc5b563 100644 --- a/sys/netinet/ip_fw.h +++ b/sys/netinet/ip_fw.h @@ -271,19 +271,6 @@ typedef struct _ipfw_insn_if { } 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. */ typedef struct _ipfw_insn_altq { @@ -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 fa3b0c2..f2c6504 100644 --- a/sys/netinet/ip_fw2.c +++ b/sys/netinet/ip_fw2.c @@ -3169,34 +3169,6 @@ flush_rule_ptrs(struct ip_fw_chain *chain) } /* - * 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. * Update the rule_number in the input struct so the caller knows it as well. @@ -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; |