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: <20100426.112422.246526700.davem@davemloft.net>
Date:	Mon, 26 Apr 2010 11:24:22 -0700 (PDT)
From:	David Miller <davem@...emloft.net>
To:	ilpo.jarvinen@...sinki.fi
Cc:	fleitner@...hat.com, netdev@...r.kernel.org, eric.dumazet@...il.com
Subject: Re: [PATCH v3] TCP: avoid to send keepalive probes if receiving
 data

From: "Ilpo Järvinen" <ilpo.jarvinen@...sinki.fi>
Date: Mon, 26 Apr 2010 12:47:13 +0300 (EEST)

>>  			    !((1 << sk->sk_state) &
>>  			      (TCPF_CLOSE | TCPF_LISTEN))) {
>> -				__u32 elapsed = tcp_time_stamp - tp->rcv_tstamp;
>> +				u32 elapsed = min_t(u32,
>> +				      tcp_time_stamp - icsk->icsk_ack.lrcvtime,
>> +				      tcp_time_stamp - tp->rcv_tstamp);
>> +
> 
> I'd put this into a helper in include/net/tcp.h
> 
 ...
>> +	if (elapsed < keepalive_time_when(tp)) {
>> +		elapsed = keepalive_time_when(tp) - elapsed;
>> +		goto resched;
>> +	}
>> +
>>  	elapsed = tcp_time_stamp - tp->rcv_tstamp;
> 
> ...And then use it here too for setting the elapsed and doing the test 
> and what follows only once?
> 

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