Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 106334
b: refs/heads/master
c: 3918fed
h: refs/heads/master
v: v3
  • Loading branch information
Alexey Dobriyan authored and David S. Miller committed Jul 27, 2008
1 parent ec9e585 commit a8ec908
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f858b4869a9136dd28cc2ab37f8b89268cc99462
refs/heads/master: 3918fed5f31213067c1c345bd904e1ea369e6819
39 changes: 30 additions & 9 deletions trunk/net/ipv4/netfilter/arptable_filter.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,32 +55,53 @@ static struct xt_table packet_filter = {
};

/* The work comes in here from netfilter.c */
static unsigned int arpt_hook(unsigned int hook,
struct sk_buff *skb,
const struct net_device *in,
const struct net_device *out,
int (*okfn)(struct sk_buff *))
static unsigned int arpt_in_hook(unsigned int hook,
struct sk_buff *skb,
const struct net_device *in,
const struct net_device *out,
int (*okfn)(struct sk_buff *))
{
return arpt_do_table(skb, hook, in, out, init_net.ipv4.arptable_filter);
return arpt_do_table(skb, hook, in, out,
dev_net(in)->ipv4.arptable_filter);
}

static unsigned int arpt_out_hook(unsigned int hook,
struct sk_buff *skb,
const struct net_device *in,
const struct net_device *out,
int (*okfn)(struct sk_buff *))
{
return arpt_do_table(skb, hook, in, out,
dev_net(out)->ipv4.arptable_filter);
}

static unsigned int arpt_forward_hook(unsigned int hook,
struct sk_buff *skb,
const struct net_device *in,
const struct net_device *out,
int (*okfn)(struct sk_buff *))
{
return arpt_do_table(skb, hook, in, out,
dev_net(in)->ipv4.arptable_filter);
}

static struct nf_hook_ops arpt_ops[] __read_mostly = {
{
.hook = arpt_hook,
.hook = arpt_in_hook,
.owner = THIS_MODULE,
.pf = NF_ARP,
.hooknum = NF_ARP_IN,
.priority = NF_IP_PRI_FILTER,
},
{
.hook = arpt_hook,
.hook = arpt_out_hook,
.owner = THIS_MODULE,
.pf = NF_ARP,
.hooknum = NF_ARP_OUT,
.priority = NF_IP_PRI_FILTER,
},
{
.hook = arpt_hook,
.hook = arpt_forward_hook,
.owner = THIS_MODULE,
.pf = NF_ARP,
.hooknum = NF_ARP_FORWARD,
Expand Down

0 comments on commit a8ec908

Please sign in to comment.