tech-net archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: A strange TCP timestamp problem?



> On 29/06/2016, at 9:56 PM, Edgar Fuß <ef%math.uni-bonn.de@localhost> wrote:
> 
> Ah, I see. You mean a different (random) offset per connection.
> Yes, I guess that would achieve the same privacy.
> I guess it may be more difficult to implement because that per-connection 
> offset needs to be stored.
> 
> Could someone with network stack insight comment, please?

I had a look around in the source code.

There is a field in the TCP control structure called ts_timebase that gets initialised to “tcp_now - 1”. tcp_now is the clock used the network stack for tsval calculations and the fact that ts_timebase is initialised to “tcp_now - 1” will be why the initial tsval is always 1. 

I don’t know how the TCP stack handles tsval overflow/wrapping (or even if that’s a thing), so maybe initialise ts_timebase to small random numbers?

Cheers,
Lloyd


Home | Main Index | Thread Index | Old Index