From f76a94668ddd4b5e1385a0daf6c8925674f9ef18 Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Thu, 5 Apr 2018 11:35:55 +0200 Subject: [PATCH] platform: refetch TUN link when no type-specific lnk data was received Now that kernel supports providing information about tun/tap devices via netlink, make use of it. Also, enable the hack that: - when we first see a link that has no lnk data, we refetch it on the assumption, that kernel just didn't send it the first time. For old kernels that do not yet support tun properties on netlink, this means that we will always refetch the link once, the first time we see it. I think that is acceptable, and the more correct behavior for newer kernels that do support it. --- src/platform/nm-linux-platform.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/platform/nm-linux-platform.c b/src/platform/nm-linux-platform.c index 96d8367ec..3c01d3d36 100644 --- a/src/platform/nm-linux-platform.c +++ b/src/platform/nm-linux-platform.c @@ -3939,6 +3939,7 @@ cache_on_change (NMPlatform *platform, NM_LINK_TYPE_MACVLAN, NM_LINK_TYPE_MACVLAN, NM_LINK_TYPE_SIT, + NM_LINK_TYPE_TUN, NM_LINK_TYPE_VLAN, NM_LINK_TYPE_VXLAN)) { /* certain link-types also come with a IFLA_INFO_DATA/lnk_data. It may happen that