mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-27 04:40:09 +01:00
platform: fix nm_platform_lnk_gre_to_string() for tap links
Why didn't we get a compiler warning about this bug?
At least clang (3.8.0-2ubuntu4, Ubuntu 16.04) warns:
CC src/platform/src_libNetworkManagerBase_la-nm-platform.lo
../src/platform/nm-platform.c:5389:14: error: data argument not used by format string [-Werror,-Wformat-extra-args]
lnk->remote ? nm_sprintf_buf (str_remote, " remote %s", nm_utils_inet4_ntop (lnk->remote, str_remote1)) : "",
^
Fixes: 4c2862b958 ('platform: add gretap tunnels support')
(cherry picked from commit dfb899f465)
(cherry picked from commit ed88c71f15)
(cherry picked from commit 400293d350)
This commit is contained in:
parent
c780befe0c
commit
88c9767da7
1 changed files with 2 additions and 1 deletions
|
|
@ -5203,7 +5203,7 @@ nm_platform_lnk_gre_to_string (const NMPlatformLnkGre *lnk, char *buf, gsize len
|
|||
return buf;
|
||||
|
||||
g_snprintf (buf, len,
|
||||
lnk->is_tap ? "gretap" : "gre"
|
||||
"gre%s" /* is_tap */
|
||||
"%s" /* remote */
|
||||
"%s" /* local */
|
||||
"%s" /* parent_ifindex */
|
||||
|
|
@ -5215,6 +5215,7 @@ nm_platform_lnk_gre_to_string (const NMPlatformLnkGre *lnk, char *buf, gsize len
|
|||
"%s" /* ikey */
|
||||
"%s" /* okey */
|
||||
"",
|
||||
lnk->is_tap ? "tap" : "",
|
||||
lnk->remote ? nm_sprintf_buf (str_remote, " remote %s", nm_utils_inet4_ntop (lnk->remote, str_remote1)) : "",
|
||||
lnk->local ? nm_sprintf_buf (str_local, " local %s", nm_utils_inet4_ntop (lnk->local, str_local1)) : "",
|
||||
lnk->parent_ifindex ? nm_sprintf_buf (str_parent_ifindex, " dev %d", lnk->parent_ifindex) : "",
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue