diff options
author | Dimitri Staessens <[email protected]> | 2020-12-10 18:11:20 +0100 |
---|---|---|
committer | Sander Vrijders <[email protected]> | 2020-12-12 11:38:00 +0100 |
commit | 132d2145a6e89ac0f4454ba7f257a910da2ef674 (patch) | |
tree | eb77f04a381ea5f8a869aff3b798c32acfb7e91e /src/ipcpd/unicast/dt.c | |
parent | 54f632767df709f6afb87ba37c7ee0b71a2bdbce (diff) | |
download | ouroboros-132d2145a6e89ac0f4454ba7f257a910da2ef674.tar.gz ouroboros-132d2145a6e89ac0f4454ba7f257a910da2ef674.zip |
ipcpd: Pass previous ECN value in congestion API
The previous value of the ECN field should be passed to the congestion
notification function.
Signed-off-by: Dimitri Staessens <[email protected]>
Signed-off-by: Sander Vrijders <[email protected]>
Diffstat (limited to 'src/ipcpd/unicast/dt.c')
-rw-r--r-- | src/ipcpd/unicast/dt.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/ipcpd/unicast/dt.c b/src/ipcpd/unicast/dt.c index 90318487..1360371a 100644 --- a/src/ipcpd/unicast/dt.c +++ b/src/ipcpd/unicast/dt.c @@ -480,7 +480,7 @@ static void packet_handler(int fd, return; } - *(head + dt_pci_info.ecn_o) |= ca_calc_ecn(ofd, len); + (void) ca_calc_ecn(ofd, head + dt_pci_info.ecn_o, len); ret = ipcp_flow_write(ofd, sdb); if (ret < 0) { @@ -814,7 +814,9 @@ int dt_write_packet(uint64_t dst_addr, dt_pci.dst_addr = dst_addr; dt_pci.qc = qc; dt_pci.eid = eid; - dt_pci.ecn = ca_calc_ecn(fd, len); + dt_pci.ecn = 0; + + (void) ca_calc_ecn(fd, &dt_pci.ecn, len); dt_pci_ser(head, &dt_pci); |