From 413e5228675ca92adc52d41e2b835424a94e38fd Mon Sep 17 00:00:00 2001 From: Beniamino Galvani Date: Wed, 16 Feb 2022 13:50:09 +0100 Subject: [PATCH] core: fix DNS configuration type for wireguard connections The DNS configuration for a wireguard connection should be added with type "VPN". Fixes: 58287cbcc0c8 ('core: rework IP configuration in NetworkManager using layer 3 configuration') https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1102 --- src/core/nm-policy.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/core/nm-policy.c b/src/core/nm-policy.c index 7e9c4bdce3..c9bf31ee49 100644 --- a/src/core/nm-policy.c +++ b/src/core/nm-policy.c @@ -2008,7 +2008,8 @@ device_state_changed(NMDevice *device, AF_UNSPEC, device, nm_device_get_l3cd(device, TRUE), - NM_DNS_IP_CONFIG_TYPE_DEFAULT, + nm_device_is_vpn(device) ? NM_DNS_IP_CONFIG_TYPE_VPN + : NM_DNS_IP_CONFIG_TYPE_DEFAULT, TRUE); } update_ip_dns(self, AF_INET, device); @@ -2150,7 +2151,8 @@ device_l3cd_changed(NMDevice *device, AF_UNSPEC, device, l3cd_new, - NM_DNS_IP_CONFIG_TYPE_DEFAULT, + nm_device_is_vpn(device) ? NM_DNS_IP_CONFIG_TYPE_VPN + : NM_DNS_IP_CONFIG_TYPE_DEFAULT, TRUE); update_ip_dns(self, AF_INET, device); update_ip_dns(self, AF_INET6, device);