From eb620e0e7e146ec00d727a77baad0a03dd9b1a76 Mon Sep 17 00:00:00 2001 From: Beniamino Galvani Date: Sat, 2 Nov 2024 10:24:03 +0100 Subject: [PATCH] platform: fix to_string() functions for IPv6 tunnels We can hit an assertion at trace log level when printing IPv6 tunnel links, because the buffer for the local and remote addresses is not big enough. Increase the buffer size. Fixes: 32f6e1ef2e60 ('platform: add IP6TNL links support') https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/2063 --- src/libnm-platform/nm-platform.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libnm-platform/nm-platform.c b/src/libnm-platform/nm-platform.c index 5cc97717f..9b55fedc5 100644 --- a/src/libnm-platform/nm-platform.c +++ b/src/libnm-platform/nm-platform.c @@ -6568,9 +6568,9 @@ nm_platform_lnk_infiniband_to_string(const NMPlatformLnkInfiniband *lnk, char *b const char * nm_platform_lnk_ip6tnl_to_string(const NMPlatformLnkIp6Tnl *lnk, char *buf, gsize len) { - char str_local[30]; + char str_local[30 + NM_INET_ADDRSTRLEN]; char str_local1[NM_INET_ADDRSTRLEN]; - char str_remote[30]; + char str_remote[30 + NM_INET_ADDRSTRLEN]; char str_remote1[NM_INET_ADDRSTRLEN]; char str_ttl[30]; char str_tclass[30];