Bug 503773 - Support the NetworkManager ipv6 option "addr-gen-mode"
Summary: Support the NetworkManager ipv6 option "addr-gen-mode"
Status: CONFIRMED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Networking in general (other bugs)
Version First Reported In: 6.3.4
Platform: Fedora RPMs Linux
: NOR wishlist
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-05-04 18:18 UTC by Douglas Silva
Modified: 2025-09-22 21:21 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments
Screenshot of the Wifi and Networking configuration window (78.76 KB, image/png)
2025-05-04 18:18 UTC, Douglas Silva
Details
Screenshot of the GTK nm-connection-editor containing a field for addr-gen-mode (93.82 KB, image/png)
2025-05-04 18:20 UTC, Douglas Silva
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Douglas Silva 2025-05-04 18:18:48 UTC
Created attachment 180933 [details]
Screenshot of the Wifi and Networking configuration window

SUMMARY
The Wifi and Internet section of the System Settings app currently does not have a field to set the NetworkManager connection option `ipv6.addr-gen-mode`.

From networkmanager.conf(5):

> CONNECTION SECTION
>        ipv6.addr-gen-mode
>           If the per-profile setting is either "default" or "default-or-eui64", the global default is used.
>           If the default is unspecified, the fallback value is either "stable-privacy" or "eui64", depending
>           on whether the per-profile setting is "default" or "default-or-eui64, respectively.

I cannot use the default, `stable-privacy`, because I have a dynamic GUA address — which means that the interface identifiers are constantly changing, and I need a "stable" address for the router firewall rules to work.

So I edit my connection file at `/etc/NetworkManager/system-connections/`:

```diff
[connection]
id=my_connection
uuid=my_uuid
type=ethernet
autoconnect-priority=-100

[ethernet]

[ipv4]
method=auto

[ipv6]
-addr-gen-mode=stable-privacy
+addr-gen-mode=eui64
method=auto

[proxy]
```

After restarting the NetworkManager service, I can see the new IPv6 IID based on the MAC address — it works. But as soon as you decide to edit the connection through the System Settings app, it will reset `addr-gen-mode` to `stable-privacy` again. The question is: WHY?

While we're at it, I'd like to request the addition of this field to the GUI app. For instance, the GTK-based "nm-connection-editor" has it (will attach a screenshot of it).

STEPS TO REPRODUCE
1. In the System Settings app, go to Wi-Fi & Internet, then Wi-Fi & Networking.
2. Pick your connection from the list and rename it — to make sure it is created at `/etc/NetworkManager/system-connections/` (e.g. "my_connection"). Remember to "Apply" the changes.
3. Edit `/etc/NetworkManager/system-connections/my_connection.nmconnection` and set `addr-gen-mode` in the `ipv6` section to `eui64`.
4. Restart NetworkManager: `sudo systemctl restart NetworkManager`
5. Repeat step 1 and 2, then inspect the connection file: `cat /etc/NetworkManager/system-connections/my_connection.nmconnection`

OBSERVED RESULT
```
[ipv6]
addr-gen-mode=stable-privacy
```

EXPECTED RESULT
```
[ipv6]
addr-gen-mode=eui64
```

SOFTWARE/OS VERSIONS
Windows: n/a
macOS: n/a
(available in the Info Center app, or by running `kinfo` in a terminal window)
Linux/KDE Plasma: Fedora 42 (KDE Plasma Edition) (amd64)
KDE Plasma Version: 6.3.4
KDE Frameworks Version: 6.13.0
Qt Version: 6.9.0

ADDITIONAL INFORMATION
Comment 1 Douglas Silva 2025-05-04 18:20:38 UTC
Created attachment 180934 [details]
Screenshot of the GTK nm-connection-editor containing a field for addr-gen-mode
Comment 2 TraceyC 2025-09-22 21:21:26 UTC
I'm able to reproduce this on git-master. It seems the cause is that since the addr-gen-mode value is not exposed in the UI, it always saves the default value for the field, regardless of what's saved.

I'm changing this to wishlist, since it's a feature request to support that field, rather than a bug. While annoying, it's expected that the UI will override values in the config files on disk.

I did notice that after setting the value manually in the .nmconnection file, it is preserved when editing other network entries through the GUI. The only time it's overwritten is if you edit the ethernet entry that was customized.