ospfd: fix delete sr-local-label bug, use ntohl to get the correct label id

Signed-off-by: Bing Shui <bingshui@smail.nju.edu.cn>
This commit is contained in:
Bing Shui 2026-01-05 16:49:31 +08:00
parent 87e0f6b443
commit 7c0a09d966

View file

@ -583,11 +583,11 @@ static void ospf_ext_link_delete_adj_sid(struct ext_itf *exti)
/* Release Primary & Backup Labels from Label Manager */
if (exti->stype == ADJ_SID) {
ospf_sr_local_block_release_label(exti->adj_sid[0].value);
ospf_sr_local_block_release_label(exti->adj_sid[1].value);
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(exti->lan_sid[0].value);
ospf_sr_local_block_release_label(exti->lan_sid[1].value);
ospf_sr_local_block_release_label(GET_LABEL(ntohl(exti->lan_sid[0].value)));
ospf_sr_local_block_release_label(GET_LABEL(ntohl(exti->lan_sid[1].value)));
}
/* And reset corresponding TLV */
unset_adjacency_sid(exti);