通过我的三星 Galaxy S7 蓝牙网络共享,DNS 服务器不再被考虑

通过我的三星 Galaxy S7 蓝牙网络共享,DNS 服务器不再被考虑

尝试在 NetworkManager 中手动将路由添加到我的蓝牙连接后,似乎即使删除这些额外的路由也无法再连接。我深入研究了一下以了解发生了什么,以下是我发现的内容:

当我通过 nm-applet 连接时一切正常,但无法访问互联网:

   # ping www.google.com
   ping: www.google.com: Nom ou service inconnu

来自 NM 的连接信息显示主 DNS 由 DHCP 正确提供:

   Primary DNS:     192.168.44.1

通过交互式 nslookup 使用此 dns 地址,我可以解析 www.google.com,因此我使用以下命令手动将此 DNS 添加到 resolvconf:echo nameserver 192.168.44.1|sudo resolvconf -a bnep0,其中 bnep0 是我的蓝牙设备名称,并且互联网再次变得可访问。

因此,我尝试了解在网络共享过程中附加了什么内容,并将 DEBUG 日志级别添加到 NetworkManager 的 MB、DNS 和 BT 域,并获得了以下日志:

Oct 28 22:43:27 hbrazzi-ThinkPad-T450s NetworkManager[24463]: <info>  [1509223407.8541] device (94:7B:E7:8A:0F:65): Activation: (bluetooth) Stage 2 of 5 (Device Configure) successful. Will connect via PAN.
Oct 28 22:43:27 hbrazzi-ThinkPad-T450s NetworkManager[24463]: <debug> [1509223407.8586] dns-mgr: (device_ip6_config_changed): queueing DNS updates (1)
Oct 28 22:43:27 hbrazzi-ThinkPad-T450s NetworkManager[24463]: <debug> [1509223407.8586] dns-mgr: (device_ip6_config_changed): DNS configuration did not change
Oct 28 22:43:27 hbrazzi-ThinkPad-T450s NetworkManager[24463]: <debug> [1509223407.8587] dns-mgr: (device_ip6_config_changed): no DNS changes to commit (0)
Oct 28 22:43:30 hbrazzi-ThinkPad-T450s NetworkManager[24463]: <debug> [1509223410.8968] dns-mgr: (device_ip4_config_changed): queueing DNS updates (1)
Oct 28 22:43:30 hbrazzi-ThinkPad-T450s NetworkManager[24463]: <debug> [1509223410.8969] dns-mgr: (device_ip4_config_changed): DNS configuration did not change
Oct 28 22:43:30 hbrazzi-ThinkPad-T450s NetworkManager[24463]: <debug> [1509223410.8969] dns-mgr: (device_ip4_config_changed): no DNS changes to commit (0)
Oct 28 22:43:30 hbrazzi-ThinkPad-T450s NetworkManager[24463]: <debug> [1509223410.9115] dns-mgr: (device_state_changed): queueing DNS updates (1)
Oct 28 22:43:30 hbrazzi-ThinkPad-T450s NetworkManager[24463]: <debug> [1509223410.9116] dns-mgr: (update_routing_and_dns): queueing DNS updates (2)
Oct 28 22:43:30 hbrazzi-ThinkPad-T450s NetworkManager[24463]: <debug> [1509223410.9119] dns-mgr: (update_routing_and_dns): DNS configuration changed
Oct 28 22:43:30 hbrazzi-ThinkPad-T450s NetworkManager[24463]: <debug> [1509223410.9120] dns-mgr: (update_routing_and_dns): no DNS changes to commit (1)
Oct 28 22:43:30 hbrazzi-ThinkPad-T450s NetworkManager[24463]: <debug> [1509223410.9120] dns-mgr: (device_state_changed): DNS configuration changed
Oct 28 22:43:30 hbrazzi-ThinkPad-T450s NetworkManager[24463]: <debug> [1509223410.9120] dns-mgr: (device_state_changed): committing DNS changes (0)
Oct 28 22:43:30 hbrazzi-ThinkPad-T450s NetworkManager[24463]: <debug> [1509223410.9120] dns-mgr: update-dns: updating resolv.conf
    Oct 28 22:43:30 hbrazzi-ThinkPad-T450s NetworkManager[24463]: <debug> [1509223410.9121] dns-mgr: update-dns: updating plugin systemd-resolved
    Oct 28 22:43:30 hbrazzi-ThinkPad-T450s NetworkManager[24463]: ((devices/nm-device.c:9799)): assertion '<dropped>' failed
    Oct 28 22:43:30 hbrazzi-ThinkPad-T450s NetworkManager[24463]: ((devices/nm-device.c:9799)): assertion '<dropped>' failed
    Oct 28 22:43:30 hbrazzi-ThinkPad-T450s NetworkManager[24463]: <debug> [1509223410.9600] dns-mgr: (device_ip4_config_changed): queueing DNS updates (1)
Oct 28 22:43:30 hbrazzi-ThinkPad-T450s NetworkManager[24463]: <debug> [1509223410.9601] dns-mgr: (device_ip4_config_changed): DNS configuration did not change
Oct 28 22:43:30 hbrazzi-ThinkPad-T450s NetworkManager[24463]: <debug> [1509223410.9601] dns-mgr: (device_ip4_config_changed): no DNS changes to commit (0)

如您所见。nm-device.c 的第 9799 行似乎存在问题,随后指示 DNS 配置未更改。现在我有点卡住了,希望得到帮助。

根据 jeremy31 的要求,以下是我的 DNS 相关包:

# dpkg -l|grep dns
rc  dnsmasq-base                                    2.76-5ubuntu0.1                               amd64        Small caching DNS proxy and DHCP/TFTP server
ii  dnsutils                                        1:9.10.3.dfsg.P4-10.1ubuntu5.2                amd64        Clients provided with BIND
ii  libdns-export162                                1:9.10.3.dfsg.P4-10.1ubuntu5.2                amd64        Exported DNS Shared Library
ii  libdns162:amd64                                 1:9.10.3.dfsg.P4-10.1ubuntu5.2                amd64        DNS Shared Library used by BIND
ii  libnet-dns-perl                                 1.07-1                                        all          Perform DNS queries from a Perl script
ii  libnss-mdns:amd64                               0.10-8ubuntu1                                 amd64        NSS module for Multicast DNS name resolution

问候

答案1

我找到了答案,这是网络管理器 1.4.4-1ubuntu3.2 中的一个错误(至少如此)

我不确定它是什么时候被引入或解决的,但是使用网络管理器 1.8.2-1ubuntu1 dns 解析在 wwan/3g 上也能正常工作。

对于 ubuntu 17.04,我使用了 artful-proposed 的 1.8.2 版本:https://launchpad.net/ubuntu/+source/network-manager/1.8.2-1ubuntu1/+build/13090166

您需要更新 libnm0 和网络管理器:https://launchpad.net/ubuntu/+source/network-manager/1.8.2-1ubuntu1/+build/13090166/+files/libnm0_1.8.2-1ubuntu1_amd64.deb https://launchpad.net/ubuntu/+source/network-manager/1.8.2-1ubuntu1/+build/13090166/+files/network-manager_1.8.2-1ubuntu1_amd64.deb

下载它们,然后通过以下方式安装:

sudo dpkg -i libnm0_1.8.2-1ubuntu1_amd64.deb network-manager_1.8.2-1ubuntu1_amd64.deb

我重新启动了网络管理器和调制解调器管理器,尽管我猜测调制解调器管理器是不必要的。

sudo service network-manager restart
sudo service modem-manager restart

相关内容