Subject: Re: setsockopt(IP_TOS) being privileged or distinct capability?

From: Philip Prindeville <[email-masked]>
Date: Mon, 05 Jul 2010 12:08:17 -0600

Say, on a slightly different subject... but still having to do with 
setsockopt(IP_TOS)... is it intentional that system call effectively 
does nothing if the socket is in listen(), connect(), or bind() states?

In other words, you have to issue the setsockopt() immediately after the 
socket() call, or it doesn't do anything.

As I remember, that's slightly different semantics from BSD, which 
allows you to change the markings on a bound or listening socket.

I've not walked through the kernel sources to see why this is.

-Philip