1
0
mirror of https://github.com/systemd/systemd.git synced 2025-01-11 09:18:07 +03:00

network: fix possible NULL-pointer dereference

This commit is contained in:
Yu Watanabe 2022-08-02 03:32:55 +09:00
parent e0c0cd49e5
commit 5fb5fae933

View File

@ -74,10 +74,13 @@ bool link_ipv6_enabled(Link *link) {
if (!socket_ipv6_is_supported())
return false;
if (link->network->bond)
if (link->iftype == ARPHRD_CAN)
return false;
if (link->iftype == ARPHRD_CAN)
if (!link->network)
return false;
if (link->network->bond)
return false;
/* DHCPv6 client will not be started if no IPv6 link-local address is configured. */