summaryrefslogtreecommitdiff
path: root/src/ipcpd/normal/dt.c
diff options
context:
space:
mode:
authordimitri staessens <dimitri.staessens@ugent.be>2017-04-28 16:17:44 +0000
committerSander Vrijders <sander.vrijders@ugent.be>2017-04-28 16:17:44 +0000
commitc22d449283b94be89815d586926aaf7baf1c1593 (patch)
tree50e15983363c163164362851d91c3b6f9511e408 /src/ipcpd/normal/dt.c
parent72e8f778024ece5c8025be4767ce89eae349f4b5 (diff)
parent41b73370dba4105ae183babe8f89480e8c9d038a (diff)
downloadouroboros-c22d449283b94be89815d586926aaf7baf1c1593.tar.gz
ouroboros-c22d449283b94be89815d586926aaf7baf1c1593.zip
Merged in dstaesse/ouroboros/be-normal-split (pull request #499)
ipcpd: Fix some bugs for the normal split
Diffstat (limited to 'src/ipcpd/normal/dt.c')
-rw-r--r--src/ipcpd/normal/dt.c11
1 files changed, 0 insertions, 11 deletions
diff --git a/src/ipcpd/normal/dt.c b/src/ipcpd/normal/dt.c
index 361af6b4..0816ec10 100644
--- a/src/ipcpd/normal/dt.c
+++ b/src/ipcpd/normal/dt.c
@@ -98,18 +98,13 @@ static int sdu_handler(int fd,
return 0;
}
- pff_lock(dt.pff[qc]);
-
fd = pff_nhop(dt.pff[qc], dt_pci.dst_addr);
if (fd < 0) {
- pff_unlock(dt.pff[qc]);
log_err("No next hop for %" PRIu64, dt_pci.dst_addr);
ipcp_sdb_release(sdb);
return -1;
}
- pff_unlock(dt.pff[qc]);
-
if (ipcp_flow_write(fd, sdb)) {
log_err("Failed to write SDU to fd %d.", fd);
ipcp_sdb_release(sdb);
@@ -136,7 +131,6 @@ static int sdu_handler(int fd,
ipcp_sdb_release(sdb);
return -1;
}
-
}
return 0;
@@ -279,17 +273,12 @@ int dt_write_sdu(uint64_t dst_addr,
assert(sdb);
- pff_lock(dt.pff[qc]);
-
fd = pff_nhop(dt.pff[qc], dst_addr);
if (fd < 0) {
- pff_unlock(dt.pff[qc]);
log_err("Could not get nhop for address %" PRIu64, dst_addr);
return -1;
}
- pff_unlock(dt.pff[qc]);
-
dt_pci.dst_addr = dst_addr;
dt_pci.qc = qc;
dt_pci.pdu_type = pdu_type;