-
Notifications
You must be signed in to change notification settings - Fork 89
Add null checks for iface before accessing index in mpnh_compare_node #117
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
base: feature-ipinip
Are you sure you want to change the base?
Conversation
|
/sem-approve |
|
Looks like we also need to update the Semaphore machine type. I'll do that in a separate PR. |
|
@matteyeux Please merge master in order to pick up CI fixes from #118 |
|
@nelljerram master seems out of date, do you mean feature-ipinip ? It seems to be the main branch |
|
I'm so sorry. Yes, I meant |
|
/sem-approve |
|
Thanks, CI is green |
|
@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. |
|
FTR, in more recent BIRD code |
|
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. |
Description
This PR fixes #116, which is a segfault in
mpnh_compare_nodeby 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)