Bug 35852 - SO_PRIORITY does not set TOS field in IP header
Summary: SO_PRIORITY does not set TOS field in IP header
Status: RESOLVED CODE_FIX
Alias: None
Product: Documentation
Classification: Unclassified
Component: man-pages (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: documentation_man-pages@kernel-bugs.osdl.org
URL: http://www.kernel.org/doc/man-pages/o...
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-25 22:58 UTC by advaitdixit
Modified: 2015-05-06 08:50 UTC (History)
2 users (show)

See Also:
Kernel Version: n/a
Subsystem:
Regression: No
Bisected commit-id:


Attachments

Description advaitdixit 2011-05-25 22:58:05 UTC
The socket man page says that setsockopt with level=SOL_SOCKET  and optname=SO_PRIORITY sets the TOS field in IP header:
http://www.kernel.org/doc/man-pages/online/pages/man7/socket.7.html

However, my experiments and other web search results suggest that the socket man page is wrong. SO_PRIORITY does not seem to set the TOS field in the IP header.
Comment 1 xerofoify 2014-06-25 15:57:47 UTC
This bug is against a old man pages. Please check with a newer verison.
Nick
Comment 2 Michael Kerrisk 2015-05-05 19:24:28 UTC
(In reply to advaitdixit from comment #0)
> The socket man page says that setsockopt with level=SOL_SOCKET  and
> optname=SO_PRIORITY sets the TOS field in IP header:
> http://www.kernel.org/doc/man-pages/online/pages/man7/socket.7.html
> 
> However, my experiments and other web search results suggest that the socket
> man page is wrong. SO_PRIORITY does not seem to set the TOS field in the IP
> header.

A quick scan of the kernel source also finds nothing to suggest that SO_PRIORITY sets the TOS field in the IP header.

Various URLs question this text in teh man page
http://mailman.isi.edu/pipermail/ns-developers/2012-September/010638.html
https://athena.ecs.csus.edu/~bransone/pub/misc/netfilter_notes/qos
https://ocrete.ca/2009/07/24/when-a-man-page-lies/
http://lkml.iu.edu/hypermail/linux/net/0512.3/0008.html

So, I'll remove this text from socket(7) (and also similar text in ip(7)), and close this bug.

Thanks.
Comment 3 Michael Kerrisk 2015-05-06 08:50:30 UTC
And one more URL that questioned the effect of SO_PRIORITY on IP TOS:

http://thread.gmane.org/gmane.linux.man/2074

Note You need to log in before you can comment on or make changes to this bug.