Thread (6 messages) flat view 6 messages, 4 authors, 2017-05-02

Re: [PATCH net] tcp: fix wraparound issue in tcp_lp

From: Neal Cardwell <ncardwell@google.com>
Date: 2017-05-02 00:32:06

On Mon, May 1, 2017 at 7:56 PM, Stephen Hemminger
[off-list ref] wrote:
On Mon, 01 May 2017 15:29:48 -0700
Agreed time wraparound would cause problems.
But why not use existing time_after() macro here?
I suspect this is because time_after() asserts that it is being used
on unsigned long (64 bits), and tcp_time_stamp is 32 bits.

I suppose for tcp_time_stamp comparisons we could re-use the u32 TCP
sequence macros for before() and after()? Even the comment for
before()/after() is already generic enough to apply to tcp_time_stamp:
"The next routines deal with comparing 32 bit unsigned ints and worry
about wraparound (automatic with unsigned arithmetic)." That might be
nice.

neal
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help