All of lore.kernel.org
 help / color / mirror / Atom feed
From: Patrick McHardy <kaber@trash.net>
To: netfilter-devel@lists.netfilter.org
Cc: juha.heljoranta@evtek.fi, Rusty Russell <rusty@rustcorp.com.au>
Subject: [netfilter socket hooks 3/5]: Add struct sock * argument to ipt_do_table()
Date: Tue, 10 May 2005 18:01:02 +0200	[thread overview]
Message-ID: <4280DABE.9010105@trash.net> (raw)
In-Reply-To: <4280DA51.8090201@trash.net>

[-- Attachment #1: 03.diff --]
[-- Type: text/x-patch, Size: 4900 bytes --]

[NETFILTER]: Add struct sock * argument to ipt_do_table()

Signed-off-by: Patrick McHardy <kaber@trash.net>

---
commit 2816668ea745b16e1da608bf4d7b638a75389bd6
tree 8bd69ddefbecc96b2253453c6b4da15bbff92988
parent 03a2e97e71c3c9bfbfc3d357544348d393551658
author Patrick McHardy <kaber@trash.net> Mon, 09 May 2005 18:36:10 +0200
committer Patrick McHardy <kaber@trash.net> 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. */

  parent reply	other threads:[~2005-05-10 16:01 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-27  4:22 Status of owner-socketlookup James Morris
2005-04-27  4:22 ` David S. Miller
2005-04-27  4:44   ` James Morris
2005-04-27 10:09     ` Patrick McHardy
2005-04-27 13:59       ` James Morris
2005-04-27 14:04         ` Patrick McHardy
2005-04-27 18:47           ` David S. Miller
2005-04-27 14:40       ` Juha Heljoranta
2005-04-27 14:52         ` Patrick McHardy
2005-04-27 18:49           ` David S. Miller
2005-04-27 19:37             ` Patrick McHardy
2005-04-27 22:43               ` James Morris
2005-05-10 15:59               ` Netfilter socket hooks (was: Re: Status of owner-socketlookup) Patrick McHardy
2005-05-10 16:00                 ` [netfilter socket hooks 1/5]: Add socket hook infrastructure Patrick McHardy
2005-05-11 23:22                   ` James Morris
2005-05-11 23:27                     ` James Morris
2005-05-11 23:27                     ` Patrick McHardy
2005-05-10 16:00                 ` [netfilter socket hooks 2/5]: Add protocol hooks Patrick McHardy
2005-05-10 16:01                 ` Patrick McHardy [this message]
2005-05-10 16:01                 ` [netfilter socket hooks 4/5]: Add struct sock * argument to match functions Patrick McHardy
2005-05-10 16:01                 ` [netfilter socket hooks 5/5]: Add skfilter table Patrick McHardy
2005-05-10 18:26                 ` Netfilter socket hooks (was: Re: Status of owner-socketlookup) James Morris
2005-05-10 20:37                 ` Netfilter socket hooks Jonas Berlin
2005-05-11  0:04                 ` David S. Miller
2005-05-11 23:57                 ` Netfilter socket hooks (was: Re: Status of owner-socketlookup) James Morris
2005-05-12  0:12                   ` Netfilter socket hooks Patrick McHardy
2005-04-27  6:04 ` [PATCH] owner-socketlookup update for 2.6.12-rc3 James Morris
2005-04-27  6:13   ` David S. Miller
2005-04-27  6:43     ` Patrick Schaaf
2005-04-27  6:55       ` Patrick Schaaf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4280DABE.9010105@trash.net \
    --to=kaber@trash.net \
    --cc=juha.heljoranta@evtek.fi \
    --cc=netfilter-devel@lists.netfilter.org \
    --cc=rusty@rustcorp.com.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.