Netdev List
 help / color / mirror / Atom feed
From: Dmitry Popov <ixaphire@qrator.net>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: netdev@vger.kernel.org
Subject: [PATCH iproute2] ip tunnel: fix 'ip -oneline tunnel show' for some GRE tunnels
Date: Sat, 4 Oct 2014 19:00:25 +0400	[thread overview]
Message-ID: <20141004190025.d26b74dab093a455381d46fc@qrator.net> (raw)

'ip -oneline tunnel show' was not "oneline" for GRE tunnels with iseq:
# ip tun add gre_test remote 1.1.1.1 local 2.2.2.2 mode gre iseq oseq
# ip -oneline tun show gre_test | wc -l
2

The problem existed because of a typo: '\n' was printed when it shouldn't be.
Fixed.

Signed-off-by: Dmitry Popov <ixaphire@qrator.net>
---
 ip/ip6tunnel.c | 2 +-
 ip/iptunnel.c  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/ip/ip6tunnel.c b/ip/ip6tunnel.c
index 4b73ec6..b83534e 100644
--- a/ip/ip6tunnel.c
+++ b/ip/ip6tunnel.c
@@ -117,7 +117,7 @@ static void print_tunnel(struct ip6_tnl_parm2 *p)
 		}
 
 		if (p->i_flags&GRE_SEQ)
-			printf("%s  Drop packets out of sequence.\n", _SL_);
+			printf("%s  Drop packets out of sequence.", _SL_);
 		if (p->i_flags&GRE_CSUM)
 			printf("%s  Checksum in received packet is required.", _SL_);
 		if (p->o_flags&GRE_SEQ)
diff --git a/ip/iptunnel.c b/ip/iptunnel.c
index 0844a4f..caf8a28 100644
--- a/ip/iptunnel.c
+++ b/ip/iptunnel.c
@@ -409,7 +409,7 @@ static void print_tunnel(struct ip_tunnel_parm *p)
 	}
 
 	if (p->i_flags&GRE_SEQ)
-		printf("%s  Drop packets out of sequence.\n", _SL_);
+		printf("%s  Drop packets out of sequence.", _SL_);
 	if (p->i_flags&GRE_CSUM)
 		printf("%s  Checksum in received packet is required.", _SL_);
 	if (p->o_flags&GRE_SEQ)

                 reply	other threads:[~2014-10-04 15:00 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20141004190025.d26b74dab093a455381d46fc@qrator.net \
    --to=ixaphire@qrator.net \
    --cc=netdev@vger.kernel.org \
    --cc=stephen@networkplumber.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox