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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 28 Aug 2013 20:08:31 -0400 (EDT)
From:	David Miller <davem@...emloft.net>
To:	linus.luessing@....de
Cc:	bridge@...ts.linux-foundation.org, stephen@...workplumber.org,
	netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
	herbert@...dor.apana.org.au, amwang@...hat.com,
	linux@...er-net.org.uk
Subject: Re: [PATCH] bridge: separate querier and query timer into
 IGMP/IPv4 and MLD/IPv6 ones

From: Linus Lüssing <linus.luessing@....de>
Date: Mon, 26 Aug 2013 12:01:06 +0200

> Currently we would still potentially suffer multicast packet loss if there
> is just either an IGMP or an MLD querier: For the former case, we would
> possibly drop IPv6 multicast packets, for the latter IPv4 ones. This is
> because we are currently assuming that if either an IGMP or MLD querier
> is present that the other one is present, too.
> 
> This patch makes the behaviour and fix added in
> "bridge: disable snooping if there is no querier" (b00589af3b04)
> to also work if there is either just an IGMP or an MLD querier on the
> link: It refines the deactivation of the snooping to be protocol
> specific by using separate timers for the snooped IGMP and MLD queries
> as well as separate timers for our internal IGMP and MLD queriers.
> 
> Signed-off-by: Linus Lüssing <linus.luessing@....de>

I think the logic of the fix is fine, but theres a lot of duplication
here.

Why not make a:

struct bridge_mcast_timer {
	struct	timer_list	timer;
	u32			queries_sent;
	u32			startup_queries_sent;

};

Then in the port structure you have:

	struct bridge_mcast_timer	ip4;
	struct bridge_mcast_timer	ip6;

And pass a reference to the right one into generic helper functions.

That sounds a lot better right?

Please make this improvement and resubmit, thanks.
--
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