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: <1334302258.9375.5.camel@edumazet-laptop>
Date:	Fri, 13 Apr 2012 09:30:58 +0200
From:	Eric Dumazet <eric.dumazet@...il.com>
To:	Alexandru Copot <alex.mihai.c@...il.com>
Cc:	davem@...emloft.net, fbl@...hat.com, kuznet@....inr.ac.ru,
	jmorris@...ei.org, yoshfuji@...ux-ipv6.org, kaber@...sh.net,
	netdev@...r.kernel.org, Daniel Baluta <dbaluta@...acom.com>
Subject: Re: [PATCH net-next v2] tcp: bind() use stronger condition for
 bind_conflict

Le vendredi 06 avril 2012 à 10:47 +0300, Alexandru Copot a écrit :
> From: Alex Copot <alex.mihai.c@...il.com>
> 
> We must try harder to get unique (addr, port) pairs when
> doing port autoselection for sockets with SO_REUSEADDR
> option set.
> 

...

Excellent patch Alex !

Two minor coding style problems in this part :

> +			if (!relax && reuse && sk2->sk_reuse &&
> +				sk2->sk_state != TCP_LISTEN) {
> +				const __be32 sk2_rcv_saddr = sk_rcv_saddr(sk2);
> +				if (!sk2_rcv_saddr || !sk_rcv_saddr(sk) ||
> +				    sk2_rcv_saddr == sk_rcv_saddr(sk))
> +					break;
> +			}
>  		}

Correct indentation, and one empty line after variable declaration :

	if (!relax && reuse && sk2->sk_reuse &&
	    sk2->sk_state != TCP_LISTEN) {
		const __be32 sk2_rcv_saddr = sk_rcv_saddr(sk2);

		if (!sk2_rcv_saddr || !sk_rcv_saddr(sk) ||
		    sk2_rcv_saddr == sk_rcv_saddr(sk))
			break;
	}



if (condition_one ||
    condition_two) {
	foo();

instead of

if (condition_on ||
	condition_two)
	foo();


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