summaryrefslogtreecommitdiff
path: root/ospfd/ospf_interface.c
diff options
context:
space:
mode:
authorAcee <aceelindem@gmail.com>2023-07-17 13:47:16 -0400
committerAcee <aceelindem@gmail.com>2023-07-20 14:56:43 -0400
commite2eea4fe8e51915ccefeb3419282280e6b95cd63 (patch)
treec02308725ab5399f40f92a5bfaf19bb897c8ecdd /ospfd/ospf_interface.c
parentff10abcc89581c1ed94a45f92fc76daf863c512e (diff)
ospfd: Implement OSPF prefix-suppression as specified in RFC 6860
Signed-off-by: Acee <aceelindem@gmail.com>
Diffstat (limited to 'ospfd/ospf_interface.c')
-rw-r--r--ospfd/ospf_interface.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/ospfd/ospf_interface.c b/ospfd/ospf_interface.c
index 72de198116..bdab672b47 100644
--- a/ospfd/ospf_interface.c
+++ b/ospfd/ospf_interface.c
@@ -600,6 +600,7 @@ void ospf_free_if_params(struct interface *ifp, struct in_addr addr)
!OSPF_IF_PARAM_CONFIGURED(oip, auth_type) &&
!OSPF_IF_PARAM_CONFIGURED(oip, if_area) &&
!OSPF_IF_PARAM_CONFIGURED(oip, opaque_capable) &&
+ !OSPF_IF_PARAM_CONFIGURED(oip, prefix_suppression) &&
listcount(oip->auth_crypt) == 0) {
ospf_del_if_params(ifp, oip);
rn->info = NULL;
@@ -709,6 +710,8 @@ int ospf_if_new_hook(struct interface *ifp)
SET_IF_PARAM(IF_DEF_PARAMS(ifp), opaque_capable);
IF_DEF_PARAMS(ifp)->opaque_capable = OSPF_OPAQUE_CAPABLE_DEFAULT;
+ IF_DEF_PARAMS(ifp)->prefix_suppression = OSPF_PREFIX_SUPPRESSION_DEFAULT;
+
rc = ospf_opaque_new_if(ifp);
return rc;
}