History log of /openbsd/lib/libc/rpc/clnt_udp.c (Results 1 – 25 of 42)
Revision Date Author Comments
# 107a2d5f 02-Apr-2024 jsg <jsg@openbsd.org>

fix unintended sizeof(pointer) introduced in rev 1.41
found with noderef.cocci, ok deraadt@


# 903e91b4 22-Jan-2024 deraadt <deraadt@openbsd.org>

When getpwnam(3) reaches out to YP, it calls clntudp_create(3) with a
pre-initialized ypconnect(2) socket. That calls clntudp_bufcreate(),
which contains code checking if the socket and address are

When getpwnam(3) reaches out to YP, it calls clntudp_create(3) with a
pre-initialized ypconnect(2) socket. That calls clntudp_bufcreate(),
which contains code checking if the socket and address are configured..
If not, socket(2) is called, or an address allocation is performed via
the portmapper (which calls a whole lot more code).

Split clnt_udp.c into two .c files (which will compile as seperate .o
files), and create a new libc-private clntudp_bufcreate_simple() function
which skips the socket and address work.

Result: In most static binaries, this reduces the text segment by
~100K, and removes 5-7 system call stubs -- which might matter for
non-pledged binaries with otherwise lack socket(2).
ok millert jmatthew

show more ...


# 482918d2 24-Aug-2022 deraadt <deraadt@openbsd.org>

if the socket is connected, we can use recv() instead of recvfrom()
ok jmatthew


# 91fc4dda 15-Jul-2022 deraadt <deraadt@openbsd.org>

Add a new clnt*_control CLSET_CONNECTED, which says the socket has already
been connected. In the udp case, this means to use send(), not sendto()
ok jmatthew, claudio, miod


# 8d4335cb 14-Feb-2022 guenther <guenther@openbsd.org>

Mark all the rpc 'ops' vectors, for auth, client, service, and xdr,
as const, moving them from .data to .data.rel.ro. The other BSDs
did this a long time ago; NetBSD did a chunk in 1998, which is lo

Mark all the rpc 'ops' vectors, for auth, client, service, and xdr,
as const, moving them from .data to .data.rel.ro. The other BSDs
did this a long time ago; NetBSD did a chunk in 1998, which is long
enough I didn't bother to get exact dates for others.

ok deraadt@ millert@

show more ...


# d82e6535 06-Jul-2020 pirofti <pirofti@openbsd.org>

Add support for timeconting in userland.

This diff exposes parts of clock_gettime(2) and gettimeofday(2) to
userland via libc eliberating processes from the need for a context
switch everytime they

Add support for timeconting in userland.

This diff exposes parts of clock_gettime(2) and gettimeofday(2) to
userland via libc eliberating processes from the need for a context
switch everytime they want to count the passage of time.

If a timecounter clock can be exposed to userland than it needs to set
its tc_user member to a non-zero value. Tested with one or multiple
counters per architecture.

The timing data is shared through a pointer found in the new ELF
auxiliary vector AUX_openbsd_timekeep containing timehands information
that is frequently updated by the kernel.

Timing differences between the last kernel update and the current time
are adjusted in userland by the tc_get_timecount() function inside the
MD usertc.c file.

This permits a much more responsive environment, quite visible in
browsers, office programs and gaming (apparently one is are able to fly
in Minecraft now).

Tested by robert@, sthen@, naddy@, kmos@, phessler@, and many others!

OK from at least kettenis@, cheloha@, naddy@, sthen@

show more ...


# df69c215 28-Jun-2019 deraadt <deraadt@openbsd.org>

When system calls indicate an error they return -1, not some arbitrary
value < 0. errno is only updated in this case. Change all (most?)
callers of syscalls to follow this better, and let's see if

When system calls indicate an error they return -1, not some arbitrary
value < 0. errno is only updated in this case. Change all (most?)
callers of syscalls to follow this better, and let's see if this strictness
helps us in the future.

show more ...


# a49620e5 06-Jan-2018 cheloha <cheloha@openbsd.org>

Remove dead gettimeofday calls and timevals.

ok jca@


# b8b77aad 14-Dec-2017 jca <jca@openbsd.org>

