diff --git a/src/connection.c b/src/connection.c index 47ec67e6717a..3128110a27e2 100644 --- a/src/connection.c +++ b/src/connection.c @@ -1659,7 +1659,9 @@ static int add_gateway(struct connman_service *service, if (old) { DBG("Replacing gw %p ipv4 %p ipv6 %p", old, old->ipv4_config, old->ipv6_config); + del_gateway_routes_if_active(old, type); + if (type == CONNMAN_IPCONFIG_TYPE_IPV4) { temp_data->ipv6_config = old->ipv6_config; old->ipv6_config = NULL;
From: Grant Erickson <erick205@umn.edu> Increase visual visibility of 'del_gateway_routes_if_active' in 'add_gateway' by adding blank lines both before and after the function call. --- src/connection.c | 2 ++ 1 file changed, 2 insertions(+)