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]
Date:	Mon, 21 Jan 2013 09:12:06 -0500
From:	David Stevens <dlstevens@...ibm.com>
To:	Nicolas Dichtel <nicolas.dichtel@...nd.com>
Cc:	davem@...emloft.net, netdev@...r.kernel.org,
	netdev-owner@...r.kernel.org,
	Nicolas Dichtel <nicolas.dichtel@...nd.com>
Subject: Re: [PATCH net-next 2/2] mcast: add multicast proxy support (IPv4 and IPv6)

> From: Nicolas Dichtel <nicolas.dichtel@...nd.com>

> diff --git a/net/ipv4/ipmr.c b/net/ipv4/ipmr.c
> index a9454cb..e8ec94a 100644
> --- a/net/ipv4/ipmr.c
> +++ b/net/ipv4/ipmr.c
> @@ -828,6 +828,48 @@ static struct mfc_cache *ipmr_cache_find(struct
> mr_table *mrt,
>     return NULL;
>  }
> 
> +/* Look for a (*,*,oif) entry */
> +static struct mfc_cache *ipmr_cache_find_any_parent(struct mr_table 
*mrt,
> +                      int vifi)
> +{
> +   int line = MFC_HASH(0, 0);
> +   struct mfc_cache *c;
> +
> +   list_for_each_entry_rcu(c, &mrt->mfc_cache_array[line], list)
> +      if (c->mfc_origin == 0 &&
> +          c->mfc_mcastgrp == 0 &&

        These are addresses-- should compare against INADDR_ANY to make 
that
clear.

...
> +static struct mfc_cache *ipmr_cache_find_any(struct mr_table *mrt,
> +                    __be32 mcastgrp, int vifi)
> +{
...
> +
> +   list_for_each_entry_rcu(c, &mrt->mfc_cache_array[line], list)
> +      if (c->mfc_origin == 0 && c->mfc_mcastgrp == mcastgrp) {

        Use INADDR_ANY instead of 0.

> 
> -   if (!ipv4_is_multicast(mfc->mfcc_mcastgrp.s_addr))
> +   if (mfc->mfcc_mcastgrp.s_addr &&
> +       !ipv4_is_multicast(mfc->mfcc_mcastgrp.s_addr))
>        return -EINVAL;

        mfc->mfcc_mcastgrp.s_addr != INADDR_ANY &&
 
Otherwise, it looks ok to me. With those changes,

Acked-by: David L Stevens <dlstevens@...ibm.com>

                                                +-DLS

--
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