|
|
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@xxxxxxxxx>
>
> 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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
[Linux Kernel Discussion] [Ethernet Bridging] [Linux Wireless Networking] [Linux Bluetooth Networking] [Linux Networking Users] [VLAN] [Git] [IETF Annouce] [Linux Assembly] [Security] [Bugtraq] [Photo] [Singles Social Networking] [Yosemite Information] [MIPS Linux] [ARM Linux Kernel] [ARM Linux] [Linux Virtualization] [Linux Security] [Linux IDE] [Linux RAID] [Linux SCSI] [Free Dating]
![]() |
![]() |