diff options
author | Vadim Yanitskiy <axilirator@gmail.com> | 2018-10-31 19:18:41 +0700 |
---|---|---|
committer | Vadim Yanitskiy <axilirator@gmail.com> | 2018-10-31 19:18:41 +0700 |
commit | 04ac4751701a28b7bec0c812a98d8a7ca1008a69 (patch) | |
tree | 837a4d4cfa318008f68e1004a6a9dee3d14a0e0d /utils.h | |
parent | 0578d751b1ea0ac10ad2b033f9b73c922f120fdb (diff) |
sock_events.c: also track child file descriptors
In some applications, such as OsmocomBB, a single UNIX socket
can be used by multiple processes (i.e. a server and multiple
clients). Previously this caused a segmentation fault.
Let's modify both sock_ev_accept() and sock_ev_accept4() in order
to handle such connections properly, by using both socket path
and dissector from the parent.
Diffstat (limited to 'utils.h')
-rw-r--r-- | utils.h | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -21,6 +21,9 @@ struct sock_state *udtrace_sstate_by_fd(int fd); /* add a file descriptor from the list of to-be-traced ones */ void udtrace_add_fd(int fd); +/* add a file descriptor from the list of to-be-traced ones */ +void udtrace_add_fd_child(int pfd, int cfd); + /* delete a file descriptor from the list of to-be-traced ones */ void udtrace_del_fd(int fd); |