summaryrefslogtreecommitdiff
path: root/src/ipcpd/ipcp.c
diff options
context:
space:
mode:
authorDimitri Staessens <[email protected]>2022-03-27 11:09:43 +0200
committerSander Vrijders <[email protected]>2022-03-30 15:05:05 +0200
commit02b3893b1ec392f1b3ca030a03267c31eb1dc290 (patch)
treef7cebdb5ef2c4994bc1e675e838bc8922cbae950 /src/ipcpd/ipcp.c
parent56654f2cd1813d87d32695f126939bbfaad52385 (diff)
downloadouroboros-02b3893b1ec392f1b3ca030a03267c31eb1dc290.tar.gz
ouroboros-02b3893b1ec392f1b3ca030a03267c31eb1dc290.zip
lib: Add np1_flow_read and np1_flow_write calls
Reading/writing to (N + 1)-flows from the IPCP was using a raw QoS flow to bypass some functions in the ipcp_flow_read call. But this call was broken for keepalive packets. Fixing the ipcp_flow_read call for (N - 1) flows causes the IPCPs to drop 0-byte keepalive packets coming from (N + 1) client flows. >From now on, there is a dedicated call for (N + 1) reads/writes from the IPCPs that's more efficient and cleaner. The (N + 1) flow internal QoS is now also defaulted to a qos_np1 qosspec, instead of tampering with the qosspec requested by the (N + 1) client. Signed-off-by: Dimitri Staessens <[email protected]> Signed-off-by: Sander Vrijders <[email protected]>
Diffstat (limited to 'src/ipcpd/ipcp.c')
-rw-r--r--src/ipcpd/ipcp.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/ipcpd/ipcp.c b/src/ipcpd/ipcp.c
index d19d8e43..2426fbab 100644
--- a/src/ipcpd/ipcp.c
+++ b/src/ipcpd/ipcp.c
@@ -514,10 +514,8 @@ static void * mainloop(void * o)
break;
}
- qs = msg_to_spec(msg->qosspec);
fd = np1_flow_alloc(msg->pid,
- msg->flow_id,
- qs);
+ msg->flow_id);
if (fd < 0) {
log_err("Failed allocating fd on flow_id %d.",
msg->flow_id);
@@ -525,6 +523,7 @@ static void * mainloop(void * o)
break;
}
+ qs = msg_to_spec(msg->qosspec);
ret_msg.result =
ipcpi.ops->ipcp_flow_alloc(fd,
msg->hash.data,
@@ -549,10 +548,8 @@ static void * mainloop(void * o)
break;
}
- qs = msg_to_spec(msg->qosspec);
fd = np1_flow_alloc(msg->pid,
- msg->flow_id,
- qs);
+ msg->flow_id);
if (fd < 0) {
log_err("Failed allocating fd on flow_id %d.",
msg->flow_id);
@@ -560,6 +557,7 @@ static void * mainloop(void * o)
break;
}
+ qs = msg_to_spec(msg->qosspec);
ret_msg.result =
ipcpi.ops->ipcp_flow_join(fd,
msg->hash.data,