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 - Failure setting IPv6 token for interface in kernel
Summary: Failure setting IPv6 token for interface in kernel
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: NetworkManager
Version: 7.5
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: rc
: ---
Assignee: Beniamino Galvani
QA Contact: Desktop QE
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-03-26 16:16 UTC by Thomas Haller
Modified: 2019-08-06 13:16 UTC (History)
10 users (show)

Fixed In Version: NetworkManager-1.16.2-0.1.20190328git8ec0954570.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-08-06 13:16:20 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2019:2302 0 None None None 2019-08-06 13:16:36 UTC

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


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