[En-Nut-Discussion] Latest fix in tcpsm.c and tcpout.c

Harald Kipp harald.kipp at egnite.de
Fri Apr 11 15:20:19 CEST 2008


Ole Reinhardt wrote:
> The main problem was that the retransmission timer overflows after
> approximatly 65 seconds. This was mainly caused by the size of the
> variable holding the packet send time. It's an unsigned short. 

The problem was not the overflow by itself, but the fact that the 
retransmission timer may receive a value of 0. In other parts of the 
code a value of 0 is interpreted as "no retransmission waiting".

> But I'd like to suggest to use larger variables for the retransmission
> time. Why not use u_long instead of u_short?

That would not fix it, because it may still receive a value of 0 after 
approx. 49 days.

Henrik suggested not to decide on re-transmission on the tick value but 
on the send buffer queue pointer. IMHO, this is cleaner.

Changing the tick value from u_short to u_long would extend the 
retransmission time, but do we really need them above 65 seconds? I 
think that even on slow connections this is a very long time.

Wouldn't it be a better solution to use u_int (uint_t if we ever manage 
to switch to stdint), specially for 32 bitters?

Harald





More information about the En-Nut-Discussion mailing list