From: Pablo Neira Ayuso <pablo@netfilter.org>
To: netfilter-devel@vger.kernel.org
Cc: davem@davemloft.net, netdev@vger.kernel.org
Subject: [PATCH 03/19] netfilter: nf_conntrack: constify sk_buff argument to nf_ct_attach()
Date: Tue, 20 Aug 2013 12:54:35 +0200 [thread overview]
Message-ID: <1376996091-3964-4-git-send-email-pablo@netfilter.org> (raw)
In-Reply-To: <1376996091-3964-1-git-send-email-pablo@netfilter.org>
From: Patrick McHardy <kaber@trash.net>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
---
include/linux/netfilter.h | 4 ++--
net/netfilter/core.c | 7 ++++---
net/netfilter/nf_conntrack_core.c | 2 +-
3 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/include/linux/netfilter.h b/include/linux/netfilter.h
index de70f7b..f4bbf2c 100644
--- a/include/linux/netfilter.h
+++ b/include/linux/netfilter.h
@@ -314,8 +314,8 @@ nf_nat_decode_session(struct sk_buff *skb, struct flowi *fl, u_int8_t family)
#endif /*CONFIG_NETFILTER*/
#if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE)
-extern void (*ip_ct_attach)(struct sk_buff *, struct sk_buff *) __rcu;
-extern void nf_ct_attach(struct sk_buff *, struct sk_buff *);
+extern void (*ip_ct_attach)(struct sk_buff *, const struct sk_buff *) __rcu;
+extern void nf_ct_attach(struct sk_buff *, const struct sk_buff *);
extern void (*nf_ct_destroy)(struct nf_conntrack *) __rcu;
struct nf_conn;
diff --git a/net/netfilter/core.c b/net/netfilter/core.c
index 2217363..593b16e 100644
--- a/net/netfilter/core.c
+++ b/net/netfilter/core.c
@@ -234,12 +234,13 @@ EXPORT_SYMBOL(skb_make_writable);
/* This does not belong here, but locally generated errors need it if connection
tracking in use: without this, connection may not be in hash table, and hence
manufactured ICMP or RST packets will not be associated with it. */
-void (*ip_ct_attach)(struct sk_buff *, struct sk_buff *) __rcu __read_mostly;
+void (*ip_ct_attach)(struct sk_buff *, const struct sk_buff *)
+ __rcu __read_mostly;
EXPORT_SYMBOL(ip_ct_attach);
-void nf_ct_attach(struct sk_buff *new, struct sk_buff *skb)
+void nf_ct_attach(struct sk_buff *new, const struct sk_buff *skb)
{
- void (*attach)(struct sk_buff *, struct sk_buff *);
+ void (*attach)(struct sk_buff *, const struct sk_buff *);
if (skb->nfct) {
rcu_read_lock();
diff --git a/net/netfilter/nf_conntrack_core.c b/net/netfilter/nf_conntrack_core.c
index 0283bae..d32afaf 100644
--- a/net/netfilter/nf_conntrack_core.c
+++ b/net/netfilter/nf_conntrack_core.c
@@ -1192,7 +1192,7 @@ EXPORT_SYMBOL_GPL(nf_ct_port_nlattr_tuple_size);
#endif
/* Used by ipt_REJECT and ip6t_REJECT. */
-static void nf_conntrack_attach(struct sk_buff *nskb, struct sk_buff *skb)
+static void nf_conntrack_attach(struct sk_buff *nskb, const struct sk_buff *skb)
{
struct nf_conn *ct;
enum ip_conntrack_info ctinfo;
--
1.7.10.4
next prev parent reply other threads:[~2013-08-20 10:54 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-20 10:54 [PATCH 00/19] Netfilter/IPVS updates for net-next Pablo Neira Ayuso
2013-08-20 10:54 ` [PATCH 01/19] netfilter: xt_addrtype: fix trivial typo Pablo Neira Ayuso
2013-08-20 10:54 ` [PATCH 02/19] netfilter: nf_conntrack: remove net_ratelimit() for LOG_INVALID() Pablo Neira Ayuso
2013-08-20 10:54 ` Pablo Neira Ayuso [this message]
2013-08-20 10:54 ` [PATCH 04/19] netfilter: connlabels: remove unneeded includes Pablo Neira Ayuso
2013-08-20 10:54 ` [PATCH 05/19] netfilter: nf_queue: relax NFQA_CT attribute check Pablo Neira Ayuso
2013-08-20 10:54 ` [PATCH 06/19] netfilter: tproxy: remove nf_tproxy_core, keep tw sk assigned to skb Pablo Neira Ayuso
2013-08-20 10:54 ` [PATCH 07/19] netfilter: tproxy: remove nf_tproxy_core.h Pablo Neira Ayuso
2013-08-20 10:54 ` [PATCH 08/19] netfilter: nf_conntrack: remove duplicate code in ctnetlink Pablo Neira Ayuso
2013-08-20 10:54 ` [PATCH 09/19] netfilter: nf_nat: fix locking in nf_nat_seq_adjust() Pablo Neira Ayuso
2013-08-20 10:54 ` [PATCH 10/19] netfilter: nf_nat: change sequence number adjustments to 32 bits Pablo Neira Ayuso
2013-08-20 10:54 ` [PATCH 11/19] netfilter: nf_nat: use per-conntrack locking for sequence number adjustments Pablo Neira Ayuso
2013-08-20 10:54 ` [PATCH 12/19] netfilter: tproxy: fix build with IP6_NF_IPTABLES=n Pablo Neira Ayuso
2013-08-20 10:54 ` [PATCH 13/19] ipvs: fixed spacing at for statements Pablo Neira Ayuso
2013-08-20 10:54 ` [PATCH 14/19] ipvs: ip_vs_sh: ip_vs_sh_get_port: check skb_header_pointer for NULL Pablo Neira Ayuso
2013-08-20 10:54 ` [PATCH 15/19] netfilter: nf_conntrack: don't send destroy events from iterator Pablo Neira Ayuso
2013-08-20 10:54 ` [PATCH 16/19] netfilter: ctnetlink: refactor ctnetlink_create_expect Pablo Neira Ayuso
2013-08-20 10:54 ` [PATCH 17/19] netfilter: nfnetlink_queue: allow to attach expectations to conntracks Pablo Neira Ayuso
2013-08-20 10:54 ` [PATCH 18/19] netfilter: export xt_rpfilter.h to userland Pablo Neira Ayuso
2013-08-20 10:54 ` [PATCH 19/19] netfilter: export xt_HMARK.h " Pablo Neira Ayuso
2013-08-20 20:40 ` [PATCH 00/19] Netfilter/IPVS updates for net-next David Miller
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=1376996091-3964-4-git-send-email-pablo@netfilter.org \
--to=pablo@netfilter.org \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=netfilter-devel@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).