diff options
| author | Hiroki Shirokura <hiroki.shirokura@linecorp.com> | 2021-12-18 09:03:01 +0000 | 
|---|---|---|
| committer | Louis Scalbert <louis.scalbert@6wind.com> | 2023-04-18 10:11:52 +0200 | 
| commit | e7948f8ce607fca184a5c86591c29e31604454ae (patch) | |
| tree | ebc8f4a3113ee19bc8087ff158715c5b12eb5880 /isisd/isis_lsp.c | |
| parent | 81a067cd9251b60a04bbc8133546e790044fa790 (diff) | |
isisd: update SR_ALGORITHM_COUNT to 256
Before this commit, SR_ALGORITHM_COUNT was set to 2,
and each was hardcoded with router capability tlv.
When Flex-Algo is supported, SR-Algorithm may be
variably supported up to 256.
Signed-off-by: Hiroki Shirokura <hiroki.shirokura@linecorp.com>
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
Diffstat (limited to 'isisd/isis_lsp.c')
| -rw-r--r-- | isisd/isis_lsp.c | 8 | 
1 files changed, 4 insertions, 4 deletions
diff --git a/isisd/isis_lsp.c b/isisd/isis_lsp.c index dc43822847..9e5c200cce 100644 --- a/isisd/isis_lsp.c +++ b/isisd/isis_lsp.c @@ -1066,6 +1066,10 @@ static void lsp_build(struct isis_lsp *lsp, struct isis_area *area)  	if (area->isis->router_id != 0) {  		struct isis_router_cap cap = {}; +		/* init SR algo list content to the default value */ +		for (int i = 0; i < SR_ALGORITHM_COUNT; i++) +			cap.algo[i] = SR_ALGORITHM_UNSET; +  		cap.router_id.s_addr = area->isis->router_id;  		/* Add SR Sub-TLVs if SR is enabled. */ @@ -1091,10 +1095,6 @@ static void lsp_build(struct isis_lsp *lsp, struct isis_area *area)  			cap.srlb.lower_bound = srdb->config.srlb_lower_bound;  			/* And finally MSD */  			cap.msd = srdb->config.msd; -		} else { -			/* Disable SR Algorithm */ -			cap.algo[0] = SR_ALGORITHM_UNSET; -			cap.algo[1] = SR_ALGORITHM_UNSET;  		}  		isis_tlvs_set_router_capability(lsp->tlvs, &cap);  | 
