Hi, VPN does not handle restart case properly. When the VPN connection is disconnected because of network glitches, it needs to be restarted. Then we must make sure that if the IP address changes, the old address is removed properly and new IP address and routes are set for the VPN.
Thanks to Yevhen Kyriukha for reporting and testing this. Cheers, Jukka Jukka Rissanen (12): openvpn-script: Debug print change ipaddress: Refactor function that calculates netmask length vpn-ipconfig: Remove obsolete netmask calc function inet: Add more debug information when clearing IP address vpn-ipconfig: Add function that returns the used IP address ipaddress: Add function that returns IP address and netmask length ipaddress: Add support function that copies the whole IP address struct vpn: Provider was freed too early causing possible free memory access vpn-provider: Add function that is used to change the used IP address vpn-provider: Add support function that removes the used IP address vpn-provider: Set IP address properly when restarting VPN connection ipconfig: No need to remove the gateway when adding new one include/ipaddress.h | 4 ++ scripts/openvpn-script.c | 4 +- src/connman.h | 1 - src/dhcp.c | 4 +- src/inet.c | 3 +- src/ipaddress.c | 86 +++++++++++++++++++++++++++++------------- src/ipconfig.c | 2 - src/tethering.c | 7 ++-- vpn/plugins/vpn.c | 27 +++++++++++++- vpn/vpn-ipconfig.c | 24 +++--------- vpn/vpn-provider.c | 97 ++++++++++++++++++++++++++++++++++++++++++++---- vpn/vpn-provider.h | 2 + vpn/vpn.h | 2 +- 13 files changed, 198 insertions(+), 65 deletions(-) -- 1.8.3.1 _______________________________________________ connman mailing list connman@connman.net https://lists.connman.net/mailman/listinfo/connman