linux/net/ipv6
Brian Haley bf0b48dfc3 [IPv6]: Fix ICMPv6 redirect handling with target multicast address
When the ICMPv6 Target address is multicast, Linux processes the 
redirect instead of dropping it.  The problem is in this code in 
ndisc_redirect_rcv():

         if (ipv6_addr_equal(dest, target)) {
                 on_link = 1;
         } else if (!(ipv6_addr_type(target) & IPV6_ADDR_LINKLOCAL)) {
                 ND_PRINTK2(KERN_WARNING
                            "ICMPv6 Redirect: target address is not 
link-local.\n");
                 return;
         }

This second check will succeed if the Target address is, for example, 
FF02::1 because it has link-local scope.  Instead, it should be checking 
if it's a unicast link-local address, as stated in RFC 2461/4861 Section 
8.1:

       - The ICMP Target Address is either a link-local address (when
         redirected to a router) or the same as the ICMP Destination
         Address (when redirected to the on-link destination).

I know this doesn't explicitly say unicast link-local address, but it's 
implied.

This bug is preventing Linux kernels from achieving IPv6 Logo Phase II 
certification because of a recent error that was found in the TAHI test 
suite - Neighbor Disovery suite test 206 (v6LC.2.3.6_G) had the 
multicast address in the Destination field instead of Target field, so 
we were passing the test.  This won't be the case anymore.

The patch below fixes this problem, and also fixes ndisc_send_redirect() 
to not send an invalid redirect with a multicast address in the Target 
field.  I re-ran the TAHI Neighbor Discovery section to make sure Linux 
passes all 245 tests now.

Signed-off-by: Brian Haley <brian.haley@hp.com>
Acked-by: David L Stevens <dlstevens@us.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-08 00:12:05 -07:00
..
netfilter [NETFILTER]: Fix/improve deadlock condition on module removal netfilter 2007-09-11 11:28:26 +02:00
Kconfig
Makefile
addrconf.c [IPV6]: Fix source address selection. 2007-09-16 14:48:21 -07:00
addrconf_core.c [IPV6]: ipv6_addr_type() doesn't know about RFC4193 addresses. 2007-07-31 02:28:21 -07:00
af_inet6.c [TCP]: Invoke tcp_sendmsg() directly, do not use inet_sendmsg(). 2007-08-02 19:42:28 -07:00
ah6.c
anycast.c
datagram.c
esp6.c
exthdrs.c
exthdrs_core.c
fib6_rules.c
icmp.c
inet6_connection_sock.c
inet6_hashtables.c
ip6_fib.c
ip6_flowlabel.c
ip6_input.c
ip6_output.c [IPv6]: Fix NULL pointer dereference in ip6_flush_pending_frames 2007-09-11 11:31:43 +02:00
ip6_tunnel.c ip6_tunnel - endianness annotations 2007-07-26 11:11:56 -07:00
ipcomp6.c
ipv6_sockglue.c [NET]: Fix IP_ADD/DROP_MEMBERSHIP to handle only connectionless 2007-08-26 18:35:35 -07:00
mcast.c
mip6.c
ndisc.c [IPv6]: Fix ICMPv6 redirect handling with target multicast address 2007-10-08 00:12:05 -07:00
netfilter.c
proc.c
protocol.c
raw.c [IPV6]: Fix unbalanced socket reference with MSG_CONFIRM. 2007-09-14 16:45:40 -07:00
reassembly.c
route.c [IPV6]: Don't update ADVMSS on routes where the MTU is not also updated 2007-07-31 02:28:04 -07:00
sit.c
sysctl_net_ipv6.c
tcp_ipv6.c [TCP]: Fix MD5 signature handling on big-endian. 2007-09-28 15:18:35 -07:00
tunnel6.c
udp.c [IPV6]: Just increment OutDatagrams once per a datagram. 2007-09-14 17:15:01 -07:00
udp_impl.h
udplite.c
xfrm6_input.c
xfrm6_mode_beet.c
xfrm6_mode_ro.c
xfrm6_mode_transport.c
xfrm6_mode_tunnel.c
xfrm6_output.c
xfrm6_policy.c
xfrm6_state.c
xfrm6_tunnel.c