diff options
author | Beniamino Galvani <bgalvani@redhat.com> | 2022-02-16 13:50:09 +0100 |
---|---|---|
committer | Beniamino Galvani <bgalvani@redhat.com> | 2022-02-16 22:49:28 +0100 |
commit | 413e5228675ca92adc52d41e2b835424a94e38fd (patch) | |
tree | 87fc25e25cedfd347484cc2b406dbb09ba24d317 | |
parent | 3b9e612dab2a8089145e61f6166a23cf35bae124 (diff) | |
download | NetworkManager-413e5228675ca92adc52d41e2b835424a94e38fd.tar.gz |
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
-rw-r--r-- | src/core/nm-policy.c | 6 |
1 files 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); |