isisd: clear the N-flag in ext. reachability TLVs

If the n-flag-clear option is set in the configuration of a prefix
segment, clear the flag in the extended ip reachability TLVs.

RFCs 7794 and 8667 are not too strict on the setting / clearing the
N-flag in prefix SIDs. However, if there exists a cmd line option
to clear it, it should be cleared in the TLVs announced, as other
vendors do.

Signed-off-by: Fredi Raspall <fredi@voltanet.io>
This commit is contained in:
Fredi Raspall 2021-05-02 17:13:11 +02:00
parent 82689214b5
commit 8f6a0d6402

View File

@ -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. */