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]
Date:	Mon, 1 Oct 2007 11:31:08 -0300
From:	Arnaldo Carvalho de Melo <acme@...stprotocols.net>
To:	Gerrit Renker <gerrit@....abdn.ac.uk>
Cc:	YOSHIFUJI Hideaki <yoshfuji@...paulia.net>, netdev@...r.kernel.org,
	yoshfuji@...ux-ipv6.org
Subject: Re: [PATCH 1/1][TCP]: break missing at end of switch statement

Em Mon, Oct 01, 2007 at 02:39:28PM +0100, Gerrit Renker escreveu:
> Quoting YOSHIFUJI Hideaki:
> | 
> |  > [TCP]: break missing at end of switch statement
> |  > 
> |  > Signed-off-by: Gerrit Renker <gerrit@....abdn.ac.uk>
> |  > ---
> |  > --- a/net/ipv4/tcp_input.c
> |  > +++ b/net/ipv4/tcp_input.c
> |  > @@ -3129,6 +3129,7 @@ static void tcp_reset(struct sock *sk)
> |  >  			return;
> |  >  		default:
> |  >  			sk->sk_err = ECONNRESET;
> |  > +			break;
> |  >  	}
> |  >  
> |  >  	if (!sock_flag(sk, SOCK_DEAD))
> |  
> |  NAK; it is not required at all.
> |  
> |  --yoshfuji
> |  
> If it were true what you are saying then the statement 
> 
>        `sk->sk_err = ECONNRESET;' 
> 
> can go as well since it will always be overridden.

Gerrit,

        It is not required. The statement you mention will be executed
when the sk_state is not one of TCP_SYN_SENT, TCP_CLOSE_WAIT or
TCP_CLOSE.

	A 'break' is only needed in a label block if it is not the last
one.

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