Ethereal-dev: Re: [ethereal-dev] Bug in packet-tcp: ack value not in tree when RST
> This should be easy to fix.
I.e., we should fix the summary line to list the ack only if ACK is set?
I don't see anything obvious in RFC 793 to indicate that the
Acknowledgment field is meaningful if ACK isn't set, regardless of
whether RST is set or not. RFC 793 says:
Acknowledgment Number: 32 bits
If the ACK control bit is set this field contains the value of the
next sequence number the sender of the segment is expecting to
receive. Once a connection is established this is always sent.
Later, under "Reset Generation", it says:
2. If the connection is in any non-synchronized state (LISTEN,
SYN-SENT, SYN-RECEIVED), and the incoming segment acknowledges
something not yet sent (the segment carries an unacceptable ACK), or
if an incoming segment has a security level or compartment which
does not exactly match the level and compartment requested for the
connection, a reset is sent.
...
If the incoming segment has an ACK field, the reset takes its
sequence number from the ACK field of the segment, otherwise the
reset has sequence number zero and the ACK field is set to the sum
of the sequence number and segment length of the incoming segment.
The connection remains in the same state.
Presumably in the "otherwise" case, the reset has both RST and ACK set.