Garbage-collect now unused struct _ipfw_insn_pipe and flush_pipe_ptrs(),

thus removing a few XXXes.
  Document the ABI breakage in UPDATING.
This commit is contained in:
Gleb Smirnoff 2005-11-29 08:59:41 +00:00
parent 9d2058e4d1
commit b090e4ce1f
4 changed files with 6 additions and 45 deletions

View File

@ -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

View File

@ -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;

View File

@ -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;

View File

@ -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;