[NETFILTER]: Add struct sock * argument to ipt_do_table() Signed-off-by: Patrick McHardy --- commit 2816668ea745b16e1da608bf4d7b638a75389bd6 tree 8bd69ddefbecc96b2253453c6b4da15bbff92988 parent 03a2e97e71c3c9bfbfc3d357544348d393551658 author Patrick McHardy Mon, 09 May 2005 18:36:10 +0200 committer Patrick McHardy Mon, 09 May 2005 18:36:10 +0200 include/linux/netfilter_ipv4/ip_tables.h | 3 ++- net/ipv4/netfilter/ip_nat_rule.c | 2 +- net/ipv4/netfilter/ip_tables.c | 3 ++- net/ipv4/netfilter/iptable_filter.c | 4 ++-- net/ipv4/netfilter/iptable_mangle.c | 4 ++-- net/ipv4/netfilter/iptable_raw.c | 2 +- 6 files changed, 10 insertions(+), 8 deletions(-) Index: include/linux/netfilter_ipv4/ip_tables.h =================================================================== --- b53df6f327c03ec282a1b75326db321dbd2f0bc0/include/linux/netfilter_ipv4/ip_tables.h (mode:100644) +++ 8bd69ddefbecc96b2253453c6b4da15bbff92988/include/linux/netfilter_ipv4/ip_tables.h (mode:100644) @@ -478,7 +478,8 @@ extern int ipt_register_table(struct ipt_table *table, const struct ipt_replace *repl); extern void ipt_unregister_table(struct ipt_table *table); -extern unsigned int ipt_do_table(struct sk_buff **pskb, +extern unsigned int ipt_do_table(struct sock *sk, + struct sk_buff **pskb, unsigned int hook, const struct net_device *in, const struct net_device *out, Index: net/ipv4/netfilter/ip_nat_rule.c =================================================================== --- b53df6f327c03ec282a1b75326db321dbd2f0bc0/net/ipv4/netfilter/ip_nat_rule.c (mode:100644) +++ 8bd69ddefbecc96b2253453c6b4da15bbff92988/net/ipv4/netfilter/ip_nat_rule.c (mode:100644) @@ -264,7 +264,7 @@ { int ret; - ret = ipt_do_table(pskb, hooknum, in, out, &nat_table, NULL); + ret = ipt_do_table(NULL, pskb, hooknum, in, out, &nat_table, NULL); if (ret == NF_ACCEPT) { if (!ip_nat_initialized(ct, HOOK2MANIP(hooknum))) Index: net/ipv4/netfilter/ip_tables.c =================================================================== --- b53df6f327c03ec282a1b75326db321dbd2f0bc0/net/ipv4/netfilter/ip_tables.c (mode:100644) +++ 8bd69ddefbecc96b2253453c6b4da15bbff92988/net/ipv4/netfilter/ip_tables.c (mode:100644) @@ -257,7 +257,8 @@ /* Returns one of the generic firewall policies, like NF_ACCEPT. */ unsigned int -ipt_do_table(struct sk_buff **pskb, +ipt_do_table(struct sock *sk, + struct sk_buff **pskb, unsigned int hook, const struct net_device *in, const struct net_device *out, Index: net/ipv4/netfilter/iptable_filter.c =================================================================== --- b53df6f327c03ec282a1b75326db321dbd2f0bc0/net/ipv4/netfilter/iptable_filter.c (mode:100644) +++ 8bd69ddefbecc96b2253453c6b4da15bbff92988/net/ipv4/netfilter/iptable_filter.c (mode:100644) @@ -89,7 +89,7 @@ const struct net_device *out, int (*okfn)(struct sk_buff *)) { - return ipt_do_table(pskb, hook, in, out, &packet_filter, NULL); + return ipt_do_table(NULL, pskb, hook, in, out, &packet_filter, NULL); } static unsigned int @@ -107,7 +107,7 @@ return NF_ACCEPT; } - return ipt_do_table(pskb, hook, in, out, &packet_filter, NULL); + return ipt_do_table(NULL, pskb, hook, in, out, &packet_filter, NULL); } static struct nf_hook_ops ipt_ops[] = { Index: net/ipv4/netfilter/iptable_mangle.c =================================================================== --- b53df6f327c03ec282a1b75326db321dbd2f0bc0/net/ipv4/netfilter/iptable_mangle.c (mode:100644) +++ 8bd69ddefbecc96b2253453c6b4da15bbff92988/net/ipv4/netfilter/iptable_mangle.c (mode:100644) @@ -119,7 +119,7 @@ const struct net_device *out, int (*okfn)(struct sk_buff *)) { - return ipt_do_table(pskb, hook, in, out, &packet_mangler, NULL); + return ipt_do_table(NULL, pskb, hook, in, out, &packet_mangler, NULL); } static unsigned int @@ -148,7 +148,7 @@ daddr = (*pskb)->nh.iph->daddr; tos = (*pskb)->nh.iph->tos; - ret = ipt_do_table(pskb, hook, in, out, &packet_mangler, NULL); + ret = ipt_do_table(NULL, pskb, hook, in, out, &packet_mangler, NULL); /* Reroute for ANY change. */ if (ret != NF_DROP && ret != NF_STOLEN && ret != NF_QUEUE && ((*pskb)->nh.iph->saddr != saddr Index: net/ipv4/netfilter/iptable_raw.c =================================================================== --- b53df6f327c03ec282a1b75326db321dbd2f0bc0/net/ipv4/netfilter/iptable_raw.c (mode:100644) +++ 8bd69ddefbecc96b2253453c6b4da15bbff92988/net/ipv4/netfilter/iptable_raw.c (mode:100644) @@ -94,7 +94,7 @@ const struct net_device *out, int (*okfn)(struct sk_buff *)) { - return ipt_do_table(pskb, hook, in, out, &packet_raw, NULL); + return ipt_do_table(NULL, pskb, hook, in, out, &packet_raw, NULL); } /* 'raw' is the very first table. */