Date: Sat, 12 Apr 2014 03:03:41 +0400 From: "Andrey V. Elsukov" <ae@FreeBSD.org> To: "Bjoern A. Zeeb" <bzeeb-lists@lists.zabbadoz.net> Cc: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: Re: svn commit: r264358 - user/ae/inet6/sys/netinet6 Message-ID: <534874CD.5080101@FreeBSD.org> In-Reply-To: <DC9E12F6-6C6A-4FDD-A1B0-A60B178FEC2F@lists.zabbadoz.net> References: <201404112148.s3BLmgC8064206@svn.freebsd.org> <DC9E12F6-6C6A-4FDD-A1B0-A60B178FEC2F@lists.zabbadoz.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On 12.04.2014 02:07, Bjoern A. Zeeb wrote: > > On 11 Apr 2014, at 21:48 , Andrey V. Elsukov <ae@FreeBSD.org> wrote: > >> Author: ae >> Date: Fri Apr 11 21:48:41 2014 >> New Revision: 264358 >> URL: http://svnweb.freebsd.org/changeset/base/264358 >> >> Log: >> Application can use a global address belonging to the interface other >> than the outgoing. >> >> Found and tested by: bind9 > > > Yeah right and then BCP38 catches is on the router and drops the packet. > This change just sounds wrong. Maybe the application should be improved instead. I just restored the behavior, that all freebsd versions have. The problem was found with bind. It uses sticky socket option to specify source IPv6 address. The node has many interfaces and global IPv6 address is configured on the loopback interface. In this case udp6_output() uses in6_selectsrc() to determine source address. in6_selectsrc() uses source address from socket option. Outgoing interface determined from route lookup. In the end I have added the check for address availability. The original code also has similar check, but it is not so strict as my. Its purpose is to check that address is ready to use. Since the scope zone of global addresses is the whole Internel, the node can send packets via all interfaces. Am I wrong? And this won't work for LLA. -- WBR, Andrey V. Elsukov
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?534874CD.5080101>