]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
wpa: ctrl_iface set sendbuf size
authorBjoern A. Zeeb <bz@FreeBSD.org>
Sun, 12 Nov 2023 20:33:41 +0000 (20:33 +0000)
committerBjoern A. Zeeb <bz@FreeBSD.org>
Mon, 19 Feb 2024 16:06:34 +0000 (16:06 +0000)
commit4a646242c37f59d18cadb0ef0bb92860846d2db8
treea1c6f11dda266ef06717f73b1eaf92f3492a0335
parent7d781b891eeda938630ef26b29690c56b05e3983
wpa: ctrl_iface set sendbuf size

In order to avoid running into the default net.local.dgram.maxdgram
of 2K currently when calling sendto(2) try to set the sndbuf size to
the maximum ctrl message size.
While on 14 and 15 this does not actually raise the limit anymore (and
be7c095ac99ad29fd72b780c7d58949a38656c66 raised it for syslogd and this),
FreeBSD 13 still requires this change and it will work as expected there.
In addition we always ensure a large enough send buffer this way
independent of kernel defaults.
The problem occured, e.g., when the scan_list result had enough BSSIDs
so the text output would exceed 2048 bytes.

Approved by: re (cperciva)
Sponsored by: The FreeBSD Foundation
PR: 274990
Reviewed by: cy, adrian (with previous comment)
Differential Revision: https://reviews.freebsd.org/D42558

(cherry picked from commit 1edc20b76953d9ef571b0bcf89b206b98ed13d9b)
(cherry picked from commit 97186b5cf5aa1d97f1a4e8e1b811315a39fb163d)
contrib/wpa/wpa_supplicant/ctrl_iface_unix.c