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] [day] [month] [year] [list]
Message-ID: <6807a59f7e9f48b6992261c1ec0562b2@EMEAWP-EXMB12.corp.brocade.com>
Date:	Wed, 26 Aug 2015 09:23:17 +0000
From:	Philip Downey <pdowney@...cade.com>
To:	David Miller <davem@...emloft.net>
CC:	"kuznet@....inr.ac.ru" <kuznet@....inr.ac.ru>,
	"jmorris@...ei.org" <jmorris@...ei.org>,
	"yoshfuji@...ux-ipv6.org" <yoshfuji@...ux-ipv6.org>,
	"kaber@...sh.net" <kaber@...sh.net>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: RE: [PATCH] IGMP: Inhibit reports for local multicast groups



> -----Original Message-----
> From: David Miller [mailto:davem@...emloft.net]
> Sent: Tuesday, August 25, 2015 10:20 PM
> To: Philip Downey
> Cc: kuznet@....inr.ac.ru; jmorris@...ei.org; yoshfuji@...ux-ipv6.org;
> kaber@...sh.net; linux-kernel@...r.kernel.org; netdev@...r.kernel.org
> Subject: Re: [PATCH] IGMP: Inhibit reports for local multicast groups
> 
> From: Philip Downey <pdowney@...cade.com>
> Date: Mon, 24 Aug 2015 12:39:17 +0100
> 
> > +extern int sysctl_igmp_link_local_reports;
>  ...
> > +/* IGMP reports for link-local multicast groups are enabled by default */
> > +#define IGMP_ENABLE_LLM         1
> > +
> > +int sysctl_igmp_link_local_reports __read_mostly = IGMP_ENABLE_LLM;
> > +
> > +#define IGMP_INHIBIT_LINK_LOCAL_REPORTS(_ipaddr) \
> > +	(ipv4_is_local_multicast(_ipaddr) && \
> > +	 (sysctl_igmp_link_local_reports == 0))
> > +
> 
> People know that "1" and "0" means enable and disable respectively, so this
> macros is pretty excessive.  Just remove it.
> 
> Also, simplify the name of the sysctl to something like
> "sysctl_igmp_llm_reports" or similar, and simplify the test against 0 to be in
> the canonical "!x" format.  Then the test can fit on one
> line:
> 
> 	(ipv4_is_local_multicast(_ipaddr) && !sysctl_igmp_llm_reports).

Thanks for reviewing David.
I will make the requested changes  (fitting the test on a single line was my main reason for introducing the macro - that and making it patently obvious what the test was doing.  Your suggestion would seem to meet that aim).

Will amend and resubmit.

Regards

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