svn commit: r264358 - user/ae/inet6/sys/netinet6
Andrey V. Elsukov
ae at FreeBSD.org
Fri Apr 11 23:04:34 UTC 2014
On 12.04.2014 02:07, Bjoern A. Zeeb wrote:
> On 11 Apr 2014, at 21:48 , Andrey V. Elsukov <ae at FreeBSD.org> wrote:
>> Author: ae
>> Date: Fri Apr 11 21:48:41 2014
>> New Revision: 264358
>> URL: http://svnweb.freebsd.org/changeset/base/264358
>> 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
WBR, Andrey V. Elsukov
More information about the svn-src-user