Simplify and unify timespec variables used in those event loops

ok millert@


# 0f732d07 14-Dec-2017 jca <jca@openbsd.org>

Use CLOCK_MONOTONIC for the rpc event loops

From Scott Cheloha, ok deraadt@ tb@


# 10632a79 01-Nov-2015 guenther <guenther@openbsd.org>

delete old lint ARGSUSED comments


# 85858ec2 13-Sep-2015 guenther <guenther@openbsd.org>

Wrap <rpc/*.h> so that calls go direct and the symbols are all weak.
Hide __xprt_register() and _authenticate(); truncate <rpc/svc_auth.h>

ok deraadt@


# 186d27dc 09-Sep-2015 guenther <guenther@openbsd.org>

Use SOCK_NONBLOCK in a couple more places

ok deraadt@


# 137e52c2 01-Sep-2015 deraadt <deraadt@openbsd.org>

Remove all bogus writes to stderr. Only explicit requests should
go that way.
ok miod beck


# 79e26125 17-May-2015 deraadt <deraadt@openbsd.org>

Use fcntl() to set non-blocking-mode, rather ioctl(). This has a better
chance of working in systrace restricted environments.
ok guenther


# cc062249 11-Nov-2014 guenther <guenther@openbsd.org>

Merge from NetBSD from 1999-03-25:"
* don't close the socket unless it was opened by the function
* note (in the comments) that the client is responsible for closing
the socket if they opened it,

Merge from NetBSD from 1999-03-25:"
* don't close the socket unless it was opened by the function
* note (in the comments) that the client is responsible for closing
the socket if they opened it, or they didn't use CLNT_DESTROY()

fixes a couple of unnecessary closing of already-closed sockets.
noted by: Matthias Drochner <M.Drochner@fz-juelich.de>"

tested by many in snaps
ok schwarze@

show more ...


# cb7760d1 01-Sep-2010 millert <millert@openbsd.org>

Oracle has re-licensed sunrpc under a three-clause BSD license.
Update our sources appropriately. OK deraadt@ jsg@


# fd8b7b37 02-Jun-2009 schwarze <schwarze@openbsd.org>

When authnone_create fails, do not leave behind a NULL cl_auth attribute,
because that one will typically derefenced later without any checking.
Instead, flag the error condition and bail out cleanly

When authnone_create fails, do not leave behind a NULL cl_auth attribute,
because that one will typically derefenced later without any checking.
Instead, flag the error condition and bail out cleanly.
useful feedback from kjell@ and ok millert@

show more ...


# 153b7fdc 31-Mar-2006 deraadt <deraadt@openbsd.org>

sprinkle a bit of ARGSUSED


# c2c925de 08-Aug-2005 espie <espie@openbsd.org>

zap remaining rcsid.

Kill old files that are no longer compiled.

okay theo


# 384ec30a 01-Apr-2005 otto <otto@openbsd.org>

ansify. ok deraadt@ jaredy@


# 3f820ea1 08-Jan-2005 krw <krw@openbsd.org>

Bit of KNF - replace (<type> *)0 and (<type> *)NULL with NULL. Pointed
out by mickey@, seconded by millert@.

ok deraadt@.


# 2cca59ed 31-Dec-2003 millert <millert@openbsd.org>

Implement svc_getreq_poll(3) and friends and use poll(2) instead of select(2)
in the libc rpc code. The main difference between this and the previous
version is the use of a simple free list that si

Implement svc_getreq_poll(3) and friends and use poll(2) instead of select(2)
in the libc rpc code. The main difference between this and the previous
version is the use of a simple free list that simplifies the logic when
adding a socket to svc_pollfd. I've also added code to pack svc_pollfd
when the free list gets too big. The idea general idea is to keep
svc_pollfd as tightly packed as possible to make poll(2) efficient.
Tested by many people and OK deraadt@

show more ...


# e62fa231 06-Sep-2002 deraadt <deraadt@openbsd.org>

use socklen_t where needed; henning pvalchev ok


# c6f92b94 03-Jun-2002 deraadt <deraadt@openbsd.org>

compatiblity -> compatibility
decriptor -> descriptor
authentciated -> authenticated
transmition -> transmission


12