ipconfig: Don't add invalid gateway routes
PATCH 1/1 ipconfig: Don't add invalid gateway routes
When we assign an IPV4LL address we are calling __connman_ipconfig_gateway_add() with an invalid GW set. It's propably a safe bet to say NULL is never a valid GW, so let's filter it out for all callers.
--- src/ipconfig.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
src/ipconfig.c +1 -1
@@ -1172,7 +1172,7 @@ int __connman_ipconfig_gateway_add(struct connman_ipconfig *ipconfig)DBG ("" ); -if (!ipconfig->address) +if (!ipconfig->address || !ipconfig->address->gateway)return -EINVAL ; service =__connman_service_lookup_from_index (ipconfig->index);
Signature · 1 line
2.37.2
Daniel Wagner
AppliedQuoted 4 lines · Daniel Wagner
When we assign an IPV4LL address we are calling
__connman_ipconfig_gateway_add()with an invalid GW set. It's propably a safe bet to say NULL is never a valid GW, so let's filter it out for all callers.
applied