diff options
author | Dimitri Staessens <[email protected]> | 2020-01-25 12:38:38 +0100 |
---|---|---|
committer | Sander Vrijders <[email protected]> | 2020-01-25 16:02:21 +0100 |
commit | 524445d9c625b05334818e2d900cf79d1ced5aba (patch) | |
tree | 5f71ebb4a2f9c984a5bf07c5b592528a55464460 /src/ipcpd/udp/main.c | |
parent | a3e14d1c76d15cf150db4442c3d2fecc604d5e8e (diff) | |
download | ouroboros-524445d9c625b05334818e2d900cf79d1ced5aba.tar.gz ouroboros-524445d9c625b05334818e2d900cf79d1ced5aba.zip |
ipcpd: Filter fqueue events in packet handlers
The eth, udp and local IPCPs were not filtering out the event types
from the flow, causing some reads when there are no packets in the
queue. The types are now also organized as flags so they can be
filtered more quickly if needed.
Signed-off-by: Dimitri Staessens <[email protected]>
Signed-off-by: Sander Vrijders <[email protected]>
Diffstat (limited to 'src/ipcpd/udp/main.c')
-rw-r--r-- | src/ipcpd/udp/main.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/ipcpd/udp/main.c b/src/ipcpd/udp/main.c index a444e956..1f0bebf0 100644 --- a/src/ipcpd/udp/main.c +++ b/src/ipcpd/udp/main.c @@ -520,6 +520,10 @@ static void * ipcp_udp_packet_writer(void * o) struct shm_du_buff * sdb; uint8_t * buf; uint16_t len; + + if (fqueue_type(fq) != FLOW_PKT) + continue; + if (ipcp_flow_read(fd, &sdb)) { log_dbg("Bad read from fd %d.", fd); continue; |