]> git.ipfire.org Git - thirdparty/iproute2.git/commitdiff
ip tunnel: fix 'ip -oneline tunnel show' for some GRE tunnels
authorDmitry Popov <ixaphire@qrator.net>
Sat, 4 Oct 2014 15:00:25 +0000 (19:00 +0400)
committerStephen Hemminger <shemming@brocade.com>
Thu, 9 Oct 2014 15:24:01 +0000 (08:24 -0700)
'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
ip/iptunnel.c

index 4b73ec602dee11dfe185614836a1d3ef94f39b02..b83534ef9e8d2fc2d70924c22c06b3a3e8f3fdd8 100644 (file)
@@ -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)
index 0844a4fc956106568dfcbf0fcaeabe5b0322638d..caf8a28e62e88e76988280ec600833fae3c6a7ba 100644 (file)
@@ -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)