]> git.baikalelectronics.ru Git - kernel.git/commit
ipv6: simplify detection of first operational link-local address on interface
authorHannes Frederic Sowa <hannes@stressinduktion.org>
Thu, 16 Jan 2014 19:13:04 +0000 (20:13 +0100)
committerDavid S. Miller <davem@davemloft.net>
Sat, 18 Jan 2014 02:10:01 +0000 (18:10 -0800)
commit400e8d64bcf9cfa2968743b71284b5ad735173ed
tree857e74e69def8f491d7d3eca9ee84497122cd81f
parent5cec75e63e942f656f2dd33807c1b11de83d0176
ipv6: simplify detection of first operational link-local address on interface

In commit fb48422b7d7892 ("ipv6: introduce per-interface counter for
dad-completed ipv6 addresses") I build the detection of the first
operational link-local address much to complex. Additionally this code
now has a race condition.

Replace it with a much simpler variant, which just scans the address
list when duplicate address detection completes, to check if this is
the first valid link local address and send RS and MLD reports then.

Fixes: fb48422b7d7892 ("ipv6: introduce per-interface counter for dad-completed ipv6 addresses")
Reported-by: Jiri Pirko <jiri@resnulli.us>
Cc: Flavio Leitner <fbl@redhat.com>
Signed-off-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Acked-by: Flavio Leitner <fbl@redhat.com>
Acked-by: Jiri Pirko <jiri@resnulli.us>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/if_inet6.h
net/ipv6/addrconf.c