Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20201106193050.GB2009@voyager>
Date: Fri, 6 Nov 2020 20:30:50 +0100
From: Markus Wichmann <nullplan@....net>
To: musl@...ts.openwall.com
Subject: Why connect() in syslog?

Hi all,

I was reading musl's syslog source code today for unrelated reasons, and
saw that it is using connect() to set the destination. And it has some
code to deal with connection failures. But why? I see the syslog socket
is a datagram socket, so I thought sendto() with destination address
means the same thing as connect() and send(), with the difference that
it is one less syscall that can fail and no connection errors to handle.
I tried finding information about the semantics of connect() on a UNIX
datagram socket, but failed to find anything useful.

Ciao,
Markus

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.