diff mbox series

[iproute2-next] tunnel: Fix missing space after local/remote print

Message ID 20220208144005.32401-1-gal@nvidia.com (mailing list archive)
State Superseded
Delegated to: David Ahern
Headers show
Series [iproute2-next] tunnel: Fix missing space after local/remote print | expand

Checks

Context Check Description
netdev/tree_selection success Not a local patch

Commit Message

Gal Pressman Feb. 8, 2022, 2:40 p.m. UTC
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")
Signed-off-by: Gal Pressman <gal@nvidia.com>
---
 ip/tunnel.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Stephen Hemminger Feb. 8, 2022, 5:57 p.m. UTC | #1
On Tue, 8 Feb 2022 16:40:05 +0200
Gal Pressman <gal@nvidia.com> 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")
> Signed-off-by: Gal Pressman <gal@nvidia.com>
> ---
>  ip/tunnel.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/ip/tunnel.c b/ip/tunnel.c
> index f2632f43babf..7200ce831317 100644
> --- a/ip/tunnel.c
> +++ b/ip/tunnel.c
> @@ -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.
Gal Pressman Feb. 9, 2022, 6:51 a.m. UTC | #2
On 08/02/2022 19:57, Stephen Hemminger wrote:
> On Tue, 8 Feb 2022 16:40:05 +0200
> Gal Pressman <gal@nvidia.com> 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")
>> Signed-off-by: Gal Pressman <gal@nvidia.com>
>> ---
>>  ip/tunnel.c | 2 ++
>>  1 file changed, 2 insertions(+)
>>
>> diff --git a/ip/tunnel.c b/ip/tunnel.c
>> index f2632f43babf..7200ce831317 100644
>> --- a/ip/tunnel.c
>> +++ b/ip/tunnel.c
>> @@ -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.

Thanks, will remove.
diff mbox series

Patch

diff --git a/ip/tunnel.c b/ip/tunnel.c
index f2632f43babf..7200ce831317 100644
--- a/ip/tunnel.c
+++ b/ip/tunnel.c
@@ -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,