diff options
-rw-r--r-- | include/net/netfilter/nf_conntrack_extend.h | 2 | ||||
-rw-r--r-- | net/ipv4/netfilter/nf_nat_core.c | 6 | ||||
-rw-r--r-- | net/netfilter/nf_conntrack_extend.c | 3 |
3 files changed, 6 insertions, 5 deletions
diff --git a/include/net/netfilter/nf_conntrack_extend.h b/include/net/netfilter/nf_conntrack_extend.h index 73b5711faf32..49aac6323fbe 100644 --- a/include/net/netfilter/nf_conntrack_extend.h +++ b/include/net/netfilter/nf_conntrack_extend.h | |||
@@ -67,7 +67,7 @@ struct nf_ct_ext_type | |||
67 | void (*destroy)(struct nf_conn *ct); | 67 | void (*destroy)(struct nf_conn *ct); |
68 | /* Called when realloacted (can be NULL). | 68 | /* Called when realloacted (can be NULL). |
69 | Contents has already been moved. */ | 69 | Contents has already been moved. */ |
70 | void (*move)(struct nf_conn *ct, void *old); | 70 | void (*move)(void *new, void *old); |
71 | 71 | ||
72 | enum nf_ct_ext_id id; | 72 | enum nf_ct_ext_id id; |
73 | 73 | ||
diff --git a/net/ipv4/netfilter/nf_nat_core.c b/net/ipv4/netfilter/nf_nat_core.c index dd07362d2b8f..0d5fa3a54d04 100644 --- a/net/ipv4/netfilter/nf_nat_core.c +++ b/net/ipv4/netfilter/nf_nat_core.c | |||
@@ -600,10 +600,10 @@ static void nf_nat_cleanup_conntrack(struct nf_conn *ct) | |||
600 | spin_unlock_bh(&nf_nat_lock); | 600 | spin_unlock_bh(&nf_nat_lock); |
601 | } | 601 | } |
602 | 602 | ||
603 | static void nf_nat_move_storage(struct nf_conn *conntrack, void *old) | 603 | static void nf_nat_move_storage(void *new, void *old) |
604 | { | 604 | { |
605 | struct nf_conn_nat *new_nat = nf_ct_ext_find(conntrack, NF_CT_EXT_NAT); | 605 | struct nf_conn_nat *new_nat = new; |
606 | struct nf_conn_nat *old_nat = (struct nf_conn_nat *)old; | 606 | struct nf_conn_nat *old_nat = old; |
607 | struct nf_conn *ct = old_nat->ct; | 607 | struct nf_conn *ct = old_nat->ct; |
608 | 608 | ||
609 | if (!ct || !(ct->status & IPS_NAT_DONE_MASK)) | 609 | if (!ct || !(ct->status & IPS_NAT_DONE_MASK)) |
diff --git a/net/netfilter/nf_conntrack_extend.c b/net/netfilter/nf_conntrack_extend.c index cf6ba6659a80..8b9be1e978cd 100644 --- a/net/netfilter/nf_conntrack_extend.c +++ b/net/netfilter/nf_conntrack_extend.c | |||
@@ -109,7 +109,8 @@ void *__nf_ct_ext_add(struct nf_conn *ct, enum nf_ct_ext_id id, gfp_t gfp) | |||
109 | rcu_read_lock(); | 109 | rcu_read_lock(); |
110 | t = rcu_dereference(nf_ct_ext_types[i]); | 110 | t = rcu_dereference(nf_ct_ext_types[i]); |
111 | if (t && t->move) | 111 | if (t && t->move) |
112 | t->move(ct, ct->ext + ct->ext->offset[i]); | 112 | t->move((void *)new + new->offset[i], |
113 | (void *)ct->ext + ct->ext->offset[i]); | ||
113 | rcu_read_unlock(); | 114 | rcu_read_unlock(); |
114 | } | 115 | } |
115 | kfree(ct->ext); | 116 | kfree(ct->ext); |