summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2018-04-05 11:35:55 +0200
committerThomas Haller <thaller@redhat.com>2018-04-09 20:16:30 +0200
commitf76a94668ddd4b5e1385a0daf6c8925674f9ef18 (patch)
tree66a4081935c170e9491d345abc969bcf59379d68
parent031e58e1cf41347321b6310830ce053314f076e8 (diff)
downloadNetworkManager-f76a94668ddd4b5e1385a0daf6c8925674f9ef18.tar.gz
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.
-rw-r--r--src/platform/nm-linux-platform.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/platform/nm-linux-platform.c b/src/platform/nm-linux-platform.c
index 96d8367ecb..3c01d3d36e 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