Subject: Re: [GIT PULL net-2.6] IPv6 fixes.

From: Brian Haley <[email-masked]>
Date: Wed, 04 Jun 2008 14:33:54 -0400

Shan Wei wrote:
>> +			if (addr_type != IPV6_ADDR_ANY) {
>> +				if (!ipv6_chk_addr(&init_net, &src_info->ipi6_addr,
>> +						   addr_type & IPV6_ADDR_LINKLOCAL ? dev : NULL, 0))
>>
> if ipi6_ifindex==2(eth0) and the ipi6_addr is loopback addr or multicast addr,
> ipv6_chk_addr() will return ture.

Won't ipv6_chk_addr() fail if given a multicast address since it's
looking in inet6_addr_lst[]?

Anyways, I've created a little chart showing the before/after
differences based on Yoshifuji's latest patch:

Behavior today:

src/ifindex	result
-----------	------

::/0		SUCCESS (packet sent on lo)
::/1 (lo)	SUCCESS (packet sent on lo)
::/3 (eth0)	SUCCESS (packet sent on lo)
::/27		SUCCESS (packet sent on lo)

::1/0		SUCCESS (packet sent on lo)
::1/1 (lo)	SUCCESS (packet sent on lo)
::1/3 (eth0)	SUCCESS (packet sent on lo)
::1/27		SUCCESS (packet sent on lo)

ff02::1/0	EINVAL
ff02::1/1	EINVAL
ff02::1/3	EINVAL
ff02::1/27	ENODEV

With patch, differences shown with **:

src/ifindex	result
-----------	------

::/0		SUCCESS (packet sent on lo)
::/1 (lo)	SUCCESS (packet sent on lo)
::/3 (eth0)	SUCCESS (packet sent on lo)
::/27		ENODEV **

::1/0		SUCCESS (packet sent on lo)
::1/1 (lo)	SUCCESS (packet sent on lo)
::1/3 (eth0)	EINVAL **
::1/27		ENODEV **

ff02::1/0	EINVAL
ff02::1/1	EINVAL
ff02::1/3	EINVAL
ff02::1/27	ENODEV

Is that change good with you?

-Brian