diff options
| author | Renato Westphal <renato@opensourcerouting.org> | 2021-05-18 11:35:58 -0300 | 
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-05-18 11:35:58 -0300 | 
| commit | 0376f8a48c4ac502de739ab1dbee46cc3982dd42 (patch) | |
| tree | a9b34aca7a41efe535886b11eda034df8f504aa9 | |
| parent | 365215dd4bc5c0475b52f32aeb0eddf934131c26 (diff) | |
| parent | 249c4457838a27c026af3ab7fa5d66a21325aae7 (diff) | |
Merge pull request #8608 from Fredi-raspall/pr_isis_sr_anycastbase_8.0
isisd: clear the N-flag in ext. reachability TLVs
| -rw-r--r-- | isisd/isis_sr.c | 9 | 
1 files changed, 4 insertions, 5 deletions
diff --git a/isisd/isis_sr.c b/isisd/isis_sr.c index c4024772f5..f7cef43d0d 100644 --- a/isisd/isis_sr.c +++ b/isisd/isis_sr.c @@ -361,9 +361,9 @@ struct sr_prefix_cfg *isis_sr_cfg_prefix_add(struct isis_area *area,  	pcfg->last_hop_behavior = yang_get_default_enum(  		"%s/prefix-sid-map/prefix-sid/last-hop-behavior", ISIS_SR); -	/* Set the N-flag when appropriate. */ +	/* Mark as node Sid if the prefix is host and configured in loopback */  	ifp = if_lookup_prefix(prefix, VRF_DEFAULT); -	if (ifp && sr_prefix_is_node_sid(ifp, prefix) && !pcfg->n_flag_clear) +	if (ifp && sr_prefix_is_node_sid(ifp, prefix))  		pcfg->node_sid = true;  	/* Save prefix-sid configuration. */ @@ -438,7 +438,7 @@ void isis_sr_prefix_cfg2subtlv(const struct sr_prefix_cfg *pcfg, bool external,  	}  	if (external)  		SET_FLAG(psid->flags, ISIS_PREFIX_SID_READVERTISED); -	if (pcfg->node_sid) +	if (pcfg->node_sid && !pcfg->n_flag_clear)  		SET_FLAG(psid->flags, ISIS_PREFIX_SID_NODE);  	/* Set SID value. */ @@ -948,8 +948,7 @@ static int sr_if_new_hook(struct interface *ifp)  		if (!pcfg)  			continue; -		if (sr_prefix_is_node_sid(ifp, &pcfg->prefix) -		    && !pcfg->n_flag_clear) { +		if (sr_prefix_is_node_sid(ifp, &pcfg->prefix)) {  			pcfg->node_sid = true;  			lsp_regenerate_schedule(area, area->is_type, 0);  		}  | 
