mirror of
https://git.kernel.org/pub/scm/network/iproute2/iproute2.git
synced 2024-12-12 03:06:07 +08:00
ip6tunnel: Align ipv6 tunnel key display with ipv4
Show ipv6 tunnel keys on presence of GRE_KEY flag for tunnel types other than GRE. Aligns ipv6 behaviour with ipv4. Signed-off-by: dforster@brocade.com
This commit is contained in:
parent
97a02cabef
commit
40f9070d94
@ -111,16 +111,17 @@ static void print_tunnel(struct ip6_tnl_parm2 *p)
|
||||
if (p->flags & IP6_TNL_F_RCV_DSCP_COPY)
|
||||
printf(" dscp inherit");
|
||||
|
||||
if (p->proto == IPPROTO_GRE) {
|
||||
if ((p->i_flags & GRE_KEY) && (p->o_flags & GRE_KEY) && p->o_key == p->i_key)
|
||||
printf(" key %u", ntohl(p->i_key));
|
||||
else if ((p->i_flags | p->o_flags) & GRE_KEY) {
|
||||
if (p->i_flags & GRE_KEY)
|
||||
printf(" ikey %u", ntohl(p->i_key));
|
||||
if (p->o_flags & GRE_KEY)
|
||||
printf(" okey %u", ntohl(p->o_key));
|
||||
}
|
||||
if ((p->i_flags & GRE_KEY) && (p->o_flags & GRE_KEY) &&
|
||||
p->o_key == p->i_key)
|
||||
printf(" key %u", ntohl(p->i_key));
|
||||
else {
|
||||
if (p->i_flags & GRE_KEY)
|
||||
printf(" ikey %u", ntohl(p->i_key));
|
||||
if (p->o_flags & GRE_KEY)
|
||||
printf(" okey %u", ntohl(p->o_key));
|
||||
}
|
||||
|
||||
if (p->proto == IPPROTO_GRE) {
|
||||
if (p->i_flags & GRE_SEQ)
|
||||
printf("%s Drop packets out of sequence.", _SL_);
|
||||
if (p->i_flags & GRE_CSUM)
|
||||
|
Loading…
Reference in New Issue
Block a user