History log of /libuv/src/unix/udp.c (Results 1 – 25 of 155)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 1c778bd0 17-Sep-2024 Raihaan Shouhell

darwin: add udp mmsg support (#4527)


# 7c491bde 11-Jul-2024 Viacheslav Muravyev

unix,win: remove unused req parameter from macros (#4435)

Remove the unused `req` parameter from the uv__req_register and
uv__req_unregister macros.


# ba24986f 20-Jun-2024 Andy Pan

unix: support SO_REUSEPORT with load balancing for UDP (#4419)

Signed-off-by: Andy Pan <i@andypan.me>


# 10ccd084 20-May-2024 Andy Pan

dragonfly: disable SO_REUSEPORT for UDP socket bindings (#4410)

---------

Signed-off-by: Andy Pan <i@andypan.me>


# 77e4cd5b 25-Mar-2024 Ben Noordhuis

linux: don't use sendmmsg() for single datagrams (#4366)

Benchmarking shows that sendmsg() is persistently around 1% faster for
single datagrams, and that kind of stands to reason becaus

linux: don't use sendmmsg() for single datagrams (#4366)

Benchmarking shows that sendmsg() is persistently around 1% faster for
single datagrams, and that kind of stands to reason because there is
less setup overhead, and the kernel has to copy in less data.

Fixes: https://github.com/libuv/libuv/issues/4320

show more ...


# a7c44d67 28-Feb-2024 Geddy

udp,unix: fix sendmsg use-after-free (#4321)

Issue:
1. uv__io_poll calls uv__udp_io with revents == POLLIN + POLLOUT
2. uv__udp_io calls your recv_cb
3. you close the handle in c

udp,unix: fix sendmsg use-after-free (#4321)

Issue:
1. uv__io_poll calls uv__udp_io with revents == POLLIN + POLLOUT
2. uv__udp_io calls your recv_cb
3. you close the handle in callback
4. uv__udp_io calls uv__udp_sendmsg
5. uv__udp_sendmsg calls uv__io_feed
6. kaboom!

show more ...


# 1b01b786 24-May-2023 Ben Noordhuis

unix,win: replace QUEUE with struct uv__queue (#4022)

Recent versions of gcc have started emitting warnings about the liberal
type casting inside the QUEUE macros. Although the warnings

unix,win: replace QUEUE with struct uv__queue (#4022)

Recent versions of gcc have started emitting warnings about the liberal
type casting inside the QUEUE macros. Although the warnings are false
positives, let's use them as the impetus to switch to a type-safer and
arguably cleaner approach.

Fixes: https://github.com/libuv/libuv/issues/4019

show more ...


# 1eae5598 11-Apr-2023 Stacey Marshall

unix,sunos: SO_REUSEPORT not valid on all sockets (#3949)

Issue observed on Solaris with ISC BIND 9.18 which reported "unable to
open route socket: unexpected error". illumos did not hit

unix,sunos: SO_REUSEPORT not valid on all sockets (#3949)

Issue observed on Solaris with ISC BIND 9.18 which reported "unable to
open route socket: unexpected error". illumos did not hit it because it
does not have SO_REUSEPORT (open RFE
https://www.illumos.org/issues/12455)

show more ...


# 62c2374a 07-Feb-2023 Jameson Nash

unix: DRY and fix tcp bind error path (#3904)

The conditional bind-to-port logic in tcp.c had an error path that
closed the socket file descriptor while it was still owned by the
uv_

unix: DRY and fix tcp bind error path (#3904)

The conditional bind-to-port logic in tcp.c had an error path that
closed the socket file descriptor while it was still owned by the
uv_tcp_t handle.

Fix that by not closing the file descriptor and refactoring the code so
it is hopefully harder to get wrong in the future.

The refactoring also makes the code a little flatter, removes duplicated
code, and, arguably, is in a more idiomatic libuv style.

Fixes: https://github.com/libuv/libuv/issues/3461
Replaces: https://github.com/libuv/libuv/pull/3462
Co-authored-by: Ben Noordhuis <info@bnoordhuis.nl>

show more ...


# 5102b2c0 28-Nov-2022 Ben Noordhuis

unix: drop kfreebsd support (#3835)

Because kFreeBSD is dead. RIP.

Fixes: https://github.com/libuv/libuv/issues/3833


# 8ddffeee 28-Nov-2022 Ben Noordhuis

doc: bump min supported linux and freebsd versions (#3830)

The old Linux baseline was essentially RHEL 6 but that distro has been
out of support for two years now. Move to RHEL 7.

doc: bump min supported linux and freebsd versions (#3830)

The old Linux baseline was essentially RHEL 6 but that distro has been
out of support for two years now. Move to RHEL 7.

This commit also moves FreeBSD to tier 2 because it isn't actually
part of libuv's CI matrix, only Node's.

Fixes: https://github.com/libuv/libuv/issues/3822

show more ...


# 3136561c 06-Jul-2022 Ben Noordhuis

unix: fix c99 comments (#3667)

Causes compilation errors for people that build libuv with a C89
compiler.

Refs: https://github.com/libuv/libuv/discussions/3666


# c1128f3d 18-Mar-2022 V-for-Vasili

ibmi: Implement UDP disconnect (#3561)

On IBM i a connectionless transport socket can be disconnected by
either setting the addr parameter to NULL or setting the
addr_length paramete

ibmi: Implement UDP disconnect (#3561)

On IBM i a connectionless transport socket can be disconnected by
either setting the addr parameter to NULL or setting the
addr_length parameter to zero, and issuing another connect().

Refs: https://www.ibm.com/docs/en/i/7.4?topic=ssw_ibm_i_74/apis/connec.htm

show more ...


# 7ae0c954 23-Feb-2022 Vittore F. Scolari

hurd: unbreak build on GNU/Hurd (#3450)

The GNU/Hurd platform does not define IP_ADD_SOURCE_MEMBERSHIP,
IP_DROP_SOURCE_MEMBERSHIP, MCAST_JOIN_SOURCE_GROUP and
MCAST_LEAVE_SOURCE_GROU

hurd: unbreak build on GNU/Hurd (#3450)

The GNU/Hurd platform does not define IP_ADD_SOURCE_MEMBERSHIP,
IP_DROP_SOURCE_MEMBERSHIP, MCAST_JOIN_SOURCE_GROUP and
MCAST_LEAVE_SOURCE_GROUP.

Implement a few functions for the GNU/Hurd. Specifically:

* uv_resident_set_memory (from Linux)
* uv_get_free_memory (from Linux)
* uv_get_total_memory (from Linux)
* uv_cpu_info (from cygwin)
* uv__process_title_cleanup (void)
* uv_get_constrained_memory (stub)
* Leave proctitle unimplemented on Hurd for now
* Implement hurdish uv_exepath
* Enable ifaddrs api
* Unbreak udp basics
* Unbreak futime and lutime on Hurd

show more ...


# e9cb1848 15-Jan-2022 Ondřej Surý

unix: ensure struct msghdr is zeroed in recvmmsg (#3419)

With MUSL libc, the struct msghdr is padded to align with the types used
in the Linux kernel headers (int vs size_t). When the p

unix: ensure struct msghdr is zeroed in recvmmsg (#3419)

With MUSL libc, the struct msghdr is padded to align with the types used
in the Linux kernel headers (int vs size_t). When the padding was not
zeroed, the syscall would return EMSGSIZE because the random bytes in
the padding would be read by kernel as part of the size_t type.

Fixes: https://github.com/libuv/libuv/issues/3416

show more ...


# a865f781 03-Jan-2022 deal

bsd,windows,zos: fix udp disconnect EINVAL (#3350)

Fixes: https://github.com/libuv/libuv/issues/3344


# 5246ce45 20-Oct-2021 Evan Miller

udp: fix &/&& typo in macro condition (#3334)


# 6530ea2f 05-Aug-2021 Supragya Raj

drop only successfully sent packets post sendmmsg

sendmmsg returns with number of packets sent which can
be less than number of packets requested to be sent. Do
not flush entire writ

drop only successfully sent packets post sendmmsg

sendmmsg returns with number of packets sent which can
be less than number of packets requested to be sent. Do
not flush entire write queue and use the returned info
to partially clear the write queue.

Refs: https://github.com/libuv/libuv/issues/3129 (fixes one issue listed)
PR-URL: https://github.com/libuv/libuv/pull/3265
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>

show more ...


# 5c85d67b 13-Jul-2021 Ryan Liptak

doc,udp: note that suggested_size is 1 max-sized dgram

The intention here is to make working with recvmmsg more
straight-forward, since internally libuv expects buffers that are
mult

doc,udp: note that suggested_size is 1 max-sized dgram

The intention here is to make working with recvmmsg more
straight-forward, since internally libuv expects buffers that are
multiples of UV__UDP_DGRAM_MAXSIZE, but previously the availability of
that value wasn't readily apparent to the caller.

Closes: https://github.com/libuv/libuv/issues/2822
Closes: https://github.com/libuv/libuv/issues/1025
Closes: https://github.com/libuv/libuv/pull/1114
PR-URL: https://github.com/libuv/libuv/pull/2986
Reviewed-By: Jameson Nash <vtjnash@gmail.com>

show more ...


Revision tags: v1.41.0, v1.40.0, v1.39.0, v1.38.1
# c382d39a 29-May-2020 Ondřej Surý

linux,udp: enable full ICMP error reporting

The Linux kernel suppresses some ICMP error messages by default for UDP
sockets. This commit sets IP_RECVERR/IPV6_RECVERR on the socket to

linux,udp: enable full ICMP error reporting

The Linux kernel suppresses some ICMP error messages by default for UDP
sockets. This commit sets IP_RECVERR/IPV6_RECVERR on the socket to
enable full ICMP error reporting, hopefully resulting in faster failover
to working name servers.

PR-URL: https://github.com/libuv/libuv/pull/2872
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>

show more ...

# ed5b42d5 22-Sep-2020 Elad Lahav

build,unix: add QNX support

Refs: https://github.com/libuv/libuv/pull/2881
PR-URL: https://github.com/libuv/libuv/pull/2991
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Review

build,unix: add QNX support

Refs: https://github.com/libuv/libuv/pull/2881
PR-URL: https://github.com/libuv/libuv/pull/2991
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>

show more ...

# 05d4383d 27-Jul-2020 Ben Noordhuis

linux: fix i386 sendmmsg/recvmmsg support

Android/i386 doesn't have separate sendmmsg/recvmmsg system calls,
they're multiplexed through the socketcall system call.

(More precis

linux: fix i386 sendmmsg/recvmmsg support

Android/i386 doesn't have separate sendmmsg/recvmmsg system calls,
they're multiplexed through the socketcall system call.

(More precisely, the system calls may be present but the standard
seccomp filter rejects them, whereas socketcall is whitelisted.)

This commit removes the flags and timeout arguments from libuv's
internal system call wrappers because they're always zero and it
makes EINVAL/ENOSYS detection after a failed socketcall() easier.

Fixes: https://github.com/libuv/libuv/issues/2923
PR-URL: https://github.com/libuv/libuv/pull/2925
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>

show more ...

# 11364207 07-Aug-2020 Aleksej Lebedev

unix: fix DragonFly BSD build

This commit includes patches from dports to fix the DragonFly
BSD build. It also removes the now unused uv_exepath_procfs().

PR-URL: https://github

unix: fix DragonFly BSD build

This commit includes patches from dports to fix the DragonFly
BSD build. It also removes the now unused uv_exepath_procfs().

PR-URL: https://github.com/libuv/libuv/pull/2952
Reviewed-By: Jameson Nash <vtjnash@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>

show more ...

Revision tags: v1.38.0
# ea17e1cf 06-May-2020 Ryan Liptak

udp: add UV_UDP_MMSG_FREE recv_cb flag

Refs: https://github.com/libuv/libuv/issues/2822
PR-URL: https://github.com/libuv/libuv/pull/2836
Reviewed-By: Ben Noordhuis <info@bnoordhuis.n

udp: add UV_UDP_MMSG_FREE recv_cb flag

Refs: https://github.com/libuv/libuv/issues/2822
PR-URL: https://github.com/libuv/libuv/pull/2836
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Jameson Nash <vtjnash@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>

show more ...

# 6b5aa669 29-Jul-2020 Ryan Liptak

udp: add uv_udp_using_recvmmsg query

Allows for determining if a buffer large enough for multiple dgrams
should be allocated in alloc_cb of uv_udp_recvstart, for example.
Contributes

udp: add uv_udp_using_recvmmsg query

Allows for determining if a buffer large enough for multiple dgrams
should be allocated in alloc_cb of uv_udp_recvstart, for example.
Contributes towards #2822.

PR-URL: https://github.com/libuv/libuv/pull/2830
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Jameson Nash <vtjnash@gmail.com>

show more ...

1234567