]> git.baikalelectronics.ru Git - kernel.git/commit
l2tp: fix l2tp_ip_sendmsg() route handling
authorEric Dumazet <eric.dumazet@gmail.com>
Sat, 11 Jun 2011 22:27:09 +0000 (22:27 +0000)
committerDavid S. Miller <davem@conan.davemloft.net>
Mon, 13 Jun 2011 21:31:30 +0000 (17:31 -0400)
commit6db44f49bd6b47fe8c59c6a25b95efbc8bd194b8
tree6b46eac808fe4292bff144ff0b5e6461ef957810
parentd222d90d21f7278847e2ebcaa7cbbf1defa07363
l2tp: fix l2tp_ip_sendmsg() route handling

l2tp_ip_sendmsg() in non connected mode incorrectly calls
sk_setup_caps(). Subsequent send() calls send data to wrong destination.

We can also avoid changing dst refcount in connected mode, using
appropriate rcu locking. Once output route lookups can also be done
under rcu, sendto() calls wont change dst refcounts too.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
CC: James Chapman <jchapman@katalix.com>
Signed-off-by: David S. Miller <davem@conan.davemloft.net>
net/l2tp/l2tp_ip.c