]> git.baikalelectronics.ru Git - kernel.git/commit
ipv6: introduce per-interface counter for dad-completed ipv6 addresses
authorHannes Frederic Sowa <hannes@stressinduktion.org>
Wed, 26 Jun 2013 22:06:56 +0000 (00:06 +0200)
committerDavid S. Miller <davem@davemloft.net>
Sat, 29 Jun 2013 04:19:17 +0000 (21:19 -0700)
commitfb48422b7d789295a792b5f1fcae00b90bdf9724
tree51f7272d5c26eb44e90624e682daa54c96064886
parent87cbb5723a1b24fdc720050b21d15d46b468cd3f
ipv6: introduce per-interface counter for dad-completed ipv6 addresses

To reduce the number of unnecessary router solicitations, MLDv2 and IGMPv3
messages we need to track the number of valid (as in non-optimistic,
no-dad-failed and non-tentative) link-local addresses. Therefore, this
patch implements a valid_ll_addr_cnt in struct inet6_dev.

We now only emit router solicitations if the first link-local address
finishes duplicate address detection.

The changes for MLDv2 and IGMPv3 are in a follow-up patch.

While there, also simplify one if statement(one minor nit I made in one
of my previous patches):

if (!...)
do();
else
return;

<<into>>

if (...)
return;
do();

Cc: Flavio Leitner <fbl@redhat.com>
Cc: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Cc: David Stevens <dlstevens@us.ibm.com>
Suggested-by: David Stevens <dlstevens@us.ibm.com>
Signed-off-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Acked-by: Flavio Leitner <fbl@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/if_inet6.h
net/ipv6/addrconf.c