summaryrefslogtreecommitdiffstats
path: root/net/l2tp
diff options
context:
space:
mode:
authorPaolo Abeni2018-03-12 14:54:23 +0100
committerDavid S. Miller2018-03-12 20:10:54 +0100
commit2f987a76a97773beafbc615b9c4d8fe79129a7f4 (patch)
treea74c2098b601e045f05ff0649ecb05e6230b3925 /net/l2tp
parentMerge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf (diff)
downloadkernel-qcow2-linux-2f987a76a97773beafbc615b9c4d8fe79129a7f4.tar.gz
kernel-qcow2-linux-2f987a76a97773beafbc615b9c4d8fe79129a7f4.tar.xz
kernel-qcow2-linux-2f987a76a97773beafbc615b9c4d8fe79129a7f4.zip
net: ipv6: keep sk status consistent after datagram connect failure
On unsuccesful ip6_datagram_connect(), if the failure is caused by ip6_datagram_dst_update(), the sk peer information are cleared, but the sk->sk_state is preserved. If the socket was already in an established status, the overall sk status is inconsistent and fouls later checks in datagram code. Fix this saving the old peer information and restoring them in case of failure. This also aligns ipv6 datagram connect() behavior with ipv4. v1 -> v2: - added missing Fixes tag Fixes: 85cb73ff9b74 ("net: ipv6: reset daddr and dport in sk if connect() fails") Signed-off-by: Paolo Abeni <pabeni@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/l2tp')
0 files changed, 0 insertions, 0 deletions