Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 12 Nov 2015 19:54:38 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-net@FreeBSD.org
Subject:   [Bug 204438] setsockopt() handling of kern.ipc.maxsockbuf limit
Message-ID:  <bug-204438-2472-K3VYLEhZHU@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-204438-2472@https.bugs.freebsd.org/bugzilla/>
References:  <bug-204438-2472@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=204438

--- Comment #16 from Cameron Sparr <cameronsparr@gmail.com> ---
I forgot that it's actually spelled out pretty clearly in the comments of the
code:

/* Don't error on this BSD doesn't and if you think
 * about it this is right. Otherwise apps have to
 * play 'guess the biggest size' games. RCVBUF/SNDBUF
 * are treated in BSD as hints
 */
val = min_t(u32, val, sysctl_rmem_max);

So essentially they are just treating those buffer sizes as "hints". It makes
some sense, because they are correct about applications having no idea what
size they can actually set it to (without root access to the system).

So that would be another option, which is to just set the buffer to min(cc,
sb_max_adj)

-- 
You are receiving this mail because:
You are the assignee for the bug.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-204438-2472-K3VYLEhZHU>