]> git.ipfire.org Git - thirdparty/freeradius-server.git/commit
EOF is not always an error case
authorAlan T. DeKok <aland@freeradius.org>
Thu, 7 Aug 2025 14:43:19 +0000 (10:43 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Thu, 7 Aug 2025 15:01:26 +0000 (11:01 -0400)
commit764359773a19011d8934c6e976cdbf47a2804ec7
tree93f99eec6c13324be34a8ee456e5d244d030bf45
parentf23ef77ac13faaac6588817336756da863320ec7
EOF is not always an error case

From the docs:

> If the read direction of the socket has shutdown, then the filter
> also sets EV_EOF in flags, and returns the socket error (if any) in
> fflags. It is possible for EOF to be returned (indicating the
> connection is gone) while there is still data pending in the socket
> buffer.

So we suppress printing an error on normal EOF.  Instead, we just
see if we need to reconnect the socket.

Arguably if the other end closes our read side, we _might_ be able
to write to the socket?  but we could still write to it.
src/lib/server/trunk.h
src/modules/rlm_logtee/rlm_logtee.c
src/modules/rlm_radius/bio.c
src/modules/rlm_tacacs/rlm_tacacs_tcp.c