summaryrefslogtreecommitdiffstats
path: root/ospfd
diff options
context:
space:
mode:
authorKaren Schoener <karen@voltanet.io>2021-06-17 15:26:36 +0200
committerKaren Schoener <karen@voltanet.io>2021-06-28 16:32:52 +0200
commit0b4124c18cb826849f18af58dbc712db7d14b993 (patch)
tree28ff0015d6f7f93ebc5585ca867686a4513a20c9 /ospfd
parentMerge pull request #8932 from anlancs/fix-some-doc-warnings (diff)
downloadfrr-0b4124c18cb826849f18af58dbc712db7d14b993.tar.xz
frr-0b4124c18cb826849f18af58dbc712db7d14b993.zip
isisd, ospfd: update interface_link_params callback to check for change
Adding defensive code to the interface_link_params zebra callback to check if the link params changed before taking action. Signed-off-by: Karen Schoener <karen@voltanet.io>
Diffstat (limited to 'ospfd')
-rw-r--r--ospfd/ospf_interface.c7
-rw-r--r--ospfd/ospf_zebra.c5
2 files changed, 10 insertions, 2 deletions
diff --git a/ospfd/ospf_interface.c b/ospfd/ospf_interface.c
index b4e318d1d..b3aba247d 100644
--- a/ospfd/ospf_interface.c
+++ b/ospfd/ospf_interface.c
@@ -50,6 +50,7 @@
#include "ospfd/ospf_dump.h"
#include "ospfd/ospf_ldp_sync.h"
#include "ospfd/ospf_route.h"
+#include "ospfd/ospf_te.h"
DEFINE_QOBJ_TYPE(ospf_interface);
DEFINE_HOOK(ospf_vl_add, (struct ospf_vl_data * vd), (vd));
@@ -1354,6 +1355,9 @@ static int ospf_ifp_create(struct interface *ifp)
ospf_if_update(ospf, ifp);
+ if (HAS_LINK_PARAMS(ifp))
+ ospf_mpls_te_update_if(ifp);
+
hook_call(ospf_if_update, ifp);
return 0;
@@ -1392,6 +1396,9 @@ static int ospf_ifp_up(struct interface *ifp)
ospf_if_up(oi);
}
+ if (HAS_LINK_PARAMS(ifp))
+ ospf_mpls_te_update_if(ifp);
+
return 0;
}
diff --git a/ospfd/ospf_zebra.c b/ospfd/ospf_zebra.c
index 5853b506f..df112edc6 100644
--- a/ospfd/ospf_zebra.c
+++ b/ospfd/ospf_zebra.c
@@ -163,10 +163,11 @@ static int ospf_interface_address_delete(ZAPI_CALLBACK_ARGS)
static int ospf_interface_link_params(ZAPI_CALLBACK_ARGS)
{
struct interface *ifp;
+ bool changed = false;
- ifp = zebra_interface_link_params_read(zclient->ibuf, vrf_id);
+ ifp = zebra_interface_link_params_read(zclient->ibuf, vrf_id, &changed);
- if (ifp == NULL)
+ if (ifp == NULL || !changed)
return 0;
/* Update TE TLV */