summaryrefslogtreecommitdiff
path: root/src/ipcpd/ipcp.c
diff options
context:
space:
mode:
authorSander Vrijders <sander.vrijders@intec.ugent.be>2016-10-31 10:44:55 +0000
committerSander Vrijders <sander.vrijders@intec.ugent.be>2016-10-31 10:44:55 +0000
commit95ad15debb61e71561d9c6363bc6e8ae0927dce1 (patch)
tree4084ef29c666739372c1f7899b78cad21da91aa1 /src/ipcpd/ipcp.c
parent94044e99af295e9440d306719a5cf341645d1803 (diff)
parentadd7d5f1e59c661b431ba86ba80d62badc14e762 (diff)
downloadouroboros-95ad15debb61e71561d9c6363bc6e8ae0927dce1.tar.gz
ouroboros-95ad15debb61e71561d9c6363bc6e8ae0927dce1.zip
Merged in dstaesse/ouroboros/be-fixes (pull request #294)
ipcpd: Clean shutdown when bootstrap fails
Diffstat (limited to 'src/ipcpd/ipcp.c')
-rw-r--r--src/ipcpd/ipcp.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/ipcpd/ipcp.c b/src/ipcpd/ipcp.c
index 694db7cf..b7eff3fb 100644
--- a/src/ipcpd/ipcp.c
+++ b/src/ipcpd/ipcp.c
@@ -234,7 +234,8 @@ void * ipcp_main_loop(void * o)
int fd = -1;
pthread_rwlock_rdlock(&ipcpi.state_lock);
- if (ipcp_get_state() == IPCP_SHUTDOWN) {
+ if (ipcp_get_state() == IPCP_SHUTDOWN
+ || ipcp_get_state() == IPCP_NULL) {
pthread_rwlock_unlock(&ipcpi.state_lock);
break;
}
@@ -281,7 +282,8 @@ void * ipcp_main_loop(void * o)
if (conf_msg->ipcp_type == IPCP_NORMAL) {
conf.addr_size = conf_msg->addr_size;
conf.cep_id_size = conf_msg->cep_id_size;
- conf.pdu_length_size = conf_msg->pdu_length_size;
+ conf.pdu_length_size =
+ conf_msg->pdu_length_size;
conf.qos_id_size = conf_msg->qos_id_size;
conf.seqno_size = conf_msg->seqno_size;
conf.has_ttl = conf_msg->has_ttl;