]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
netfilter: nf_conntrack: constify sk_buff argument to nf_ct_attach()
authorPatrick McHardy <kaber@trash.net>
Sun, 28 Jul 2013 20:54:08 +0000 (22:54 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Wed, 31 Jul 2013 14:37:38 +0000 (16:37 +0200)
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
include/linux/netfilter.h
net/netfilter/core.c
net/netfilter/nf_conntrack_core.c

index de70f7b45b682126284a4162535659bfde8e5be1..f4bbf2cd22d81631d31b8aeec581f677a0bd314b 100644 (file)
@@ -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;
index 2217363ab4229212b0f309d1f724e1f23f5ceb17..593b16ea45e0d817787c4d06d9d3d703df2fc65b 100644 (file)
@@ -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();
index 0283baedcdfb5b48627002607731dabb992e15ae..d32afaff72f858808b62fed0b75db28f174e122b 100644 (file)
@@ -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;