projects
/
systemd
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e0c0cd4
)
network: fix possible NULL-pointer dereference
author
Yu Watanabe
<watanabe.yu+github@gmail.com>
Mon, 1 Aug 2022 18:32:55 +0000
(
03:32
+0900)
committer
Yu Watanabe
<watanabe.yu+github@gmail.com>
Mon, 1 Aug 2022 18:32:55 +0000
(
03:32
+0900)
src/network/networkd-link.c
patch
|
blob
|
history
diff --git
a/src/network/networkd-link.c
b/src/network/networkd-link.c
index 269f69ec21cb531c4f9ff29d5ee3cde0fe43da04..c8df554cd62f8e9c47772a471cc88942c3817db2 100644
(file)
--- a/
src/network/networkd-link.c
+++ b/
src/network/networkd-link.c
@@
-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. */