On Thu, Aug 25, 2016 at 12:03:30PM +0800, Xin Long wrote: > > Or add a refcnt to its members. </idea> > > NETDEV_UP, it gets a ++ if it's already there > > NETDEV_DOWN, it gets a -- and cleans it up if it reaches 0 > > And the rest probably could stay the same. > > > Yes, it could also avoid the issue of amounts of duplicate addrs. > or add a nic index variable to its members. > > But I still prefer the current patch. > 1. This issue only happens when server bind 'ANY' addresses. > we don't need to add any new members to struct sctp_sockaddr_entry. > especially if it's a really corner issue, we fix this as an improvement. > > 2. It's yet two issues here, the duplicate addrs may be from > a) different local NICs. > b) the same one NIC. > It may be unexpectable to filter them in NETDEV_UP/DOWN events. > > 3. We check it only when sctp really binds it, just like sctp_do_bind. > > What do you think ? Yep, +1. LGTM the current patch, thanks. -- To unsubscribe from this list: send the line "unsubscribe linux-sctp" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html