RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 2144521 - [RFE] The option to set no-aaaa in resolv.conf are not available in NetworkManager
Summary: [RFE] The option to set no-aaaa in resolv.conf are not available in NetworkMa...
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: NetworkManager
Version: 8.7
Hardware: x86_64
OS: Linux
Target Milestone: rc
: ---
Assignee: Fernando F. Mancera
QA Contact: Filip Pokryvka
Mayur Patil
Depends On:
Blocks: 2176137 2183216
TreeView+ depends on / blocked
Reported: 2022-11-21 14:55 UTC by Josep
Modified: 2023-11-14 18:05 UTC (History)
13 users (show)

Fixed In Version: NetworkManager-1.40.16-4.el8
Doc Type: Enhancement
Doc Text:
.`NetworkManager` supports the `no-aaaa` DNS option You can now use the `no-aaaa` option to configure DNS settings on managed nodes by suppressing AAAA queries generated by the stub resolver. Previously, there was no option to suppress AAAA queries generated by the stub resolver, including AAAA lookups triggered by NSS-based interfaces such as `getaddrinfo`; only DNS lookups were affected. With this enhancement, you can disable IPv6 resolution by using the `nmcli` utility. After a restart of the `NetworkManager` service, the `no-aaaa` setting gets reflected in the `/etc/resolv.conf` file, with additional control over DNS lookups.
Clone Of:
: 2176137 (view as bug list)
Last Closed: 2023-11-14 15:49:35 UTC
Type: Bug
Target Upstream Version:

Attachments (Terms of Use)
nm-log-trace.txt (635.15 KB, text/plain)
2023-04-26 13:11 UTC, Marko Myllynen
no flags Details

System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker NMT-99 0 None None None 2023-01-22 14:14:55 UTC
Red Hat Issue Tracker RHELPLAN-140035 0 None None None 2022-11-21 14:57:29 UTC
Red Hat Product Errata RHBA-2023:7118 0 None None None 2023-11-14 15:50:27 UTC
freedesktop.org Gitlab NetworkManager NetworkManager-ci merge_requests 1418 0 None merged dns: cover no-aaaa option 2023-05-30 07:24:04 UTC

Description Josep 2022-11-21 14:55:12 UTC
Description of problem:

The patch for RHEL8.7: 


Has been released. But the patch does not take into consideration the integration with NetworkManager, so is not possible to enter the option to disable ipv6 resolution "no-aaaa" in /etc/resolv.conf via NetworkManager with nmcli command 

So if in a RHEL 8.7 (latest updates applied) execute:

[root@localhost ~]# nmcli connection modify enp1s0 ipv4.dns-options "no-aaaa"
[root@localhost ~]# systemctl restart NetworkManager
[root@localhost ~]# cat /etc/resolv.conf
# Generated by NetworkManager

The option is not set in /etc/resolv.conf, we need the option to be integrated in nmcli command

Version-Release number of selected component (if applicable):

RHEL 8.7
NetworkManager 1.40.0-2

How reproducible:


Steps to Reproduce:

See description of the problem above:

[root@localhost ~]# nmcli connection modify enp1s0 ipv4.dns-options "no-aaaa"
[root@localhost ~]# systemctl restart NetworkManager
[root@localhost ~]# cat /etc/resolv.conf
# Generated by NetworkManager

Actual results:

The option is not set with nmcli command to /etc/resolv.conf

Expected results:

The option "no-aaaa" will appear in /etc/resolv.conf

Additional info:

Comment 11 Marko Myllynen 2023-04-24 06:13:17 UTC
Thanks for working on this.

I tried this quickly (NetworkManager-1.40.16-4.el8.x86_64.rpm) in a dnsmasq based DNS caching setup on an IPv4-only host with dns=dnsmasq. The no-aaaa option was accepted in the NIC nmconnection ini file (no warnings or errors) but it did not appear in /etc/resolv.conf. Perhaps this is a scenario which has not been considered so far and is now more relevant?


Comment 12 Beniamino Galvani 2023-04-26 12:42:14 UTC
> The no-aaaa option was accepted in the NIC nmconnection ini file (no warnings or errors) but it did not appear in /etc/resolv.conf

The scenario you describe works fine in my test setup.

Please ensure that:

 - you have restarted the service after the package upgrade
 - if you modified the nmconnection file directly, you need to either call "nmcli connection reload" (preferred) or restart the service
 - in any case, you need to reactivate the profile with "nmcli connection up $name" to have the new setting take effect.

If it still doesn't work, please show the output of:

  cat /etc/resolv.conf
  NetworkManager --print-config

and possibly attach a log at trace level.

Comment 13 Marko Myllynen 2023-04-26 13:09:49 UTC
I even rebooted the system earlier to no avail, here's what I see now after booting up the test VM:

root@rhel-8-server:~# rpm -qa | grep NetworkManager | sort
root@rhel-8-server:~# cat /etc/NetworkManager/conf.d/*
root@rhel-8-server:~# cat /etc/NetworkManager/dnsmasq.d/*
root@rhel-8-server:~# cat /etc/resolv.conf 
# Generated by NetworkManager
search example.com
options edns0 trust-ad
root@rhel-8-server:~# cat /etc/NetworkManager/system-connections/net0.nmconnection 




root@rhel-8-server:~# ip l
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: net0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP mode DEFAULT group default qlen 1000
    link/ether 52:54:00:e7:11:6f brd ff:ff:ff:ff:ff:ff

I'll also attach the requested travel level log. Thanks.

Comment 14 Marko Myllynen 2023-04-26 13:11:01 UTC
Created attachment 1960127 [details]

Comment 15 Beniamino Galvani 2023-04-26 14:00:30 UTC
Hi, the problem is:

  <warn>  [1682514298.2879] keyfile: load: "/etc/NetworkManager/system-connections/net0.nmconnection": failed to load connection: File permissions (100644) are insecure

The connection file must only be accessible by root because it can contain secrets. In general the best way to add or modify connections is via nmcli because it takes care of everything. If you create files manually, you need to set the correct permissions or umask. See also:


Comment 16 Marko Myllynen 2023-04-26 14:47:05 UTC
Good catch, thanks for pointing it out, now it works! Earlier on this VM I did manually a one-time migration from RHEL 8 default ifcfg files to connection files and that caused this hiccup.

Wrt the link, with connection files it looks like from RHEL 9 onwards using the network system role is a good choice when doing configurations with Ansible in scale.


Comment 23 errata-xmlrpc 2023-11-14 15:49:35 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (NetworkManager bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.


Note You need to log in before you can comment on or make changes to this bug.