Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1350110
| From | Jiri Slaby <jslaby@suse.cz> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 3.12 009/116] ipv6/udp: use sticky pktinfo egress ifindex on connect() |
| Date | 2016-03-04 11:00 +0100 |
| Message-ID | <r8UGD-4LF-15@gated-at.bofh.it> (permalink) |
| References | <r8TUd-4rg-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
From: Paolo Abeni <pabeni@redhat.com> 3.12-stable review patch. If anyone has any objections, please let me know. =============== [ Upstream commit 1cdda91871470f15e79375991bd2eddc6e86ddb1 ] 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> Signed-off-by: Jiri Slaby <jslaby@suse.cz> --- net/ipv6/datagram.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/net/ipv6/datagram.c b/net/ipv6/datagram.c index e24fa8c01dd2..fcfa2885df0e 100644 --- a/net/ipv6/datagram.c +++ b/net/ipv6/datagram.c @@ -163,6 +163,9 @@ ipv4_connected: fl6.fl6_dport = inet->inet_dport; fl6.fl6_sport = inet->inet_sport; + if (!fl6.flowi6_oif) + fl6.flowi6_oif = np->sticky_pktinfo.ipi6_ifindex; + if (!fl6.flowi6_oif && (addr_type&IPV6_ADDR_MULTICAST)) fl6.flowi6_oif = np->mcast_oif; -- 2.7.2
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 3.12 000/116] 3.12.56-stable review Jiri Slaby <jslaby@suse.cz> - 2016-03-04 10:10 +0100
[PATCH 3.12 001/116] proc: Fix ptrace-based permission checks for accessing task maps Jiri Slaby <jslaby@suse.cz> - 2016-03-04 11:00 +0100
[PATCH 3.12 016/116] bonding: Fix ARP monitor validation Jiri Slaby <jslaby@suse.cz> - 2016-03-04 11:00 +0100
[PATCH 3.12 007/116] pptp: fix illegal memory access caused by multiple bind()s Jiri Slaby <jslaby@suse.cz> - 2016-03-04 11:00 +0100
[PATCH 3.12 012/116] net:Add sysctl_max_skb_frags Jiri Slaby <jslaby@suse.cz> - 2016-03-04 11:00 +0100
[PATCH 3.12 006/116] af_unix: fix struct pid memory leak Jiri Slaby <jslaby@suse.cz> - 2016-03-04 11:00 +0100
[PATCH 3.12 008/116] sctp: allow setting SCTP_SACK_IMMEDIATELY by the application Jiri Slaby <jslaby@suse.cz> - 2016-03-04 11:00 +0100
[PATCH 3.12 009/116] ipv6/udp: use sticky pktinfo egress ifindex on connect() Jiri Slaby <jslaby@suse.cz> - 2016-03-04 11:00 +0100
[PATCH 3.12 011/116] ipv6: fix a lockdep splat Jiri Slaby <jslaby@suse.cz> - 2016-03-04 11:00 +0100
[PATCH 3.12 015/116] bonding: fix bond_arp_rcv() race of curr_active_slave Jiri Slaby <jslaby@suse.cz> - 2016-03-04 11:00 +0100
Re: [PATCH 3.12 000/116] 3.12.56-stable review Guenter Roeck <linux@roeck-us.net> - 2016-03-04 15:10 +0100
Re: [PATCH 3.12 000/116] 3.12.56-stable review Jiri Slaby <jslaby@suse.cz> - 2016-03-08 16:50 +0100
Re: [PATCH 3.12 000/116] 3.12.56-stable review Shuah Khan <shuahkh@osg.samsung.com> - 2016-03-04 15:50 +0100
csiph-web