> Also, from doing a google search on setsockopt and IP_TOS, I was able
> to find exactly zero pieces of source code that do this, so I may be
> the first one to every try it :)
Really? Indeed, telnet(d), ftp(d) et al. are too modernistic
and still not published applications. :-)
> Did you look at the different bit-ordering in RFC 1349?
It is not different.
Well, try to read some other RFC yet. Starting from 791.
Compare them to our header files. Assume only that all of them
are right and you are not the first person using IP. :-)
> I think that #ifdef code should be changed to check for the
> run-time enabled-ness of ECN.
"run-time ECN" is non-sense. If ECN is disabled, ECN bits
must be zero, otherwise you break ECN for others.
Even option CONFIG_INET_ECN is not _our_ choice, it means the only
thing: whether ECN exists in nature or it does not.
If it exists, user of tcp does not have control on ECN bits exactly
like he is not allowed to send bogus SEQ, ACK etc.
And Dave noticed right thing: it would be better to zap these bits
completely and do not create options for things, which are not optional.
> when I specifically disable ECN through the /proc/ interface,
> then I should be able to set the bits as specified in 1349 or whatever.
You cannot disable ECN with sysctl. tcp_ecn controls negotiation
of ECN capability. If it is disabled, ECN bits must be zero.
Exactly like setting tcp_sack to zero does not allow you
to send some random crap under tag of sack option. See?
> I eventually found it, but couldn't easily explain what I was seeing.
This is not very wonderful. Try to improve your test to use COBOL
instead of C++, you will lose not only vision, audition too. :-)
> What happens if a linux box is connected to something that is still using
> RFC 1349 and gets sent a packet with one of the ECN bits set?
What happpens if a linux box sends spam mails following corresponding RFC?
Nothing happens, but a bit of abuse. :-)
The story is very simple: when ECN was proposed people scanned
internet traffic (seems, on east coast backbone) and discovered
that bit 1 is not used at all. (BTW reserved bit 0 was used by someone :-)).
Certainly, some person may wake up on August 2001 and start to use
for something different of ECN. :-)