Commit a7682ad7 authored by David S. Miller's avatar David S. Miller

[IPV4/6]: NULL out sk_sndmsg_{page,off} in flush_pending_frames not append_data.

Signed-off-by: default avatarDavid S. Miller <davem@redhat.com>
parent 650d56cd
......@@ -762,8 +762,6 @@ int ip_append_data(struct sock *sk,
inet->cork.fragsize = mtu = dst_pmtu(&rt->u.dst);
inet->cork.rt = rt;
inet->cork.length = 0;
sk->sk_sndmsg_page = NULL;
sk->sk_sndmsg_off = 0;
if ((exthdrlen = rt->u.dst.header_len) != 0) {
length += exthdrlen;
transhdrlen += exthdrlen;
......@@ -1208,6 +1206,8 @@ void ip_flush_pending_frames(struct sock *sk)
ip_rt_put(inet->cork.rt);
inet->cork.rt = NULL;
}
sk->sk_sndmsg_page = NULL;
sk->sk_sndmsg_off = 0;
}
......
......@@ -852,8 +852,6 @@ int ip6_append_data(struct sock *sk, int getfrag(void *from, char *to, int offse
np->cork.hop_limit = hlimit;
inet->cork.fragsize = mtu = dst_pmtu(&rt->u.dst);
inet->cork.length = 0;
sk->sk_sndmsg_page = NULL;
sk->sk_sndmsg_off = 0;
exthdrlen = rt->u.dst.header_len + (opt ? opt->opt_flen : 0);
length += exthdrlen;
transhdrlen += exthdrlen;
......@@ -1125,5 +1123,7 @@ void ip6_flush_pending_frames(struct sock *sk)
dst_release(&np->cork.rt->u.dst);
np->cork.rt = NULL;
}
sk->sk_sndmsg_page = NULL;
sk->sk_sndmsg_off = 0;
memset(&inet->cork.fl, 0, sizeof(inet->cork.fl));
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment