#1038685 plasma-nm: DNS priority is not properly set when multiple connections present

Package:
plasma-nm
Source:
plasma-nm
Description:
Plasma network connections management
Submitter:
LXYan
Date:
2023-06-20 05:15:04 UTC
Severity:
normal
#1038685#5
Date:
2023-06-20 05:12:28 UTC
From:
To:
Dear Maintainer,

   * What led up to the situation?
        I have a laptop with wifi and 4G mobile network connected, and set the
wifi DNS in KDE settings, and leave the 4G DNS default. However, in the
/etc/resolve.conf, the 4G network's DNS server is listed before my wifi DNS,
even when I'm using wifi. Here is the resolve.conf:

lxyan@X1-Nano ~> cat /etc/resolv.conf
# Generated by NetworkManager
nameserver 221.6.4.66           # 4G's default DNS
nameserver 58.240.57.33         # 4G's default DNS
nameserver 223.6.6.6            # wifi DNS
# NOTE: the libc resolver may not support more than 3 nameservers.
# The nameservers listed below may not be recognized.
nameserver 223.5.5.5
nameserver 172.20.10.1
nameserver 2400:3200:baba::1
nameserver 2400:3200::1
nameserver fe80::5ce9:1eff:fef3:3b64%wlp0s20f3

This lead to some apps, like apt and ping, to use 4G's DNS even when I'm using
wifi, causing a long latency when solving DNS.

   * What exactly did you do (or not do) that was effective (or
     ineffective)?
        I set the 4G's DNS to the same as wifi's DNS to workaround this issue.

   * What was the outcome of this action?
        Issus workrounded

   * What outcome did you expect instead?
        plasma-nm set the dns-priority accoring to current connection.