diff options
Diffstat (limited to '')
-rw-r--r-- | src/network/networkd-link.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c index 5f91d66dc0..f45d881cf8 100644 --- a/src/network/networkd-link.c +++ b/src/network/networkd-link.c @@ -78,11 +78,12 @@ int link_sysctl_ipv6_enabled(Link *link) { if (link->sysctl_ipv6_enabled >= 0) return link->sysctl_ipv6_enabled; - r = sysctl_read_ip_property(AF_INET6, link->ifname, "disable_ipv6", &value); + const char *ifname = link->ifname; /* work around bogus gcc warning */ + r = sysctl_read_ip_property(AF_INET6, ifname, "disable_ipv6", &value); if (r < 0) return log_link_warning_errno(link, r, "Failed to read net.ipv6.conf.%s.disable_ipv6 sysctl property: %m", - link->ifname); + ifname); link->sysctl_ipv6_enabled = value[0] == '0'; return link->sysctl_ipv6_enabled; |