summaryrefslogtreecommitdiff
path: root/src/ipcpd
diff options
context:
space:
mode:
authordimitri staessens <dimitri.staessens@intec.ugent.be>2016-10-05 16:32:15 +0200
committerdimitri staessens <dimitri.staessens@intec.ugent.be>2016-10-05 16:32:15 +0200
commit170a60e4770a8fd12c50adfd6d3d34cd533ad570 (patch)
treeec86e2dbcaa4bfc7977978611d554425232248ce /src/ipcpd
parent3a60776ab1c56da40dbb9a7418e04ff70756d16b (diff)
parentf266224ff38930cff1c1765313f0da7b93539553 (diff)
downloadouroboros-170a60e4770a8fd12c50adfd6d3d34cd533ad570.tar.gz
ouroboros-170a60e4770a8fd12c50adfd6d3d34cd533ad570.zip
Merge branch 'be' of bitbucket.org:ouroboros-rina/ouroboros into be
Diffstat (limited to 'src/ipcpd')
-rw-r--r--src/ipcpd/shim-eth-llc/main.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/ipcpd/shim-eth-llc/main.c b/src/ipcpd/shim-eth-llc/main.c
index 7a64b9e1..03e8beb1 100644
--- a/src/ipcpd/shim-eth-llc/main.c
+++ b/src/ipcpd/shim-eth-llc/main.c
@@ -927,16 +927,18 @@ static int eth_llc_ipcp_flow_alloc_resp(int fd, int response)
static int eth_llc_ipcp_flow_dealloc(int fd)
{
uint8_t sap;
+ uint8_t r_sap;
uint8_t addr[MAC_SIZE];
int ret;
pthread_rwlock_rdlock(&ipcpi.state_lock);
pthread_rwlock_wrlock(&eth_llc_data.flows_lock);
- sap = eth_llc_data.fd_to_ef[fd].r_sap;
+ r_sap = eth_llc_data.fd_to_ef[fd].r_sap;
+ sap = eth_llc_data.fd_to_ef[fd].sap;
memcpy(addr, eth_llc_data.fd_to_ef[fd].r_addr, MAC_SIZE);
- bmp_release(eth_llc_data.saps, eth_llc_data.fd_to_ef[fd].sap);
+ bmp_release(eth_llc_data.saps, sap);
eth_llc_data.fd_to_ef[fd].sap = -1;
eth_llc_data.fd_to_ef[fd].r_sap = -1;
memset(&eth_llc_data.fd_to_ef[fd].r_addr, 0, MAC_SIZE);
@@ -945,7 +947,7 @@ static int eth_llc_ipcp_flow_dealloc(int fd)
pthread_rwlock_unlock(&eth_llc_data.flows_lock);
- ret = eth_llc_ipcp_sap_dealloc(addr, sap);
+ ret = eth_llc_ipcp_sap_dealloc(addr, r_sap);
pthread_rwlock_unlock(&ipcpi.state_lock);
if (ret < 0)