From 406cf2d7a347222ef0526d1db0d3cb191c287656 Mon Sep 17 00:00:00 2001 From: dimitri staessens Date: Wed, 22 Feb 2017 23:53:04 +0100 Subject: irmd: Check IPCP type before bootstrap This prevents assertion failures in the IPCP in some cases. IPCPs can now safely assert the type. --- src/ipcpd/normal/main.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/ipcpd/normal/main.c') diff --git a/src/ipcpd/normal/main.c b/src/ipcpd/normal/main.c index e3955ff2..c41b6187 100644 --- a/src/ipcpd/normal/main.c +++ b/src/ipcpd/normal/main.c @@ -344,10 +344,8 @@ static int normal_ipcp_bootstrap(struct dif_config * conf) (void) pol; - if (conf == NULL || conf->type != THIS_TYPE) { - log_err("Bad DIF configuration."); - return -EINVAL; - } + assert(conf); + assert(conf->type == THIS_TYPE); pthread_rwlock_wrlock(&ipcpi.state_lock); -- cgit v1.2.3