FRRouting / frr

The FRRouting Protocol Suite
https://frrouting.org/
Other
3.21k stars 1.24k forks source link

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

Closed huangyl-git closed 2 weeks ago

huangyl-git commented 9 months ago

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

odd22 commented 8 months ago

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 commented 8 months ago

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 commented 6 months ago

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

github-actions[bot] commented 3 weeks ago

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[bot] commented 3 weeks ago

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