The timeout variable was not correctly passed to the IPCP, causing
flow IDs to be reused immediately instead of waiting for the full
Delta-t to expire. This caused all kinds of havoc with retransmissions
in reliable flows.
Signed-off-by: Dimitri Staessens <dimitri@ouroboros.rocks>
---
include/ouroboros/np1_flow.h | 3 ++-
src/ipcpd/ipcp.c | 2 +-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/include/ouroboros/np1_flow.h b/include/ouroboros/np1_flow.h
index c82257de..b764de91 100644
--- a/include/ouroboros/np1_flow.h
+++ b/include/ouroboros/np1_flow.h
@@ -33,6 +33,7 @@ int np1_flow_alloc(pid_t n_pid,
int np1_flow_resp(int flow_id);
-int np1_flow_dealloc(int flow_id);
+int np1_flow_dealloc(int flow_id,
+ time_t timeo);
#endif /* OUROBOROS_NP1_FLOW_H */
diff --git a/src/ipcpd/ipcp.c b/src/ipcpd/ipcp.c
index ff160652..cd09a7cf 100644
--- a/src/ipcpd/ipcp.c
+++ b/src/ipcpd/ipcp.c
@@ -617,7 +617,7 @@ static void * mainloop(void * o)
break;
}
- fd = np1_flow_dealloc(msg->flow_id);
+ fd = np1_flow_dealloc(msg->flow_id, msg->timeo_sec);
if (fd < 0) {
log_warn("Could not deallocate flow_id %d.",
msg->flow_id);
--
2.34.1