diff options
author | Dimitri Staessens <dimitri@ouroboros.rocks> | 2022-02-26 14:49:46 +0100 |
---|---|---|
committer | Sander Vrijders <sander@ouroboros.rocks> | 2022-03-03 12:05:57 +0100 |
commit | eab2c79a66bbedc7548167e077740ef93002f961 (patch) | |
tree | e09285c18db8c7410e2a63777f0fd37cb7b8f122 /src/ipcpd | |
parent | 942649dfb7530f116ea19f36af20b0495a9251f8 (diff) | |
download | ouroboros-eab2c79a66bbedc7548167e077740ef93002f961.tar.gz ouroboros-eab2c79a66bbedc7548167e077740ef93002f961.zip |
irmd, ipcp: Remove socket option in acceptloop
We cancel the thread, so the SO_RCVTIMEO is not needed anymore (it
dated from when we checked the state every so often.
The address sanitizer is complaining about the the cleanup handlers in
the acceptloops after the thread gets cancelled in the read(). I've
tried to resolve it, but no avail. Pretty convinced it's a
false-positive, so ASan will ignore these functions for now.
Signed-off-by: Dimitri Staessens <dimitri@ouroboros.rocks>
Signed-off-by: Sander Vrijders <sander@ouroboros.rocks>
Diffstat (limited to 'src/ipcpd')
-rw-r--r-- | src/ipcpd/ipcp.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/ipcpd/ipcp.c b/src/ipcpd/ipcp.c index 12caac17..d19d8e43 100644 --- a/src/ipcpd/ipcp.c +++ b/src/ipcpd/ipcp.c @@ -204,11 +204,10 @@ static struct rib_ops r_ops = { .getattr = ipcp_rib_getattr }; +__attribute__((no_sanitize_address)) static void * acceptloop(void * o) { int csockfd; - struct timeval tv = {(SOCKET_TIMEOUT / 1000), - (SOCKET_TIMEOUT % 1000) * 1000}; (void) o; @@ -220,10 +219,6 @@ static void * acceptloop(void * o) if (csockfd < 0) continue; - if (setsockopt(csockfd, SOL_SOCKET, SO_RCVTIMEO, - (void *) &tv, sizeof(tv))) - log_warn("Failed to set timeout on socket."); - cmd = malloc(sizeof(*cmd)); if (cmd == NULL) { log_err("Out of memory"); |