The flags property of the NetworkInterface class produces bogus flags for the upper half of ifru_flags. It looks like it is correctly defined in defs.pxd as short ifru_flags[2]. The __get_flags() method returns just ifru_flags[0] and ignores ifru_flags[1]. Unfortunately the short is sign expanded to uint32_t which gives a bogus return value for the flags property. I was not able to fix that. It looks like ifru_flags[1] reads always as 0. So with correctly casting and adding the words, all the upper bits are 0. There are also some flags missing which are defined in 14: IFF_NOGROUP and IFF_NETLINK_1, IFF_NEEDSEPOCH, IFF_STICKYARP.
that's a very thorough analysis! could you report this upstream? https://github.com/truenas/py-netif
Looks like this is more or less a dead project.