FS#35638 - [netctl] netctl-auto doesn't remove IPv6 routes on profile switch
Attached to Project:
Arch Linux
Opened by Matthias Schiffer (NeoRaider) - Tuesday, 04 June 2013, 10:23 GMT
Last edited by Jelle van der Waa (jelly) - Friday, 11 August 2023, 15:12 GMT
Opened by Matthias Schiffer (NeoRaider) - Tuesday, 04 June 2013, 10:23 GMT
Last edited by Jelle van der Waa (jelly) - Friday, 11 August 2023, 15:12 GMT
|
Details
Description:
While netctl at least deletes IPv6 addresses when switching profiles since version 1.1, the corresponding default routes aren't touched, leading to broken routing when there's still a valid IPv6 address on another interface (and probably in other cases too). There should: * either `ip -6 route del default dev "$Interface"` be added to ip_unset * or disable_ipv6 be set to 1 and back to 0 on profile switch I'd prefer solution 2 as it also takes care of the addresses (the explicit flush in ip_unset could be removed again), and works even when there are multiple routes on the interface in question. Additional info: * netctl 1.1-1 |
This task depends upon
Closed by Jelle van der Waa (jelly)
Friday, 11 August 2023, 15:12 GMT
Reason for closing: Moved
Additional comments about closing: https://gitlab.archlinux.org/archlinux/n etctl/issues/1
Friday, 11 August 2023, 15:12 GMT
Reason for closing: Moved
Additional comments about closing: https://gitlab.archlinux.org/archlinux/n etctl/issues/1
For now, you can delete the default route in ExecDownPre...
How would one remove custom routes in a nice way? I suggested setting disable_ipv6 to 1 and back to 0 on profile switch because that's the only way to remove all routes on a specific interface that came to my mind... or do you only mean the routes set by Routes6?
:;
:; ip route flush dev "$Interface" &>/dev/null
:; ip -6 route flush dev "$Interface" &>/dev/null
:;
to ip_unset. For IPv4 routes, we could just delete all custom routes and gateways, but for IPv6 we cannot. Treating IPv4 the same as IPv6 makes the behavior uniform. If you see anything wrong with this solution, let me know, otherwise I'll include it in the next version.
---
$ ip -6 route show scope link
$ ip -6 route show scope global
fe80::/64 dev wlan0 proto kernel metric 256
---
According to the man page, the available predefined scopes are 'host', 'link', and 'global'.
I still think it would be much cleaner to just disable IPv6 completely in ip_unset() (it is already re-enabled in ip_set()).
https://github.com/systemd/systemd/issues/6088
That bug is fixed by now.
I do not remember the relevance to this issue here and do not have the time to dig into it. If anyone wants to go look and see whether this brings anything new to the discussion, feel free to investigate and update this bug report.