diff options
Diffstat (limited to 'net/ipv6/ip6_output.c')
-rw-r--r-- | net/ipv6/ip6_output.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c index 614296a920c6..c1fa693511a1 100644 --- a/net/ipv6/ip6_output.c +++ b/net/ipv6/ip6_output.c | |||
@@ -441,9 +441,15 @@ static void ip6_copy_metadata(struct sk_buff *to, struct sk_buff *from) | |||
441 | #ifdef CONFIG_NETFILTER | 441 | #ifdef CONFIG_NETFILTER |
442 | to->nfmark = from->nfmark; | 442 | to->nfmark = from->nfmark; |
443 | /* Connection association is same as pre-frag packet */ | 443 | /* Connection association is same as pre-frag packet */ |
444 | nf_conntrack_put(to->nfct); | ||
444 | to->nfct = from->nfct; | 445 | to->nfct = from->nfct; |
445 | nf_conntrack_get(to->nfct); | 446 | nf_conntrack_get(to->nfct); |
446 | to->nfctinfo = from->nfctinfo; | 447 | to->nfctinfo = from->nfctinfo; |
448 | #if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE) | ||
449 | nf_conntrack_put_reasm(to->nfct_reasm); | ||
450 | to->nfct_reasm = from->nfct_reasm; | ||
451 | nf_conntrack_get_reasm(to->nfct_reasm); | ||
452 | #endif | ||
447 | #ifdef CONFIG_BRIDGE_NETFILTER | 453 | #ifdef CONFIG_BRIDGE_NETFILTER |
448 | nf_bridge_put(to->nf_bridge); | 454 | nf_bridge_put(to->nf_bridge); |
449 | to->nf_bridge = from->nf_bridge; | 455 | to->nf_bridge = from->nf_bridge; |
@@ -587,8 +593,7 @@ static int ip6_fragment(struct sk_buff *skb, int (*output)(struct sk_buff *)) | |||
587 | skb->next = NULL; | 593 | skb->next = NULL; |
588 | } | 594 | } |
589 | 595 | ||
590 | if (tmp_hdr) | 596 | kfree(tmp_hdr); |
591 | kfree(tmp_hdr); | ||
592 | 597 | ||
593 | if (err == 0) { | 598 | if (err == 0) { |
594 | IP6_INC_STATS(IPSTATS_MIB_FRAGOKS); | 599 | IP6_INC_STATS(IPSTATS_MIB_FRAGOKS); |
@@ -1186,10 +1191,8 @@ int ip6_push_pending_frames(struct sock *sk) | |||
1186 | 1191 | ||
1187 | out: | 1192 | out: |
1188 | inet->cork.flags &= ~IPCORK_OPT; | 1193 | inet->cork.flags &= ~IPCORK_OPT; |
1189 | if (np->cork.opt) { | 1194 | kfree(np->cork.opt); |
1190 | kfree(np->cork.opt); | 1195 | np->cork.opt = NULL; |
1191 | np->cork.opt = NULL; | ||
1192 | } | ||
1193 | if (np->cork.rt) { | 1196 | if (np->cork.rt) { |
1194 | dst_release(&np->cork.rt->u.dst); | 1197 | dst_release(&np->cork.rt->u.dst); |
1195 | np->cork.rt = NULL; | 1198 | np->cork.rt = NULL; |
@@ -1214,10 +1217,8 @@ void ip6_flush_pending_frames(struct sock *sk) | |||
1214 | 1217 | ||
1215 | inet->cork.flags &= ~IPCORK_OPT; | 1218 | inet->cork.flags &= ~IPCORK_OPT; |
1216 | 1219 | ||
1217 | if (np->cork.opt) { | 1220 | kfree(np->cork.opt); |
1218 | kfree(np->cork.opt); | 1221 | np->cork.opt = NULL; |
1219 | np->cork.opt = NULL; | ||
1220 | } | ||
1221 | if (np->cork.rt) { | 1222 | if (np->cork.rt) { |
1222 | dst_release(&np->cork.rt->u.dst); | 1223 | dst_release(&np->cork.rt->u.dst); |
1223 | np->cork.rt = NULL; | 1224 | np->cork.rt = NULL; |