]> git.ipfire.org Git - thirdparty/openvpn.git/commit
Fix error detection / abort in --inetd corner case.
authorGert Doering <gert@greenie.muc.de>
Tue, 8 Sep 2020 10:51:30 +0000 (12:51 +0200)
committerGert Doering <gert@greenie.muc.de>
Wed, 9 Sep 2020 06:44:57 +0000 (08:44 +0200)
commita09a2fadbadb5dc435f6fccc581163e1f637f43f
treedd2c0b1c9f54103b21bedd2dd587e1a6c6f28437
parent5fd66510dfdef628fa95f156c5f9d80af9ae1531
Fix error detection / abort in --inetd corner case.

Calling "openvpn --inetd" from the CLI (= no socket on stdin) will
lead to endless looping in the accept(4) loop.

Instead of cluttering that function further, detect failure to call
getsockame() in phase2_inetd() already, and trigger a M_FATAL abort
on "errno == ENOTSOCK" ("The argument s is a file, not a socket").

While at it, uncrustify the --bind-dev code (whitespace only).

Trac: #350

Signed-off-by: Gert Doering <gert@greenie.muc.de>
Acked-by: Arne Schwabe <arne@rfc2549.org>
Message-Id: <20200908105130.24171-1-gert@greenie.muc.de>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg20897.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
src/openvpn/socket.c