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: <20090121.135452.57299499.davem@davemloft.net>
Date:	Wed, 21 Jan 2009 13:54:52 -0800 (PST)
From:	David Miller <davem@...emloft.net>
To:	timo.teras@....fi
Cc:	netdev@...r.kernel.org, kuznet@....inr.ac.ru
Subject: Re: [PATCH] gre: strict physical device binding

From: David Miller <davem@...emloft.net>
Date: Mon, 19 Jan 2009 17:22:24 -0800 (PST)

> From: Timo Teras <timo.teras@....fi>
> Date: Mon, 19 Jan 2009 12:50:05 +0200
> 
> > Check the device on receive path and allow otherwise identical devices
> > as long as the physical device differs.
> > 
> > This is useful for NBMA tunnels, where you want to use different gre IP
> > for each public IP available via different physical devices.
> > 
> > Signed-off-by: Timo Teras <timo.teras@....fi>
> 
> Seems reasonable, applied.
> 
> Thanks Timo.

BTW, isn't it much more efficient to implement this priority scoring
using a simple integer instead of this big honking 4 entry array of
pointers on the stack (one entry of which isn't even _used_)?

Something like:

	int score = 4;

	...
	for_each_hash_chain() {
		if (!match)
			continue;
		if (exact_match)
			return this_entry;
		this_score = 0;
		if (condition1)
			this_score |= 2;
		if (condition2)
			this_score |= 1;
		if (this_score < score) {
			score = this_score;
			cand = this_entry;
		}
	}
	...
	return cand;
--
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