Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 1560652

Summary: Failure setting IPv6 token for interface in kernel
Product: Red Hat Enterprise Linux 7 Reporter: Thomas Haller <thaller>
Component: NetworkManagerAssignee: Beniamino Galvani <bgalvani>
Status: CLOSED ERRATA QA Contact: Desktop QE <desktop-qa-list>
Severity: high Docs Contact:
Priority: high    
Version: 7.5CC: atragler, bgalvani, brian, fgiudici, lrintel, rkhan, sbrivio, sukulkar, thaller, vbenes
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: NetworkManager-1.16.2-0.1.20190328git8ec0954570.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-08-06 13:16:20 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Thomas Haller 2018-03-26 16:16:09 UTC
When configuring ipv6.token in NetworkManager, the token seems to be correctly used to generate addresses (in user-space).

However, NM also tries to set the token of the link via netlink:


platform-linux: link: change 3: token: set IPv6 address generation token to ::2


that always fails with:

<warn>  [1522080519.8317] platform-linux: do-change-link[3]: failure changing link: failure 22 (Invalid argument)



Probably, related to kernel doing:



static int inet6_set_iftoken(struct inet6_dev *idev, struct in6_addr *token)
...
»·······if (!token)
»·······»·······return -EINVAL;
»·······if (dev->flags & (IFF_LOOPBACK | IFF_NOARP))
»·······»·······return -EINVAL;
»·······if (!ipv6_accept_ra(idev))
»·······»·······return -EINVAL;
»·······if (idev->cnf.rtr_solicits == 0)
»·······»·······return -EINVAL;

note !ipv6_accept_ra(), which NM disables.


Maybe, NM shouldn't try to set the token in kernel. Or maybe kernel is wrong to reject this command. Either way, something is wrong.


I however does not seem harmful, beside the confusing logging message.

Comment 2 Beniamino Galvani 2018-06-08 13:50:22 UTC
(In reply to Thomas Haller from comment #0)
> When configuring ipv6.token in NetworkManager, the token seems to be
> correctly used to generate addresses (in user-space).
> 
> However, NM also tries to set the token of the link via netlink:
> 
> 
> platform-linux: link: change 3: token: set IPv6 address generation token to
> ::2
> 
> that always fails with:
> 
> <warn>  [1522080519.8317] platform-linux: do-change-link[3]: failure
> changing link: failure 22 (Invalid argument)

Do you have a reproducer for this? It seem to be working without errors for me.


> Probably, related to kernel doing:
> 
> static int inet6_set_iftoken(struct inet6_dev *idev, struct in6_addr *token)
> ...
> »·······if (!token)
> »·······»·······return -EINVAL;
> »·······if (dev->flags & (IFF_LOOPBACK | IFF_NOARP))
> »·······»·······return -EINVAL;
> »·······if (!ipv6_accept_ra(idev))
> »·······»·······return -EINVAL;
> »·······if (idev->cnf.rtr_solicits == 0)
> »·······»·······return -EINVAL;
> 
> note !ipv6_accept_ra(), which NM disables.

Actually, we enable accept_ra so it must be something else:

 case NM_NDISC_NODE_TYPE_HOST:
	/* Accepting prefixes from discovered routers. */
	nm_device_ipv6_sysctl_set (self, "accept_ra", "1");
	nm_device_ipv6_sysctl_set (self, "accept_ra_defrtr", "0");
	nm_device_ipv6_sysctl_set (self, "accept_ra_pinfo", "0");
	nm_device_ipv6_sysctl_set (self, "accept_ra_rtr_pref", "0");

Comment 3 Thomas Haller 2018-09-25 14:56:06 UTC
Unfortunately, I did not see it since.

Thanks for looking into this. Maybe let's close it as INCOMPLETE?

Comment 4 Beniamino Galvani 2018-09-27 15:26:13 UTC
(In reply to Thomas Haller from comment #0)
> When configuring ipv6.token in NetworkManager, the token seems to be
> correctly used to generate addresses (in user-space).
> 
> However, NM also tries to set the token of the link via netlink:
> 
> 
> platform-linux: link: change 3: token: set IPv6 address generation token to
> ::2
> 
> 
> that always fails with:
> 
> <warn>  [1522080519.8317] platform-linux: do-change-link[3]: failure
> changing link: failure 22 (Invalid argument)

> Maybe, NM shouldn't try to set the token in kernel. Or maybe kernel is wrong
> to reject this command. Either way, something is wrong.

I think it's useful to set the token in the kernel so that it's visible with 'ip token'.

The problem was that we tried to set the token when 'accept_ra' was still 0. This is fixed now:

https://cgit.freedesktop.org/NetworkManager/NetworkManager/commit/?id=6b5790a05e28d7d896968e43645e86ade2e967f6

Comment 8 errata-xmlrpc 2019-08-06 13:16:20 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, and where to find the updated
files, follow the link below.

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

https://access.redhat.com/errata/RHBA-2019:2302