#582680 "ip tunnel" does not show gretap tunnels

Package:
iproute2
Source:
iproute2
Description:
networking and traffic control tools
Submitter:
Marco d'Itri
Date:
2017-12-30 20:12:20 UTC
Severity:
normal
#582680#5
Date:
2010-05-22 18:40:36 UTC
From:
To:
How to reproduce:

# ip link add mytunnel type gretap remote 192.168.30.153
# ip tunnel

The tunnel has been correctly created because I can see it in the "ip
link" output, but e.g. I have no way of knowing the endpoints.

#582680#10
Date:
2010-05-22 19:38:26 UTC
From:
To:
Actually "ip -d link" shows the missing data, but I still think that
ethernet GRE tunnels should be listed in the "ip tunnel" output.
BTW, the -d flag is not documented in the man page.

#582680#15
Date:
2011-07-20 18:01:36 UTC
From:
To:
Hello!

Spent a few minutes looking up what's going on in the situation
described in http://bugs.debian.org/582680

Around line 420 in ip/iptunnel.c there's code to look in /proc/net/dev
for interface names, look up their "index" from the name (via ll_name_to_index
helper function) and then type from index (via ll_index_to_type)
to finally do:

	if (type != ARPHRD_TUNNEL && type != ARPHRD_IPGRE && type != ARPHRD_SIT)
		continue;

Apparently (regular) GRE tunnels return type ARPHRD_ETHER,
which is the same as a (real) ethernet interface....

I don't know how to detect if an interface is backed by a real ethernet
interface or if it's ethernet over a gre tunnel. Apparently just using
ll_index_to_type is not enough for that....
Any hints on how to do that would be welcome! :)

#582680#20
Date:
2011-07-20 18:49:08 UTC
From:
To:
For GRE, the type has to be ethernet. It is not clear whether it
should appear in the 'ip tunnel' output since it is an L2 tunnel
and is trying to be transparent. The 'gre0' device does show up
as ARPHRD_IPGRE.

#582680#25
Date:
2011-07-21 08:50:26 UTC
From:
To:
tags 582680 + wontfix
thanks

On Wed, Jul 20, 2011 at 11:49:08AM -0700, Stephen Hemminger wrote:
[...]
[...]

Based on this I'm going to tag this bug wontfix for now.
This is not Debian specific and desired behaviour and any changes
should probably be discussed on the upstream mailing list first....