Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release adj sid label failed when down eth port! #15030

Closed
huangyl-git opened this issue Dec 15, 2023 · 5 comments
Closed

Release adj sid label failed when down eth port! #15030

huangyl-git opened this issue Dec 15, 2023 · 5 comments
Assignees
Labels

Comments

@huangyl-git
Copy link

huangyl-git commented Dec 15, 2023

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 huangyl-git added the triage Needs further investigation label Dec 15, 2023
@odd22 odd22 added ospf and removed triage Needs further investigation labels Dec 19, 2023
@odd22 odd22 self-assigned this Dec 19, 2023
@odd22
Copy link
Member

odd22 commented Dec 19, 2023

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

@huangyl-git
Copy link
Author

huangyl-git commented Dec 20, 2023

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。

@nanjing2020
Copy link

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))

Copy link

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.

@frrbot
Copy link

frrbot bot commented Aug 22, 2024

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

@frrbot frrbot bot closed this as completed Aug 29, 2024
@frrbot frrbot bot closed this as completed Aug 29, 2024
@frrbot frrbot bot removed the autoclose label Aug 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants