[PATCH] Properly handle Linux TCP socket options

John Baldwin jhb at freebsd.org
Tue Jan 22 17:15:00 UTC 2013


On Monday, January 21, 2013 2:55:22 pm Alexander Leidinger wrote:
> On Sat, 19 Jan 2013 11:26:13 -0500 John Baldwin <jhb at freebsd.org> wrote:
> 
> > The current setsockopt() wrapper for the Linux ABI claims that Linux
> > and FreeBSD use the same values for TCP socket options.  This is true
> > for TCP_NODELAY and TCP_MAXSEG but not for any other options.  This
> > patch adds a mapping routine for TCP options similar to that used for
> > other socket option levels.  I believe this mapping to be correct in
> > terms of which FreeBSD options have the same semantics as Linux
> > options based on comparing code in the two kernels, but I'm not 100%
> > certain about TCP_MD5SIG since the Linux code that it maps to is not
> > as clear (it calls some function pointer and it is not clear if it is
> > accepting a simple boolean value similar to FreeBSD's).
> 
> What about a message for unknown options?

We do not do that now for any options (socket level or otherwise).  You could 
easily add that in linux_setsockopt(), but that should be a separate commit.

-- 
John Baldwin


More information about the freebsd-net mailing list