ipv6/udp: use sticky pktinfo egress ifindex on connect()
authorPaolo Abeni <pabeni@redhat.com>
Fri, 29 Jan 2016 11:30:20 +0000 (12:30 +0100)
committerDavid S. Miller <davem@davemloft.net>
Sat, 30 Jan 2016 04:31:26 +0000 (20:31 -0800)
commit1cdda91871470f15e79375991bd2eddc6e86ddb1
tree1b85e50c353077ae7e06e932cbc456c10972227b
parent6f21c96a78b835259546d8f3fb4edff0f651d478
ipv6/udp: use sticky pktinfo egress ifindex on connect()

Currently, the egress interface index specified via IPV6_PKTINFO
is ignored by __ip6_datagram_connect(), so that RFC 3542 section 6.7
can be subverted when the user space application calls connect()
before sendmsg().
Fix it by initializing properly flowi6_oif in connect() before
performing the route lookup.

Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Acked-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv6/datagram.c