[comp.protocols.tcp-ip] A thought on RFC1145

zweig@brutus.cs.uiuc.edu (Johnny Zweig) (03/07/90)

I just had a thought about RFC1145 yesterday at lunch, and wanted to
let the Net see if they can think of anything more on the subject.

RFC1145 suggests a TCP option to allow TCP connections to use a checksum-
algorithm different from the traditional TCP checksum algorithm.  Since
it is implicit in the RFC that different connections on the same host
could be using different checksum algorithms, a funny thing happens. It
becomes necessary to look into each segment to retrieve the port numbers
and figure out which connection it is BEFORE checking the checksum!

Of course, uncorrupted packets will still check, so there's no harm in
looking into one. And, presumably, if a packet is corrupted anywhere other
than in the port numbers, the checksum algorithm for that connection will
still detect the fact.  The only thing that's a little weird is if the
port numbers themselves get scrogged so the wrong checksum algorithm is
used to check the thing.  This can only happen on damaged packets, so
the fact that they can't get used on their proper connection is not a
loss; and it seems overwhelmingly unlikely that the checksum would just
happen to check using the algorithm of the incorrectly-specified connection
and that the sequence numbers would makes any sense -- but it is a strange
sort of thing to think about.  It just seems strange to me to be using
information from a segment before checking whether the information is
correct....

Another weird thing is the fact that RST-segments will use the vanilla
TCP checksum (to allow for hosts to lose all information about a
connection and still generate a RST-segment that will be acceptable to
the other side) -- this means that if a non-vanilla  checksum fails you
have to look for MORE stuff in the still-questionably corrupt packet
(the RST bit) and check again. A little scary....

Also please note that any line containing the word "fragment" in your
copy of RFC1145 is spurious (there was an error after it left the hands
of the authors and entered into the clutches of the editors, who do a
great job and everyone loves them, even though they do make mistakes
now and then) and should be deleted.  It will be re-released without
the offending lines real soon now.

-Johnny 1145