Skip to content

Conversation

@matteyeux
Copy link

@matteyeux matteyeux commented Jan 26, 2026

Description

This PR fixes #116, which is a segfault in mpnh_compare_node by validating that x->iface and y->iface are not null before accessing their index field.

Null interfaces are treated as greater than non-null ones, consistent with the existing null handling pattern for x and y nodes.

Tested on my machine that was crashing. After replacing the binary in the running pod by the patched one from my branch, there is no more segfault (it was crashing every second in my pod)

image

@CLAassistant
Copy link

CLAassistant commented Jan 26, 2026

CLA assistant check
All committers have signed the CLA.

@nelljerram
Copy link
Member

/sem-approve

@nelljerram
Copy link
Member

Looks like we also need to update the Semaphore machine type. I'll do that in a separate PR.

@nelljerram
Copy link
Member

@matteyeux Please merge master in order to pick up CI fixes from #118

@matteyeux
Copy link
Author

@nelljerram master seems out of date, do you mean feature-ipinip ? It seems to be the main branch

@nelljerram
Copy link
Member

I'm so sorry. Yes, I meant feature-ipinip.

@nelljerram
Copy link
Member

/sem-approve

@matteyeux
Copy link
Author

Thanks, CI is green

@nelljerram
Copy link
Member

@matteyeux I'm sorry to ask another question - but do you know if there is something unusual about your clusters that hits this problem? I've just checked the upstream BIRD code - even the latest 3.2.0 release - and it does not appear to contain a fix like this, which feels very surprising given how widely used BIRD is. Have you also proposed this fix to upstream? It's possible that in the nearish future we might revert to using upstream BIRD instead of our own fork, because I believe we now have different solutions for the scenarios (mainly IP-in-IP) that prompted us to fork originally. Hence it would make sense to propose this fix upstream as well, to eliminate the possibility of your own clusters regressing when we switch to using upstream.

@nelljerram
Copy link
Member

FTR, in more recent BIRD code mpnh_compare_node has become nexthop_compare_node.

@matteyeux
Copy link
Author

I do not know what is wrong with my cluster to have such segfaults. I have some nodes that have these segfault and some others don't (some are k3s workers some other are k3s masters), I also tested on virtual machine (in the same network as the other nodes) and same behaviour.

Disabling IPv6 on my nodes fixed the segfault, but I wanted to also address the segfault.

Thanks for pointing to the new name of the function, I will propose a patch to the upstream BIRD project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

segfault in bird6

4 participants