diff options
| author | Karen Schoener <karen@voltanet.io> | 2021-06-17 09:26:36 -0400 |
|---|---|---|
| committer | Karen Schoener <karen@voltanet.io> | 2021-06-28 10:32:52 -0400 |
| commit | 0b4124c18cb826849f18af58dbc712db7d14b993 (patch) | |
| tree | 28ff0015d6f7f93ebc5585ca867686a4513a20c9 /ospfd/ospf_zebra.c | |
| parent | 0e5572bc63f93c19ceb296f12b458fc728770f0e (diff) | |
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/ospf_zebra.c')
| -rw-r--r-- | ospfd/ospf_zebra.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/ospfd/ospf_zebra.c b/ospfd/ospf_zebra.c index 5853b506f8..df112edc68 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 */ |
