diff options
author | Thomas Haller <thaller@redhat.com> | 2021-08-24 14:11:42 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2021-08-31 16:40:29 +0200 |
commit | 98e476fe4da079a6ba08a3672b22bc8f0a79d1b5 (patch) | |
tree | 5de9e3e8bb27cef5a9ffe99cb7e1dfeabf54deb3 /src | |
parent | cc38b36f8ce2011c758c53d6e8f3020dc8949313 (diff) | |
download | NetworkManager-98e476fe4da079a6ba08a3672b22bc8f0a79d1b5.tar.gz |
platform: avoid global buffer for nm_platform_link_inet6_addrgenmode2str()
Diffstat (limited to 'src')
-rw-r--r-- | src/libnm-platform/nm-linux-platform.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libnm-platform/nm-linux-platform.c b/src/libnm-platform/nm-linux-platform.c index c0c57618f9..03ad2bfffd 100644 --- a/src/libnm-platform/nm-linux-platform.c +++ b/src/libnm-platform/nm-linux-platform.c @@ -7511,10 +7511,11 @@ link_set_user_ipv6ll_enabled(NMPlatform *platform, int ifindex, gboolean enabled { nm_auto_nlmsg struct nl_msg *nlmsg = NULL; guint8 mode = enabled ? NM_IN6_ADDR_GEN_MODE_NONE : NM_IN6_ADDR_GEN_MODE_EUI64; + char sbuf[100]; _LOGD("link: change %d: user-ipv6ll: set IPv6 address generation mode to %s", ifindex, - nm_platform_link_inet6_addrgenmode2str(mode, NULL, 0)); + nm_platform_link_inet6_addrgenmode2str(mode, sbuf, sizeof(sbuf))); if (!nm_platform_kernel_support_get(NM_PLATFORM_KERNEL_SUPPORT_TYPE_USER_IPV6LL)) { _LOGD("link: change %d: user-ipv6ll: not supported", ifindex); |