frr icon indicating copy to clipboard operation
frr copied to clipboard

Release adj sid label failed when down eth port!

Open huangyl-git opened this issue 2 years ago • 5 comments

when release adj label , it should be like this:

static void ospf_ext_link_delete_adj_sid(struct ext_itf exti) { / Process only (LAN)Adjacency-SID Type */ if (exti->stype != ADJ_SID && exti->stype != LAN_ADJ_SID) return;

/* Release Primary & Backup Labels from Label Manager */
if (exti->stype == ADJ_SID) {
	ospf_sr_local_block_release_label(GET_LABEL(ntohl(exti->adj_sid[0].value)));
	ospf_sr_local_block_release_label(GET_LABEL(ntohl(exti->adj_sid[1].value)));
} else {
	ospf_sr_local_block_release_label(ntohl(exti->lan_sid[0].value));
	ospf_sr_local_block_release_label(ntohl(exti->lan_sid[1].value));
}
/* And reset corresponding TLV */
unset_adjacency_sid(exti);

/* Finally, remove corresponding SR Link in SRDB & MPLS LFIB */
UNSET_FLAG(exti->flags, EXT_LPFLG_FIB_ENTRY_SET);
ospf_sr_ext_itf_delete(exti);

}

Before modification: ospf_sr_local_block_release_label(exti->adj_sid[0].value); ospf_sr_local_block_release_label(exti->adj_sid[1].value);

huangyl-git avatar Dec 15 '23 03:12 huangyl-git

Hi,

Please have a look to #15026. The problem is located in ospfd/ospf_te.c line 984 https://github.com/FRRouting/frr/pull/15026/files#diff-d35f61af81cddda63f05538505ab9312cb753062ef873ee5f64a184cca2c18e3

We should disable flooding of Extended Link when NSM state goes down, but we look only to state UP. This PR has been already merged. Please try the latest master and tell us if the problem is always here.

Olivier

odd22 avatar Dec 19 '23 15:12 odd22

this problem is not the same 1526 and 1531.

problem is 'label outside' when release.

2023/12/20 11:54:21.306905 OSPF: [H56ZV-40GH9][EC 134217736] ospf_sr_local_block_release_label: Returning label 10041856 is outside SRLB [15000/15999] 2023/12/20 11:54:21.308024 OSPF: [H56ZV-40GH9][EC 134217736] ospf_sr_local_block_release_label: Returning label 9976320 is outside SRLB [15000/15999]

the follow code should be use "ntohl" to process label, otherwise, the released labels cannot be use again! image

1526 has solved the problem of 1531。

huangyl-git avatar Dec 20 '23 04:12 huangyl-git

The "ntohl" function was utilized to process the label; however, the issue of 'label outside' still persists. ospf_sr_local_block_release_label(ntohl(exti->adj_sid[0].value))

nanjing2020 avatar Feb 23 '24 07:02 nanjing2020

This issue is stale because it has been open 180 days with no activity. Comment or remove the autoclose label in order to avoid having this issue closed.

github-actions[bot] avatar Aug 22 '24 01:08 github-actions[bot]

This issue will be automatically closed in the specified period unless there is further activity.

frrbot[bot] avatar Aug 22 '24 01:08 frrbot[bot]