ipv6: resend MLD report if a link-local address completes DAD
Subsystems (3)
PATCH 2/2 ipv6: resend MLD report if a link-local address completes DAD
RFC3590/RFC3810 specifies we should resend MLD reports as soon as a valid link-local address is available.
We now use the valid_ll_addr_cnt to check if it is necessary to resend a new report.
Changes since Flavio Leitner's version:
a) adapt for valid_ll_addr_cnt
b) resend first reports directly in the path and just arm the timer for mc_qrv-1 resends.
--- include/net/addrconf.h | 1 + include/net/if_inet6.h | 2 ++ net/ipv6/addrconf.c | 17 ++++++++++++----- net/ipv6/mcast.c | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 67 insertions(+), 5 deletions(-)
include/net/addrconf.h +1 -0
@@ -155,6 +155,7 @@ extern bool ipv6_chk_mcast_addr(struct net_device *dev,const struct in6_addr *group, const struct in6_addr *src_addr); +extern void ipv6_mc_dad_complete (struct inet6_dev *idev);/* * identify MLD packets for MLD filter exceptions */
include/net/if_inet6.h +2 -0
@@ -174,10 +174,12 @@ struct inet6_dev {unsigned char mc_qrv;unsigned char mc_gq_running;unsigned char mc_ifc_count; +unsigned char mc_dad_count;unsigned long mc_v1_seen;unsigned long mc_maxdelay;struct timer_list mc_gq_timer;/* general query timer */ struct timer_list mc_ifc_timer;/* interface change timer */ +struct timer_list mc_dad_timer;/* dad complete mc timer */ struct ifacaddr6 *ac_list;rwlock_t lock;
net/ipv6/addrconf.c +12 -5
@@ -3277,7 +3277,7 @@ static void addrconf_dad_completed(struct inet6_ifaddr *ifp) {struct net_device *dev = ifp->idev->dev;struct in6_addr lladdr; -bool send_rs; +bool send_rs, send_mld;addrconf_del_dad_timer (ifp);
@@ -3293,14 +3293,21 @@ static void addrconf_dad_completed(struct inet6_ifaddr *ifp)read_lock_bh (&ifp->idev->lock);spin_lock (&ifp->lock); - send_rs =ipv6_accept_ra (ifp->idev) && + send_mld =ipv6_addr_type (&ifp->addr) &IPV6_ADDR_LINKLOCAL && + ifp->idev->valid_ll_addr_cnt ==1 ; + send_rs = send_mld && +ipv6_accept_ra (ifp->idev) && ifp->idev->cnf.rtr_solicits >0 && - (dev->flags&IFF_LOOPBACK ) ==0 && -ipv6_addr_type (&ifp->addr) &IPV6_ADDR_LINKLOCAL && - ifp->idev->valid_ll_addr_cnt ==1 ; + (dev->flags&IFF_LOOPBACK ) ==0 ;spin_unlock (&ifp->lock);read_unlock_bh (&ifp->idev->lock); +/* While dad is in progress mld report's source address is in6_addrany. +* Resend with proper ll now. +*/ +if (send_mld) +ipv6_mc_dad_complete (ifp->idev); +if (send_rs) {/* * If a host as already performed a random delay
net/ipv6/mcast.c +52 -0
76 lines not on this page · raw message
Signature · 1 line
1.8.1.4
Quoted 11 lines · Hannes Frederic Sowa
RFC3590/RFC3810 specifies we should resend MLD reports as soon as a valid link-local address is available.
We now use the
valid_ll_addr_cntto check if it is necessary to resend a new report.Changes since Flavio Leitner's version:
a) adapt forvalid_ll_addr_cnt
b) resend first reports directly in the path and just arm the timer for mc_qrv-1 resends.
Quoted 6 lines
Reported-by Flavio Leitner <[email protected]>Cc Hideaki YOSHIFUJI <[email protected]>Cc David Stevens <[email protected]>Signed-off-by Hannes Frederic Sowa <[email protected]>Signed-off-by Flavio Leitner <[email protected]>---
Looks good as well and fixes the issue I had.
(my signed-off is there already)
Thanks,
--
fbl
Quoted 19 lines · Flavio Leitner
Quoted 11 lines · Hannes Frederic Sowa
RFC3590/RFC3810 specifies we should resend MLD reports as soon as a valid link-local address is available.
We now use the
valid_ll_addr_cntto check if it is necessary to resend a new report.Changes since Flavio Leitner's version:
a) adapt forvalid_ll_addr_cnt
b) resend first reports directly in the path and just arm the timer for mc_qrv-1 resends.Quoted 6 lines
Reported-by Flavio Leitner <[email protected]>Cc Hideaki YOSHIFUJI <[email protected]>Cc David Stevens <[email protected]>Signed-off-by Hannes Frederic Sowa <[email protected]>Signed-off-by Flavio Leitner <[email protected]>---
Quoted 2 lines
Looks good as well and fixes the issue I had.
(my signed-off is there already)
Thanks for the testing and review.
May I ask in what situation you want to increase the dad_transmits? Did they get dropped as part of spanning tree initialization on a port?
Greetings,
Hannes
David Miller
maintainerFrom: Flavio Leitner <[email protected]>
Date: Thu, 27 Jun 2013 19:04:48 -0300
Quoted 19 lines · Hannes Frederic Sowa
Quoted 11 lines
RFC3590/RFC3810 specifies we should resend MLD reports as soon as a valid link-local address is available.
We now use the
valid_ll_addr_cntto check if it is necessary to resend a new report.Changes since Flavio Leitner's version:
a) adapt forvalid_ll_addr_cnt
b) resend first reports directly in the path and just arm the timer for mc_qrv-1 resends.Quoted 6 lines
Reported-by Flavio Leitner <[email protected]>Cc Hideaki YOSHIFUJI <[email protected]>Cc David Stevens <[email protected]>Signed-off-by Hannes Frederic Sowa <[email protected]>Signed-off-by Flavio Leitner <[email protected]>---
Quoted 2 lines
Looks good as well and fixes the issue I had.
(my signed-off is there already)
Also applied, thanks.