autoip address set/reset loop
Subject: Re: autoip address set/reset loop
From c34b1e21adbf1376158c4140760c64bc867f9ced Mon Sep 17 00:00:00 2001
From: Geoffrey Van Landeghem <[email protected]>
Date: Tue, 22 Nov 2022 19:50:12 +0100
Subject: [PATCH] ipconfig: revert not adding invalid gateway routes
--- src/ipconfig.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)
src/ipconfig.c +7 -2
@@ -1183,15 +1183,20 @@ int __connman_ipconfig_gateway_add(struct connman_ipconfig *ipconfig)DBG ("" ); -if (!ipconfig->address || !ipconfig->address->gateway) +if (!ipconfig->address)return -EINVAL ; service =__connman_service_lookup_from_index (ipconfig->index);if (!service)return -EINVAL ; +/* +* Gateway is allowed to be NULL here, see +* __connman_connection_gateway_add() +*/ DBG ("type %d gw %s peer %s" , ipconfig->type, - ipconfig->address->gateway, ipconfig->address->peer); + ipconfig->address->gateway ? ipconfig->address->gateway :"NULL" , + ipconfig->address->peer ? ipconfig->address->peer :"NULL" );if (ipconfig->type ==CONNMAN_IPCONFIG_TYPE_IPV6 || ipconfig->type ==CONNMAN_IPCONFIG_TYPE_IPV4 )