On 12/22/25 4:23 PM, Adrian Moreno via dev wrote:
> There are two issues with the way the value of IFLA_IF_NETNSID
> is currently being determined.
>
> Firstly, IFLA_IF_NETNSID is an enum value, not a preprocessor macro, but
> a preprocessor conditional is being used to check if it exists.
> So, from the preprocessor's PoV, it's always undefined.
>
> Secondly, the value being set is wrong.
>
> ```
> $ cat > main.c << EOF
> int main() {
> return IFLA_IF_NETNSID;
> }
> EOF
> $ gcc main.c && ./a.out; echo $?
> 46
> ```
> I double checked just in case the value had changed since it was
> introduced: it hasn't.
>
> Fixes: 756819ddd788 ("netdev-linux: use netlink to update netdev.")
> Signed-off-by: Adrian Moreno <[email protected]>
Thanks, Adrian!
It's very strange that this wasn't caught when the patch was initially
introduced and it's also strange that this didn't cause any issues for
many years. I suppose the fallback always saved the day...
Applied and backported this particular patch down to 3.3.
Best regards, Ilya Maximets.
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev