GNOME Bugzilla – Bug 740380
[PATCH] platform: stop using TUN_* flags
Last modified: 2014-12-01 11:05:28 UTC
Upstream will be removing the incorrect TUN_* flags from if_tun.h so we might as well use the replacements. Technically TUN_TYPE_MASK and TUN_TUN_DEV/TUN_TAP_DEV were not incorrect as they have the same value as their IFF_* replacements, but they're considered deprecated too. diff --git a/src/platform/nm-linux-platform.c b/src/platform/nm-linux-platform.c index 42444d9..391f175 100644 --- a/src/platform/nm-linux-platform.c +++ b/src/platform/nm-linux-platform.c @@ -2964,7 +2964,7 @@ tun_get_properties (NMPlatform *platform, int ifindex, NMPlatformTunProperties * #ifndef IFF_MULTI_QUEUE const int IFF_MULTI_QUEUE = 0x0100; #endif - props->mode = ((flags & TUN_TYPE_MASK) == TUN_TUN_DEV) ? "tun" : "tap"; + props->mode = ((flags & (IFF_TUN | IFF_TAP)) == IFF_TUN) ? "tun" : "tap"; props->no_pi = !!(flags & IFF_NO_PI); props->vnet_hdr = !!(flags & IFF_VNET_HDR); props->multi_queue = !!(flags & IFF_MULTI_QUEUE);
And by "upstream" I mean the upstream kernel. https://lkml.org/lkml/2014/11/19/460
LGTM
5de8a0d3a711d7e9b0fab790964f55f40be99292