summaryrefslogtreecommitdiffstats
path: root/ldpd/ldpd.c
diff options
context:
space:
mode:
authorlynne <lynne@voltanet.io>2020-03-29 19:47:36 +0200
committerlynne <lynne@voltanet.io>2020-04-01 19:14:58 +0200
commit8675356098c9d30b9e566c0434138f1a7578ebfe (patch)
tree9c37f29eeb306696917716930d12db7cf1fbf78a /ldpd/ldpd.c
parenttests: adding LDP tests for advertising host-routes. (diff)
downloadfrr-8675356098c9d30b9e566c0434138f1a7578ebfe.tar.xz
frr-8675356098c9d30b9e566c0434138f1a7578ebfe.zip
ldpd: fixing host-only configuration filter.
There is configuration in LDP to only create labels for host-routes. If the user remove this configuration the code was not readvertising non-host routes to it's LDP neighbors. The issue is the same in reverse also. If the user adds this configuration on an active LDP session the non-host routes were not withdrawn. Signed-off-by: Lynne Morrison <lynne@voltanet.io>
Diffstat (limited to 'ldpd/ldpd.c')
-rw-r--r--ldpd/ldpd.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/ldpd/ldpd.c b/ldpd/ldpd.c
index 0f9f055d0..741c8c465 100644
--- a/ldpd/ldpd.c
+++ b/ldpd/ldpd.c
@@ -1319,6 +1319,7 @@ merge_af(int af, struct ldpd_af_conf *af_conf, struct ldpd_af_conf *xa)
int stop_init_backoff = 0;
int remove_dynamic_tnbrs = 0;
int change_egress_label = 0;
+ int change_host_label = 0;
int reset_nbrs_ipv4 = 0;
int reset_nbrs = 0;
int update_sockets = 0;
@@ -1349,6 +1350,12 @@ merge_af(int af, struct ldpd_af_conf *af_conf, struct ldpd_af_conf *xa)
if ((af_conf->flags & F_LDPD_AF_EXPNULL) !=
(xa->flags & F_LDPD_AF_EXPNULL))
change_egress_label = 1;
+
+ /* changing config of host only fec filtering */
+ if ((af_conf->flags & F_LDPD_AF_ALLOCHOSTONLY)
+ != (xa->flags & F_LDPD_AF_ALLOCHOSTONLY))
+ change_host_label = 1;
+
af_conf->flags = xa->flags;
/* update the transport address */
@@ -1358,6 +1365,10 @@ merge_af(int af, struct ldpd_af_conf *af_conf, struct ldpd_af_conf *xa)
}
/* update ACLs */
+ if (strcmp(af_conf->acl_label_allocate_for,
+ xa->acl_label_allocate_for))
+ change_host_label = 1;
+
if (strcmp(af_conf->acl_label_advertise_to,
xa->acl_label_advertise_to) ||
strcmp(af_conf->acl_label_advertise_for,
@@ -1391,6 +1402,8 @@ merge_af(int af, struct ldpd_af_conf *af_conf, struct ldpd_af_conf *xa)
case PROC_LDE_ENGINE:
if (change_egress_label)
lde_change_egress_label(af);
+ if (change_host_label)
+ lde_change_host_label(af);
break;
case PROC_LDP_ENGINE:
if (stop_init_backoff)