mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-05 15:50:36 +01:00
core: use IN6_IS_ADDR_UNSPECIFIED() macro to test against ::
That expresses the intention more explicitly and simplifies the code a bit. Also, the g_assert (gw_addr) is not necessary any more.
This commit is contained in:
parent
3d9d70822c
commit
f1bb254b4b
1 changed files with 1 additions and 2 deletions
|
|
@ -770,8 +770,7 @@ update_ip6_routing (NMPolicy *policy, gboolean force_update)
|
|||
}
|
||||
|
||||
/* If we don't find a paired gateway, try the generic IPv6 gateway */
|
||||
g_assert (gw_addr);
|
||||
if ( (memcmp (gw_addr->s6_addr, in6addr_any.s6_addr, sizeof (in6addr_any.s6_addr)) == 0)
|
||||
if ( IN6_IS_ADDR_UNSPECIFIED (gw_addr)
|
||||
&& nm_ip6_config_get_gateway (ip6_config))
|
||||
gw_addr = nm_ip6_config_get_gateway (ip6_config);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue