unbound DGRAM socket unreadable
Issue #467
resolved
I experienced that dgram unix sockets are mishandled by SEND/EXPECT testing mechanism (likely by all other that reads dgram socket) under my Linux 3.2.0-4-686-pae system. The root of it is that socket is not bound to local AF_UNIX socket. It could be solved by creating a tmp unix socket (either a named one or an abstract), or exploit Linux' autobind feature. Autobind feature is described in unix(7).
I patched the source with autobinding code:
file: src/socket.c
static T _createUnixSocket(...) {
...
if (s >= 0) {
int sockopt1 = 1;
setsockopt(s, SOL_SOCKET, SO_PASSCRED, &sockopt1, sizeof(sockopt1));
...
}
Comments (3)
-
repo owner -
repo owner I'm sorry i overlooked that it is related to UDP protocol, will test and fix.
-
repo owner - changed status to resolved
Fixed: Issue
#467: Testing unix sockets of UDP type didn't work.→ <<cset aaf686194bde>>
- Log in to comment
Please can you send monit configuration, provide more details about the tested unix socket and the error returned by monit?
I tried to replicate the problem on CentOS 7 (Linux 3.10.0-327.28.3.el7.x86_64) by testing mysql unix socket:
works normally: