lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHA+R7ODewXP69ULsR0RD+c3BEfMa90zATRjHF3dC9Dkv7jgZw@mail.gmail.com>
Date:	Wed, 10 Sep 2014 10:15:01 -0700
From:	Cong Wang <cwang@...pensource.com>
To:	Sabrina Dubroca <sd@...asysnail.net>
Cc:	netdev <netdev@...r.kernel.org>,
	Hannes Frederic Sowa <hannes@...essinduktion.org>,
	David Miller <davem@...emloft.net>
Subject: Re: [PATCH net] ipv6: clean up anycast when an interface is destroyed

On Wed, Sep 10, 2014 at 3:27 AM, Sabrina Dubroca <sd@...asysnail.net> wrote:
> diff --git a/net/ipv6/anycast.c b/net/ipv6/anycast.c
> index ff2de7d9d8e6..a1bf80574bfe 100644
> --- a/net/ipv6/anycast.c
> +++ b/net/ipv6/anycast.c
> @@ -351,6 +351,28 @@ static int ipv6_dev_ac_dec(struct net_device *dev, const struct in6_addr *addr)
>         return __ipv6_dev_ac_dec(idev, addr);
>  }
>
> +/* Device is being destroyed: clean up */

This comment is useless.

> +void ipv6_ac_destroy_dev(struct inet6_dev *idev)
> +{
> +       struct ifacaddr6 *aca;
> +
> +       write_lock_bh(&idev->lock);
> +       while ((aca = idev->ac_list) != NULL) {
> +               idev->ac_list = aca->aca_next;
> +               write_unlock_bh(&idev->lock);
> +
> +               addrconf_leave_solict(idev, &aca->aca_addr);
> +
> +               dst_hold(&aca->aca_rt->dst);
> +               ip6_del_rt(aca->aca_rt);
> +
> +               aca_put(aca);
> +
> +               write_lock_bh(&idev->lock);
> +       }
> +       write_unlock_bh(&idev->lock);
> +}
> +

I think you can probably refactor the code out of __ipv6_dev_ac_dec()
so that you don't have to kinda duplicate the code?
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