On Wed, 20 Jul 2011 20:01:36 +0200
Andreas Henriksson <andr...@fatal.se> wrote:

> 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! :)
> 

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.



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to