Hello Everyone,

        I'm fiddling with TCP options -- I'd like to have the system
add MSS announcements as part of each packet's stock list of options.
I found that the options are generated in tcp.h in the 
tcp_build_and_update_options for all packets after the handshake. 

        It appears that I should be able to add the MSS option in there
without having to change code elsewhere in the kernel. However, when
I add the line:

/* I added "int mss" as a passed parameter and passed it from
   tcp_output.c */

*ptr++ = htonl((TCPOPT_MSS << 24) | (TCPOLEN_MSS << 16) | mss);


at the beginning of the function, tcpdump (and ipgrab) report that
all the options after the MSS are incorrect. When I add that line to
the end of the function, tcpdump shows that the option never made it
and worse, the timestamp (tstamp and ts_recent) get reversed!

The addition of the MSS info appears to be on a nice 4 byte boundry 
and with the possibility of being able to send any number of SACKs
in the options, adding one more entry shouldn't mean I need to change
anything else. Looking at the tcp_syn_build_options, I can't see
what I'm doing wrong. 

tcpdump's available for the curious...

Thanks for any assistance.

-Steve



-- 
______________________________________________________________________________
Steve Shah ([EMAIL PROTECTED]) | SysAdmin/Coder/Gabbernaut/DJ/Writer/Minister
http://www.cs.ucr.edu/~sshah  | We're not dropping out, we're infiltrating.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
              Dilbert: It's not a cartoon. It's a documentary.
-
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to [EMAIL PROTECTED]

Reply via email to