IFF_UP could previously only be unset via RTM_NEWLINK. Requests to set
IFF_UP, though they succeed, did not actually set the flag.
Sponsored by: Google LLC (GSoC)
Differential D51871
netlink: Fix IFF_UP flag handling in RTM_NEWLINK's modify_link handler Authored by saheed on Aug 12 2025, 8:15 AM. Tags None Referenced Files
Details
IFF_UP could previously only be unset via RTM_NEWLINK. Requests to set Sponsored by: Google LLC (GSoC)
Diff Detail
Event TimelineComment Actions So that seems correct if ifi_change lists the changed flags we should look at. I can't find any use of it in our tree, and the only Linux documentation I found (https://www.man7.org/linux/man-pages/man7/rtnetlink.7.html) says "ifi_change is reserved for future use and should be always set to 0xFFFFFFFF." What am I missing? Comment Actions Linux is actually doing something based on ifi_change currently (relevant code in net/core/rtnetlink.c, rtnl_dev_combine_flags). It uses the previous flags for bits where ifi_change are unset to change device flags, so basically this is equivalent to what our code does. So I guess we should decide whether to stick to the documentation then or keep things in line with Linux. Thoughts? Comment Actions Ah yes, "Documentation does not match reality", that's what I was missing. I did not check Linux code, I only looked at our tree.
I'd be inclined to pick up Linux's bug compatibility as well. Presumably there's code out there that makes this incorrect assumption about ifi_change, and we may as well go all out on being compatible. Especially if it's easy to do. That can be done separately if you prefer (or not at all, if either of you have strong views here). Comment Actions
Adds linux's ifi_change bug compatibility
Comment Actions I'll reopen this revision to have only IFF_UP related change without touching IFF_PROMISC | ||||||||||||||||||||||||||||||||||||||||||||