]> git.puffer.fish Git - mirror/frr.git/commitdiff
ospfd: remove interface param npd
authorQuentin Young <qlyoung@cumulusnetworks.com>
Wed, 11 Apr 2018 17:58:53 +0000 (13:58 -0400)
committerQuentin Young <qlyoung@cumulusnetworks.com>
Fri, 13 Apr 2018 21:17:42 +0000 (17:17 -0400)
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 <qlyoung@cumulusnetworks.com>
ospfd/ospf_zebra.c

index 23d00633d444890efaa0b39a8c71b6cc34d799c3..6487596706bb92b6fabc0891ce746d6dcd07e2c3 100644 (file)
@@ -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);
        }