From bcfdc7878480f63b816811f2285862f47cde7340 Mon Sep 17 00:00:00 2001 From: Quentin Young Date: Wed, 11 Apr 2018 13:58:53 -0400 Subject: [PATCH] ospfd: remove interface param npd OSPF_IF_PARAM_CONFIGURED(S, P) checks both the nullity of S and the value of P; assuming either one from the value of this macro is incorrect. Signed-off-by: Quentin Young --- ospfd/ospf_zebra.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ospfd/ospf_zebra.c b/ospfd/ospf_zebra.c index 23d00633d4..6487596706 100644 --- a/ospfd/ospf_zebra.c +++ b/ospfd/ospf_zebra.c @@ -118,7 +118,8 @@ static int ospf_interface_add(int command, struct zclient *zclient, assert(ifp->info); - if (!OSPF_IF_PARAM_CONFIGURED(IF_DEF_PARAMS(ifp), type)) { + if (IF_DEF_PARAMS(ifp) + && !OSPF_IF_PARAM_CONFIGURED(IF_DEF_PARAMS(ifp), type)) { SET_IF_PARAM(IF_DEF_PARAMS(ifp), type); IF_DEF_PARAMS(ifp)->type = ospf_default_iftype(ifp); } -- 2.39.5