Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[connman] Fix errors in dual index support on DNS and VPN. JB#60943 #48

Merged
merged 4 commits into from Jul 4, 2023

Conversation

LaakkonenJussi
Copy link
Contributor

@LaakkonenJussi LaakkonenJussi commented Jun 29, 2023

Make the DNS enabling tolerant of the dual index support. Logging is now more consistent as VPN index is directly used instead of having VPN behave as tech-dependant service.

Fix the gateway setting issues which resulted in VPN not getting updated as default. Dual index support needed to be taken account in replacing and finding of the gateways.

Add also inet.c change to use RTF_HOST flag similarly to adding when removing route.

Make service.c to do default_changed() also for VPNs that reach their ultimate state (READY).

@LaakkonenJussi LaakkonenJussi changed the title WIP: [dnsproxy] Cleanup and fix setting of VPN DNS. JB#60943 [connman] Fix errors in new dual index support (VPN, DNS. JB#60943 Jul 3, 2023
@LaakkonenJussi LaakkonenJussi changed the title [connman] Fix errors in new dual index support (VPN, DNS. JB#60943 [connman] Fix errors in dual index support on DNS and VPN. JB#60943 Jul 3, 2023
connman/src/connection.c Outdated Show resolved Hide resolved
connman/src/connection.c Outdated Show resolved Hide resolved
Fix the errors caused by adding dual index support:
 - copy also the index of the other IP-family gw when replacing
 - enable searching the specific IP-family gateway
 - kernel netlink listens only IPv4 -> get IPv4 supporting gateway

Added also more debug to certain places to ease up following what is
going on.

The errors caused VPN cleanups not to work and in some cases, especially
with IPv6-disabling option set, VPN did not get set as default route
and/or the old default route was not sent. This resulted in
non-functioning networking, including disabled DNS when VPN was
connected for the 2nd and ongoing times.
Tech-dependant services call default_changed() when reaching ONLINE
state. Do the same with VPNs that reach READY state as VPNs cannot go
ONLINE.
@LaakkonenJussi LaakkonenJussi merged commit 17b38d1 into sailfishos:master Jul 4, 2023
@LaakkonenJussi LaakkonenJussi deleted the jb60943 branch July 4, 2023 10:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants