diff options
author | dimitri staessens <[email protected]> | 2016-10-16 09:38:01 +0200 |
---|---|---|
committer | dimitri staessens <[email protected]> | 2016-10-16 10:05:19 +0200 |
commit | c79ab46894053312f80390bf13a52c238a7d4704 (patch) | |
tree | 038cbefec387fc15af2dd0b8325b063977a08590 /src/ipcpd/local | |
parent | b8b05e3b1980146ab8acb40cbe77e0271634c688 (diff) | |
download | ouroboros-c79ab46894053312f80390bf13a52c238a7d4704.tar.gz ouroboros-c79ab46894053312f80390bf13a52c238a7d4704.zip |
lib, dev: Implement read/write options for flows
Added the missing implementation of setting read/write options for
flows. This allows applications to block the fast path for
remotes. IPCPs can use this to block the fast path for the N + 1 flow
when receiving remote deallocation requests.
Diffstat (limited to 'src/ipcpd/local')
-rw-r--r-- | src/ipcpd/local/main.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/ipcpd/local/main.c b/src/ipcpd/local/main.c index b8b3335c..4e500a8a 100644 --- a/src/ipcpd/local/main.c +++ b/src/ipcpd/local/main.c @@ -24,6 +24,7 @@ #include "ipcp.h" #include <ouroboros/errno.h> #include <ouroboros/dev.h> +#include <ouroboros/fcntl.h> #include <ouroboros/select.h> #include <ouroboros/ipcp-dev.h> #include <ouroboros/local-dev.h> @@ -252,6 +253,7 @@ static int ipcp_local_flow_dealloc(int fd) pthread_rwlock_rdlock(&ipcpi.state_lock); pthread_rwlock_wrlock(&local_data.lock); + flow_cntl(local_data.in_out[fd], FLOW_F_SETFL, FLOW_O_WRONLY); local_data.in_out[fd] = -1; pthread_rwlock_unlock(&local_data.lock); |