aboutsummaryrefslogtreecommitdiff
path: root/sys/netinet
diff options
context:
space:
mode:
authorJulian Elischer <julian@FreeBSD.org>2007-03-31 00:31:28 +0000
committerJulian Elischer <julian@FreeBSD.org>2007-03-31 00:31:28 +0000
commitfbe1e7e5751dea5f3ce546c9a6a763cbe5d3876c (patch)
tree5603ee25fa90bc4bd09491ec6366fc032219c941 /sys/netinet
parentce03ca554d16e0c64fc4179ed234c2edfb66ea17 (diff)
Notes
Diffstat (limited to 'sys/netinet')
-rw-r--r--sys/netinet/ip_fw.h15
-rw-r--r--sys/netinet/ip_fw2.c30
2 files changed, 1 insertions, 44 deletions
diff --git a/sys/netinet/ip_fw.h b/sys/netinet/ip_fw.h
index 9a6038e330cc..4b38fff27932 100644
--- a/sys/netinet/ip_fw.h
+++ b/sys/netinet/ip_fw.h
@@ -276,19 +276,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 {
@@ -553,8 +540,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 3d8e7f6cac0d..b0569c56c1a9 100644
--- a/sys/netinet/ip_fw2.c
+++ b/sys/netinet/ip_fw2.c
@@ -3369,34 +3369,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.
@@ -3887,7 +3859,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;