History log of /freebsd-14.2/sys/compat/linux/linux_socket.c (Results 1 – 25 of 257)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: release/13.4.0-p5, release/13.5.0-p1, release/14.2.0-p3, release/13.5.0, release/14.2.0-p2, release/14.1.0-p8, release/13.4.0-p4, release/14.1.0-p7, release/14.2.0-p1, release/13.4.0-p3, release/14.2.0, release/13.4.0, release/14.1.0
# 8c81694a 22-Apr-2024 Lexi Winter <[email protected]>

linux: ignore setsockopt(IPV6_RECVERR)

Under Linux, the socket options IP_RECVERR and IPV6_RECVERR are used to
receive socket errors via a dedicated 'error queue' which can be
retrieved via recvmsg(

linux: ignore setsockopt(IPV6_RECVERR)

Under Linux, the socket options IP_RECVERR and IPV6_RECVERR are used to
receive socket errors via a dedicated 'error queue' which can be
retrieved via recvmsg(). FreeBSD does not support this functionality.

For IPv4, the sysctl compat.linux.ignore_ip_recverr can be set to 1 to
silently ignore attempts to set IP_RECVERR and return success to the
application, which is wrong, but is required for (among other things)
a functional DNS client in recent versions of glibc.

Add support for ignoring IPV6_RECVERR, controlled by the same sysctl.
This fixes DNS in Linux when using IPv6 resolvers.

Reviewed by: imp, Jose Luis Duran
Pull Request: https://github.com/freebsd/freebsd-src/pull/1118

(cherry picked from commit ca63710d3668cf6f3cb4faf065d8b4eeffa028ad)

show more ...


Revision tags: release/13.3.0, release/14.0.0
# 524c9acc 20-Aug-2023 Dmitry Chagin <[email protected]>

linux(4): Replace linux32_copyiniov by freebsd32_copyiniov

MFC after: 1 month


# 4f9fac78 19-Aug-2023 Dmitry Chagin <[email protected]>

linux(4): Return EAGAIN instead of ENOBUFS for non-blocking sockets in sendfile

MFC after: 1 month


# da5a6738 19-Aug-2023 Dmitry Chagin <[email protected]>

linux(4): Allow in fd to be a socket in sendfile

In this case sendfile fallback is used.

MFC after: 1 month


# 3460fab5 18-Aug-2023 Dmitry Chagin <[email protected]>

linux(4): Remove sys/cdefs.h inclusion where it's not needed due to 685dc743


# 6ecab394 17-Aug-2023 Dmitry Chagin <[email protected]>

linux(4): Drop bogus __arm__ condition due to lack of 32-bit arm support

MFC after: 1 month


# 4a521544 17-Aug-2023 Dmitry Chagin <[email protected]>

linux(4): Don't miss error from underlying in sendfile

MFC after: 1 month


# bb66c597 17-Aug-2023 James McLaughlin <james_mclgh.net>

linux(4): Add sendfile fallback for non-socket fds

Before Linux 2.6.33, out_fd must refer to a socket. Since Linux 2.6.33
it can be any file.
The patch was originally provided by James McLaughlin an

linux(4): Add sendfile fallback for non-socket fds

Before Linux 2.6.33, out_fd must refer to a socket. Since Linux 2.6.33
it can be any file.
The patch was originally provided by James McLaughlin and adapted by me
for copy_file_range.

PR: 262535
Differential revision: https://reviews.freebsd.org/D34555
MFC after: 1 month

show more ...


# 7307c439 17-Aug-2023 Dmitry Chagin <[email protected]>

linux(4): Use native off_t for fo_sendfile call

MFC after: 1 month


# 685dc743 16-Aug-2023 Warner Losh <[email protected]>

sys: Remove $FreeBSD$: one-line .c pattern

Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/


# 2467ccdd 14-Aug-2023 Dmitry Chagin <[email protected]>

linux(4): Fix MSG_CTRUNC handling in recvmsg()

The MSG_CTRUNC flag of the msg_flags member of the message header is
set uppon successful completition if the control data was truncated.
Upon return f

linux(4): Fix MSG_CTRUNC handling in recvmsg()

The MSG_CTRUNC flag of the msg_flags member of the message header is
set uppon successful completition if the control data was truncated.
Upon return from a successful call msg_controllen should contain the
length of the control message sequence.

Fixes: 0eda2cea
MFC after: 1 week

show more ...


# 9d0c9b6d 14-Aug-2023 Dmitry Chagin <[email protected]>

linux(4): Add a comment explaining udata freeing on error

MFC after: 1 week


# de20eb26 14-Aug-2023 Dmitry Chagin <[email protected]>

linux(4): Refactor recvmsg

As the amount of handled anxiliary messages grows move they handlers
into a separate functions.

MFC after: 1 week


# bbaa5523 14-Aug-2023 Dmitry Chagin <[email protected]>

linux(4): Skip unsupported anxiliary message

Instead of returning error, skip unsupported anxiliary messages and
fail if no one handled.

MFC after: 1 week


# a21238d8 14-Aug-2023 Dmitry Chagin <[email protected]>

linux(4): Improve readability of recvmsg control buffer copyout code

MFC after: 1 week


# 43c3beb7 14-Aug-2023 Dmitry Chagin <[email protected]>

linux(4): Drop bogus empty line in linux_socket.c

MFC after: 1 week


# 7d561928 14-Aug-2023 Dmitry Chagin <[email protected]>

linux(4): Fix control message size calculation again

It looks Linux recvmsg allows msg_controllen size less then CMSG_SPACE
buffer, at least for case with one cmsghdr. Glibc misc/tst-scm_rights
test

linux(4): Fix control message size calculation again

It looks Linux recvmsg allows msg_controllen size less then CMSG_SPACE
buffer, at least for case with one cmsghdr. Glibc misc/tst-scm_rights
test succed on Ubuntu 23.04

Fixes: 67116c69 "linux(4): Fix control message size calculation"
MFC after: 1 week

show more ...


# 67116c69 29-Jul-2023 Dmitry Chagin <[email protected]>

linux(4): Fix control message size calculation

To determine the size in bytes needed to hold a control message
and its contents of length len, CMSG_SPACE should be used.

Reviewed by:
Differential R

linux(4): Fix control message size calculation

To determine the size in bytes needed to hold a control message
and its contents of length len, CMSG_SPACE should be used.

Reviewed by:
Differential Revision: https://reviews.freebsd.org/D41224
MFC after: 1 week

show more ...


# 4d846d26 10-May-2023 Warner Losh <[email protected]>

spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD

The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch
up to that fact and revert to their recommended match of

spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD

The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch
up to that fact and revert to their recommended match of BSD-2-Clause.

Discussed with: pfg
MFC After: 3 days
Sponsored by: Netflix

show more ...


Revision tags: release/13.2.0
# a927409c 04-Mar-2023 Dmitry Chagin <[email protected]>

linux(4): Rename struct l_ifreq members names to avoid conflicts with FreeBSD

For now we are using mixed names to access struct ifreq members, some
of Linux (ifr_name, ifr_ifindex), others of FreeBS

linux(4): Rename struct l_ifreq members names to avoid conflicts with FreeBSD

For now we are using mixed names to access struct ifreq members, some
of Linux (ifr_name, ifr_ifindex), others of FreeBSD. To avoid conflicts
switch to use FreeBSD names.

Reviewed by: jhibbits
Differential Revision: https://reviews.freebsd.org/D38792

show more ...


# c8a79231 14-Feb-2023 Dmitry Chagin <[email protected]>

linux(4): Rename linux_timer.h to linux_time.h

To avoid confusing people, rename linux_timer.h to linux_time.h,
as linux_timer.c is the implementation of timer syscalls only,
while linux_time.c cont

linux(4): Rename linux_timer.h to linux_time.h

To avoid confusing people, rename linux_timer.h to linux_time.h,
as linux_timer.c is the implementation of timer syscalls only,
while linux_time.c contains implementation of all stuff declared
in linux_time.h.

MFC after: 2 weeks

show more ...


# d8e53d94 14-Feb-2023 Dmitry Chagin <[email protected]>

linux(4): Cleanup includes under compat/linux

Cleanup unneeded includes, sort the rest according to style(9).
No functional changes.

MFC after: 2 weeks


# acbbd5c0 14-Feb-2023 Dmitry Chagin <[email protected]>

linux(4): Cleanup sys/uio.h where linux_uitl.h is included

MFC after: 2 weeks


# 10d16789 12-Feb-2023 Dmitry Chagin <[email protected]>

linux(4): Get rid of the opt_compat.h include.

Since e013e369 COMPAT_LINUX, COMPAT_LINUX32 build options are removed,
so include of opt_compat.h is no more needed.

MFC after: 2 weeks


Revision tags: release/12.4.0
# 7c40e2d5 26-Aug-2022 Alexander V. Chernikov <[email protected]>

linuxolator: add netlink support

Add the glue code to support netlink in Linuxolator.
linux_common(4) now depends on netlink(4).

All netlink protocol constants are consistent with the Linux version

linuxolator: add netlink support

Add the glue code to support netlink in Linuxolator.
linux_common(4) now depends on netlink(4).

All netlink protocol constants are consistent with the Linux version.
However, certain OS-specific constants such as AF_INET6, interface
flags or default routing table id, are different between FreeBSD and
Linux. Thus, it may be needed to rewrite some message parts or even
rewrite the whole message, adding or removing some TLVs. The core
netlink implementation code provides efficient rewriting callbacks
which Linuxolator now uses.

Reviewed by: dchagin
Differential Revision: https://reviews.freebsd.org/D36361
MFC after: 2 months

show more ...


1234567891011