]> git.puffer.fish Git - mirror/frr.git/commitdiff
isisd: clear the N-flag in ext. reachability TLVs
authorFredi Raspall <fredi@voltanet.io>
Sun, 2 May 2021 15:13:11 +0000 (17:13 +0200)
committerFredi Raspall <fredi@voltanet.io>
Tue, 18 May 2021 08:54:11 +0000 (10:54 +0200)
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>
isisd/isis_sr.c

index c4024772f5c9d8988e8162bae17f53cb249b6a25..4ea20cd32a1139fd92844413c13f1d25f9bbe9e7 100644 (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. */