Skip to contentSkip to conversation

tunnel: Fix missing space after local/remote print

PATCH In review Gal Pressman 2 participants 3 messages Feb 8, 2022 – Feb 9, 2022

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tunnel: Fix missing space after local/remote print

The cited commit removed the space after the local/remote tunnel print and resulted in "broken" output:

gre remote 1.1.1.2local 1.1.1.1ttl inherit erspan_ver 0 addrgenmode eui64 numtxqueues 1 numrxqueues 1 gso_max_size 65536 gso_max_segs 65535

    ^^^^^^^^^^^^^^^^^^^^^^^^^^^
Fixes 5632cf69ad59 ("tunnel: fix clang warning")
---
 ip/tunnel.c | 2 ++
 1 file changed, 2 insertions(+)
ip/tunnel.c +2 -0
index f2632f43babf..7200ce831317 100644
@@ -299,6 +299,8 @@ void tnl_print_endpoint(const char *name, const struct rtattr *rta, int family)
 	}
 
 	print_string_name_value(name, value);
+	if (!is_json_context())
+		print_string(PRINT_FP, NULL, " ", NULL);
 }
 
 void tnl_print_gre_flags(__u8 proto,
Signature · 1 line
2.25.1
#1 lore raw
Quoted 17 lines · On Tue, 8 Feb 2022 16:40:05 +0200 Gal Pressman <[email protected]> wrote:

The cited commit removed the space after the local/remote tunnel print and resulted in "broken" output:

gre remote 1.1.1.2local 1.1.1.1ttl inherit erspan_ver 0 addrgenmode eui64 numtxqueues 1 numrxqueues 1 gso_max_size 65536 gso_max_segs 65535

    ^^^^^^^^^^^^^^^^^^^^^^^^^^^
Fixes 5632cf69ad59 ("tunnel: fix clang warning")
---
 ip/tunnel.c | 2 ++
 1 file changed, 2 insertions(+)
ip/tunnel.c +0 -0
index f2632f43babf..7200ce831317 100644

ip/tunnel.c void tnl_print_endpoint(const char *name, const struct rtattr *rta, int family) · line 303

Quoted 5 lines
ip/tunnel.c +2 -0
@@ -299,6 +299,8 @@ void tnl_print_endpoint(const char *name, const struct rtattr *rta, int family)
 	}
 
 	print_string_name_value(name, value);
+	if (!is_json_context())
+		print_string(PRINT_FP, NULL, " ", NULL);

is_json_context is not needed here.

#2 lore raw
Quoted 22 lines · Stephen Hemminger
Quoted 19 lines · On Tue, 8 Feb 2022 16:40:05 +0200 Gal Pressman <[email protected]> wrote:

The cited commit removed the space after the local/remote tunnel print and resulted in "broken" output:

gre remote 1.1.1.2local 1.1.1.1ttl inherit erspan_ver 0 addrgenmode eui64 numtxqueues 1 numrxqueues 1 gso_max_size 65536 gso_max_segs 65535

    ^^^^^^^^^^^^^^^^^^^^^^^^^^^
Fixes 5632cf69ad59 ("tunnel: fix clang warning")
---
 ip/tunnel.c | 2 ++
 1 file changed, 2 insertions(+)
ip/tunnel.c +0 -0
index f2632f43babf..7200ce831317 100644
@@ -299,6 +299,8 @@ void tnl_print_endpoint(const char *name, const struct rtattr *rta, int family)
 	}
 
Quoted 4 lines

ip/tunnel.c void tnl_print_endpoint(const char *name, const struct rtattr *rta, int family) · line 303

Quoted 3 lines
ip/tunnel.c +2 -0
 	print_string_name_value(name, value);
+	if (!is_json_context())
+		print_string(PRINT_FP, NULL, " ", NULL);

is_json_context is not needed here.

Thanks, will remove.