Age | Commit message (Collapse) | Author |
|
checks the send buffer size. So double both buffer sizes.
Moreover the default for sending is 2048 and for receiving is 4096.
This makes the existing double buffer algorithm inconsistent. It
is better to make the buffers large enough to hold 8 full length
messages. Just make sure that it does not shrink.
Keep the approach that doubles the buffer sizes. When we are low
on buffers and cannot reach the full size, increase it as much as
possible.
While there, add consistent error messages.
OK benno@
|
|
of syslogd(8) should be alike. syslogd: dropped 1 message
OK lteo@ millert@
|
|
use the global linebuf like the other libevent read callbacks.
OK jung@
|
|
conflicts with other processes bound to a specific address with the
same port. Syslogd uses this socket basically for outgoing traffic
to remote UDP log servers, so increase the chance that it works.
OK jung@ benno@
|
|
specific programm or host. It does not make sense to truncate the
string from the config at some character from a list. Just take
whatever the user specified as progname or hostname. If it contains
funky charactes it will not match and the action is not taken. This
fixes matching with IP addresses if syslogd is started with -n.
OK semarie@
|
|
itself. For this it uses the original arguments of main(). The
function loghost_parse() modifies the optarg memory it is operating
on. To prevent that the exec arguments have been tampered, pass a
copy of optarg to loghost_parse().
OK deraadt@
|
|
it is behind the size limit. As msg is not NUL-terminated in this
case, it depended on memory content wether syslogd will crash. So
using memcpy() and setting the NUL explicitly is the correct way.
OK deraadt@
|
|
case the receiver closes the connection, wait for a second to give
him a chance to recover.
OK benno@
|
|
limit. Instead disable the listen event and wait for a second.
Keep a reserve of 5 file descriptors.
OK benno@
|
|
octet counting or non transparent framing.
OK benno@
|
|
syslogd had to drop messages after tls_write() returned
TLS_{READ,WRITE}_AGAIN. Now after libtls has been fixed, remove
the workaround. Messages are stored in the libevent write buffer
as we can safely do a realloc(3) now.
OK reyk@
|
|
could be written into the log file.
OK benno@
|
|
the file descriptor. If the fd limit is exhausted, recvmsg(2)
fails. The kernel discards the fd, but the result value stays in
the socket. It has to be read on its own to keep the privsep parent
and syslogd child in sync.
OK benno@
|
|
both !host and memory buffer are used.
OK jung@
|
|
addresses in syslogd(8). Using brackets to separate an IPv6 address
from the port number is common practice and we keep the text in
syslog.conf(5).
OK jmc@
|
|
socket and accepts incomming messages. At the moment, only RFC
6587 3.4.2. Non-Transparent-Framing format with new-line separator
is supprted for incomming messsages. Outgoing messages are encoded
as 3.4.1. Octet Counting. Autodetection of incomming format will
be implemented later.
OK deraadt@ jmc@ millert@
|
|
|
|
fcntl(O_NONBLOCK) with the simpler SOCK_NONBLOCK and add this flag
to the UDP sockets. React to EWOULDBLOCK although it should not
happen.
OK benno@
|
|
again, move it to the common function socket_bind().
OK millert@
|
|
man page. This makes it easier to check wether both are consistent.
OK jung@
|
|
address to receive UDP packets. One advantge over -u and the *
sockets is that you can bind to localhost and divert the packets
with pf. It is also possible to use a non standard port.
OK jung@ jmc@
|
|
specific host into a single log file. For programs this is already
implemented for !prog blocks. So do the same with +host for
hostnames.
Based on a diff from Gregory Edigarov; OK jung@ sthen@
|
|
|
|
OK benno@; input millert@; no objections deraadt@
|
|
This works even if the file descriptor is 0 or 1 or 2.
input and OK millert@
|
|
OK doug@ djm@
|
|
configuration file. Also make sure that we fully parsed it.
If not, avoid to start a half-baked syslogd.
with input by and ok bluhm@
|
|
OK deraadt@
|
|
tls_config_insecure_noverifyname(), so that it is more accurate and keeps
inline with the distinction between DNS hostname and server name.
Requested by tedu@ during s2k15.
|
|
|
|
write retry" may occur. Unfortunately libtls tls_write() has
inherited the strange semantics regarding partial writes and buffer
movement from SSL_write(). This will be investigated after unlock,
the goal is to have the behavior of write(2) in libtls.
For now add a workaround in syslogd. If tls_write() indicates that
it needs a read or write again, stop modifying the output buffer.
Instead drop and count the syslog messages. After writing over TLS
was successful, continue to queue the messages. This solution has
minimum inpact and will be improved after 5.7 release.
discussed with tedu@ reyk@ jsing@; OK tedu@
|
|
and certificate are not verified.
OK jsing@
|
|
fulfilled, it is better to fail hard. Then the user can adjust
rc.conf.local or the #define MAXUNIX.
OK millert@
|
|
that includes all currently supported protocols (TLSv1.0, TLSv1.1 and
TLSv1.2). Change all users of libtls to use TLS_PROTOCOLS_ALL so that they
maintain existing behaviour.
Discussed with tedu@ and reyk@.
|
|
Bring back revision 1.29.
|
|
OK henning@
|
|
|
|
|
|
OK deraadt@
|
|
For TCP the standard recommends it, but TLS must use this framing.
OK henning@
|
|
OK bluhm@
|
|
|
|
If the log server refuses to receive messages and the buffer gets
full, count the dropped messages. Log the counter when the server
accepts messages again. If there are messages in the buffer when
a signal is received, count and log them.
tested sthen@; OK henning@
|
|
maximum syslog message size to 8192 octets. Restrict UDP sending
to 1180 octets payload to avoid fragmentation. This is more than
the 1024 we supported before.
Also truncate the line in printline() to exactly 8192 bytes regardless
of visual encoding. That is a more predictable behavior and makes
testing easier.
Although syslog(3) does not support long messages yet, make sure
that /dev/log can receive them.
OK deraadt@
|
|
Increase it to 256 bytes and call it ebuf everywhere.
OK sthen@
|
|
OK jmc@
|
|
callback when the connected socket is writable. This avoids calling
a NULL error callback.
OK deraadt@
|
|
and hostname of the TLS server before sending any messages to it.
Per default /etc/ssl/cert.pem is used as CA file.
OK deraadt@
|
|
OK jmc@
|
|
with getaddrinfo() or getnameinfo(), but keep HOST_NAME_MAX+1 when
the hostname comes from gethostname().
No binary change; OK deraadt@
|