net: EtherIP tunnel driver
Subsystems (4)
cover net: EtherIP tunnel driver
This patchset is the resubmit of the Ethernet over IPv4 tunnel driver for Linux. I want to thank all reviewers for their annotations and helpfull input. This version contains some major changes to the driver. It uses an own device type now (ARPHRD_ETHERIP). This fixes the problem that EtherIP devices could not be safely differenced from Ethernet devices. This change also required some other changes. First a second patch to the bridge code is included to allow the use of EtherIP devices in a bridge. The third patch includes the necessary changes to iproute2 (support of the new ARPHRD and general tunnel configuration support for
EtherIP).
Quoted 10 lines · Joerg Roedel
This patchset is the resubmit of the Ethernet over IPv4 tunnel driver for Linux. I want to thank all reviewers for their annotations and helpfull input. This version contains some major changes to the driver. It uses an own device type now (
ARPHRD_ETHERIP). This fixes the problem that EtherIP devices could not be safely differenced from Ethernet devices. This change also required some other changes. First a second patch to the bridge code is included to allow the use of EtherIP devices in a bridge. The third patch includes the necessary changes to iproute2 (support of the new ARPHRD and general tunnel configuration support for
EtherIP).
I haven't seen the first submission, but is this driver really needed? Can't this be done with creating two tap interfaces on both endpoints and bridge them with a local ethernet device using userland software?
MfG, JBG
Signature · 3 lines
Jan-Benedict Glaw [email protected] +49-172-7608481 Signature of: Alles wird gut! ...und heute wirds schon ein bißchen besser. the second :
Quoted 3 lines · Jan-Benedict Glaw
I haven't seen the first submission, but is this driver really needed? Can't this be done with creating two tap interfaces on both endpoints and bridge them with a local ethernet device using userland software?
In general it is possible to use a tap interface to tunnel Ethernet packets. But this driver uses the EtherIP protocol defined in RFC 3378 which itself defines an own IP protocol for it (number 97). This protocol is also supported by different other operating systems (some of the major BSD versions). This driver makes Linux interoperable with these implementations.
Regards,
Joerg Roedel
Quoted 12 lines · Jan-Benedict Glaw
Quoted 10 lines · Joerg Roedel
This patchset is the resubmit of the Ethernet over IPv4 tunnel driver for Linux. I want to thank all reviewers for their annotations and helpfull input. This version contains some major changes to the driver. It uses an own device type now (
ARPHRD_ETHERIP). This fixes the problem that EtherIP devices could not be safely differenced from Ethernet devices. This change also required some other changes. First a second patch to the bridge code is included to allow the use of EtherIP devices in a bridge. The third patch includes the necessary changes to iproute2 (support of the new ARPHRD and general tunnel configuration support for
EtherIP).
Quoted 3 lines
I haven't seen the first submission, but is this driver really needed? Can't this be done with creating two tap interfaces on both endpoints and bridge them with a local ethernet device using userland software?
You just need to use GRE tunnel instead of what you describe above.
While i feel bad that Joerg (and Lennert and others before) have put the effort to do the work, i too question the need for this driver. I dont think even the authors of the original RFC feel this provides anything that GRE cant (according to some posting on netdev that one of the authors made). My understanding is also that the only other OS that implemented this got it wrong - hence you will have to interop with them and provide quirks checks.
I am actually curious if anyone uses it instead of GRE in openbsd? You could argue that including this driver would allow Linux to have another bulb in the christmas tree; the other (more pragmatic way) to look at this is it allows spreading a bad idea and needs to be censored. I prefer the later - and hope this doesnt discourage Joerg from contributing in the future.
cheers,
jamal
On Sat, Sep 23, 2006 at 08:38:37AM -0400, jamal wrote:
Hello Jamal,
Quoted 1 line
You just need to use GRE tunnel instead of what you describe above.
The main intention for this driver was not only to provide Ethernet over IPv4 tunneling. This is also possible in userspace using a tap interface (as Jan-Benedict Glaw mentioned). Another main intention for this driver was to provide tunneling of Ethernet packets using the EtherIP protocol.
Quoted 5 lines
While i feel bad that Joerg (and Lennert and others before) have put the effort to do the work, i too question the need for this driver. I dont think even the authors of the original RFC feel this provides anything that GRE cant (according to some posting on netdev that one of the authors made).
You are right. I completly agree with this. But this is also true for the IPIP and the SIT driver. You can do both with GRE. And there are reasons to keep both in the Kernel.
Quoted 3 lines
My understanding is also that the only other OS that implemented this got it wrong - hence you will have to interop with them and provide quirks checks.
At the moment I know at least that at least OpenBSD, NetBSD and FreeBSD support the EtherIP protocol. The first of them was OpenBSD, thats right. I don't think OpenBSD made a wrong implementation at this point (I assume you are speaking of the position of the 3 in the header). The RFC is not clear at this point. It defines that the first 4 bits in the 16 bit Ethernet header MUST be 0011. But it don't defines the byteorder of that 16 bit word nor if the least or most significant bit comes first. This was the reason (to keep interoperability with the existing implementations) I implemented it the same way as OpenBSD and my driver does not check the incoming EtherIP header.
Quoted 1 line
I am actually curious if anyone uses it instead of GRE in openbsd?
When I searched Google for EtherIP I found some entries in BSD forums discussing questions concering EtherIP usage. This, and the fact I know a BSD user that uses EtherIP too, makes be believe there are numerous users of EtherIP in the BSD world. And at least the BSD user I know wants interoperability of his NetBSD implemenation with Linux. This request was the starting point for this driver.
Quoted 3 lines
You could argue that including this driver would allow Linux to have another bulb in the christmas tree; the other (more pragmatic way) to look at this is it allows spreading a bad idea and needs to be censored.
I am not a friend of censorship. I think the users should have the freedom to decide what they want to use. There are reasons to have more than one way to tunnel Ethernet packets in the Kernel (the reason for EtherIP is the interoperability with the BSD implementations). I don't know if the GRE driver in mainline already support Ethernet tunneling. But if not, my driver is already the second way to do it (after the tap devices).
Quoted 2 lines
I prefer the later - and hope this doesnt discourage Joerg from contributing in the future.
Surely not. I intend to further contribute even if this driver would be finally rejected :)
Regards,
Joerg Roedel
Quoted 5 lines · Joerg Roedel
(I assume you are speaking of the position of the 3 in the header). The RFC is not clear at this point. It defines that the first 4 bits in the 16 bit Ethernet header MUST be 0011. But it don't defines the byteorder of that 16 bit word nor if the least or most significant bit comes first.
Unless stated otherwise, it's pretty safe to assume that all "on the wire" data mentioned in an RFC is in 'network byte order'. That's why hton*() and ntoh*() functions exist...
Is there something in the RFC that suggests that a byte order other than 'network order' is possible/acceptable there?
Quoted 11 lines · On Sun, Sep 24, 2006 at 09:07:43PM -0400, [email protected] wrote:
Quoted 5 lines · Joerg Roedel
(I assume you are speaking of the position of the 3 in the header). The RFC is not clear at this point. It defines that the first 4 bits in the 16 bit Ethernet header MUST be 0011. But it don't defines the byteorder of that 16 bit word nor if the least or most significant bit comes first.
Unless stated otherwise, it's pretty safe to assume that all "on the wire" data mentioned in an RFC is in 'network byte order'. That's why hton*() and ntoh*() functions exist...
Yes. Thats what the OpenBSD people did :-)
The problem with the header is the bitorder. The OpenBSD people assumed that the least significant bits come first in the 16-bit header.
Quoted 2 lines
Is there something in the RFC that suggests that a byte order other than 'network order' is possible/acceptable there?
No. The RFC states nothing at all about byte- or bitorder. That is why the RFC is ambigious at this point.
Quoted 5 lines · Joerg Roedel
Quoted 2 lines
Is there something in the RFC that suggests that a byte order other than 'network order' is possible/acceptable there?
No. The RFC states nothing at all about byte- or bitorder. That is why the RFC is ambigious at this point.
RFC 791 (IPv4) Appendix B does give instructions on byte ordering for all IPv4 headers and data, and RFC 791 is listed in the References for RFC 3378. I noticed this is only Informational, not a Standards track document, so I guess the non-interoperable implementations kind of go with the territory.
-Brian
David Miller
maintainerFrom: jamal <[email protected]>
Date: Sat, 23 Sep 2006 08:38:37 -0400
Quoted 10 lines
You just need to use GRE tunnel instead of what you describe above.
While i feel bad that Joerg (and Lennert and others before) have put the effort to do the work, i too question the need for this driver. I dont think even the authors of the original RFC feel this provides anything that GRE cant (according to some posting on netdev that one of the authors made). My understanding is also that the only other OS that implemented this got it wrong - hence you will have to interop with them and provide quirks checks.
Quoted 6 lines
I am actually curious if anyone uses it instead of GRE in openbsd? You could argue that including this driver would allow Linux to have another bulb in the christmas tree; the other (more pragmatic way) to look at this is it allows spreading a bad idea and needs to be censored. I prefer the later - and hope this doesnt discourage Joerg from contributing in the future.
First, the only mentioned real use of EtherIP I've seen anywhere is to tunnel old LAN based games that used protocols other than IP :-)
Second, the OpenBSD interoperability issues are very real, and there is even a Xerox implementation that used an 8-bit instead of a 16-bit header size.
Third, even the introductory material in RFC3378 mentions that people are strongly encouraged to use other technologies over EtherIP.
Fourth, and finally, if GRE can provide the same functionality then that plus the first three points makes EtherIP something we really should not latch onto.
And if it doesn't go in, it's not the end of the world. Anyone can maintain and use the external patch, and if usage gets widespread enough we'll of course be required to reevaluate integration.
So I think we should pass on this for now.
Quoted 2 lines · David Miller
First, the only mentioned real use of EtherIP I've seen anywhere is to tunnel old LAN based games that used protocols other than IP :-)
Thats an important use case for EtherIP, thats right :-)
But people often use Ethernet over IP tunneling to transparently switch between wired and wireless network connections on laptops (and secure the WLAN path with IPSEC).
Xen also implements the EtherIP protocol in their vnet module.
Quoted 3 lines
Second, the OpenBSD interoperability issues are very real, and there is even a Xerox implementation that used an 8-bit instead of a 16-bit header size.
Ok, I don't know if the Xerox implementation is still in use anywhere. I can't find anything in the web about it. But it is mentioned in the RFC, thats right. The interoperability issue with the BSDs is real. At least of NetBSD I know that its implementation does not check the incoming header because of that issue. My implementation also avoids this check.
Quoted 2 lines
Third, even the introductory material in RFC3378 mentions that people are strongly encouraged to use other technologies over EtherIP.
Yes, thats right.
Quoted 3 lines
Fourth, and finally, if GRE can provide the same functionality then that plus the first three points makes EtherIP something we really should not latch onto.
GRE additionally provides interoperability with some hardware devices. But it does not provide compatibility to the BSDs.
Quoted 3 lines
And if it doesn't go in, it's not the end of the world. Anyone can maintain and use the external patch, and if usage gets widespread enough we'll of course be required to reevaluate integration.
Ok. I will maintain the driver outside the kernel for the next time. Lets see if there are enough users for it :)
Cheers,
Joerg
Quoted 3 lines · David Miller
First, the only mentioned real use of EtherIP I've seen anywhere is to tunnel old LAN based games that used protocols other than IP :-)
How would you convince those old LAN games to use a MTU < 1500 which is needed for the tunnel? I bet they have the size hardcoded.
-Andi
Quoted 2 lines · Andi Kleen
How would you convince those old LAN games to use a MTU < 1500 which is needed for the tunnel? I bet they have the size hardcoded.
The tunnel provides an MTU of 1500. To guarantee this, it never sets the DF flag in outgoing packets.
Joerg
Quoted 7 lines · Joerg Roedel
Quoted 2 lines · Andi Kleen
How would you convince those old LAN games to use a MTU < 1500 which is needed for the tunnel? I bet they have the size hardcoded.
The tunnel provides an MTU of 1500. To guarantee this, it never sets the DF flag in outgoing packets.
This means it will multiply all full sized packets. That sounds horrible.
-Andi
Quoted 10 lines · Andi Kleen
Quoted 7 lines · Joerg Roedel
Quoted 2 lines · Andi Kleen
How would you convince those old LAN games to use a MTU < 1500 which is needed for the tunnel? I bet they have the size hardcoded.
The tunnel provides an MTU of 1500. To guarantee this, it never sets the DF flag in outgoing packets.
This means it will multiply all full sized packets. That sounds horrible.
Yes, all full sized packets gets fragmented at the IP layer according to the MTU of the physical device. As I know, this is the only way to guarantee the full Ethernet MTU on the tunnel device. This guarantee is required for layer 3 protocols that does not know the concept of a path MTU (as used by some old LAN based games ;-)
And for some cases this procedure is also defined in RFC 2473, section
7. for "Generic Packet Tunneling in IPv6".
Joerg
PATCH 1/3 net: EtherIP driver, header and MAINTAINERS changes
In reply to Joerg RoedelThis patch contains the reworked EtherIP driver, the necessary header updates and adds an entry for EtherIP to the MAINTAINERS file.
include/linux/if_arp.h +1 -0
@@ -85,6 +85,7 @@#define ARPHRD_IEEE80211 801/* IEEE 802.11 */ #define ARPHRD_IEEE80211_PRISM 802/* IEEE 802.11 + Prism2 header */ #define ARPHRD_IEEE80211_RADIOTAP 803/* IEEE 802.11 + radiotap header */ +#define ARPHRD_ETHERIP 804/* Ethernet over IPv4 tunnel */ #define ARPHRD_VOID 0xFFFF/* Void type, nothing is known */ #define ARPHRD_NONE 0xFFFE/* zero header length */
include/linux/in.h +1 -0
@@ -40,6 +40,7 @@ enum {IPPROTO_ESP =50 ,/* Encapsulation Security Payload protocol */ IPPROTO_AH =51 ,/* Authentication Header protocol */ +IPPROTO_ETHERIP =97 ,/* Ethernet over IPv4 protocol */ IPPROTO_PIM =103 ,/* Protocol Independent Multicast */ IPPROTO_COMP = 108, /* Compression Header protocol */
net/ipv4/etherip.c +542 -0
542 lines not on this page · raw message
net/ipv4/Kconfig +13 -0
@@ -272,6 +272,19 @@ config NET_IPGRE_BROADCAST Network), but can be distributed all over the Internet. If you want to do that, say Y here and to "IP multicast routing" below. +config NET_ETHERIP + tristate "IP: Ethernet over IP tunneling (experimental)" + help + Tunneling means encapsulating data of one protocol type within + another protocol and sending it over a channel that understands the + encapsulating protocol. This tunnel driver implements the + encapsulation of Ethernet frames into IP packets using the EtherIP + protocol defined in RFC 3378. This is especially usefull together with + the bridging code to build distributed OSI Layer 2 networks. + + You can build this driver as a module. The module will be called + etherip.ko. If unsure, say N. + config IP_MROUTE bool "IP: multicast routing" depends on IP_MULTICAST
net/ipv4/Makefile +1 -0
@@ -17,6 +17,7 @@ obj-$(CONFIG_PROC_FS) += proc.o obj-$(CONFIG_IP_MULTIPLE_TABLES) += fib_rules.o obj-$(CONFIG_IP_MROUTE) += ipmr.o obj-$(CONFIG_NET_IPIP) += ipip.o +obj-$(CONFIG_NET_ETHERIP) += etherip.o obj-$(CONFIG_NET_IPGRE) += ip_gre.o obj-$(CONFIG_SYN_COOKIES) += syncookies.o obj-$(CONFIG_INET_AH) += ah4.o
MAINTAINERS +5 -0
@@ -1016,6 +1016,11 @@ M: [email protected] L: [email protected] S: Maintained +ETHERIP TUNNEL DRIVER +P: Joerg Roedel +M: [email protected] +S: Maintained + ETHERNET BRIDGE P: Stephen Hemminger M: [email protected]
PATCH 2/3 net/bridge: add support for EtherIP devices
In reply to Joerg RoedelThis patch changes the device check in the bridge code to allow EtherIP devices to be added.
net/bridge/br_if.c +2 -1
@@ -407,7 +407,8 @@ int br_add_if(struct net_bridge *br, strstruct net_bridge_port *p;int err =0 ; -if (dev->flags &IFF_LOOPBACK || dev->type !=ARPHRD_ETHER ) +if (dev->flags &IFF_LOOPBACK || + dev->type !=ARPHRD_ETHER && dev->type !=ARPHRD_ETHERIP )return -EINVAL ;if (dev->hard_start_xmit == br_dev_xmit)
Re: [PATCH 02/03] net/bridge: add support for EtherIP devices
Quoted 4 lines · On Sat, 23 Sep 2006 14:16:29 +0200 Joerg Roedel <[email protected]> wrote:
This patch changes the device check in the bridge code to allow EtherIP devices to be added.
Signed-off-by Joerg Roedel <[email protected]>
If the device looks like a duck (Ethernet), then why does it need a separate ARP type. There are other tools that might work without modification if it just fully pretended to be an ether device.
Re: [PATCH 02/03] net/bridge: add support for EtherIP devices
Quoted 3 lines · Stephen Hemminger
If the device looks like a duck (Ethernet), then why does it need a separate ARP type. There are other tools that might work without modification if it just fully pretended to be an ether device.
This solves the problem of getting a list of all EtherIP devices. If they use ARPHRD_ETHER and use an ioctl in the SIOCDEVPRIVATE space is not a save way (not even if the ioctl uses ethip0, this device could be owned by another driver if EtherIP is not present).
On the other hand, a new ARP type opens a lot of new problems. A lot of userspace tools and libraries must be changed. So this solutions is not perfect.
Cheers,
Joerg
Re: [PATCH 02/03] net/bridge: add support for EtherIP devices
Quoted 14 lines · On Mon, 25 Sep 2006 10:24:45 +0200 Joerg Roedel <[email protected]> wrote:
Quoted 3 lines · Stephen Hemminger
If the device looks like a duck (Ethernet), then why does it need a separate ARP type. There are other tools that might work without modification if it just fully pretended to be an ether device.
This solves the problem of getting a list of all EtherIP devices. If they use
ARPHRD_ETHERand use an ioctl in the SIOCDEVPRIVATE space is not a save way (not even if the ioctl uses ethip0, this device could be owned by another driver if EtherIP is not present).
On the other hand, a new ARP type opens a lot of new problems. A lot of userspace tools and libraries must be changed. So this solutions is not perfect.
Quoted 2 lines
Cheers,
Joerg
To get a list of all EtherIP devices, just maintain a linked list in the private device information. Use list macros, it isn't hard.
Re: [PATCH 02/03] net/bridge: add support for EtherIP devices
Quoted 3 lines · Stephen Hemminger
To get a list of all EtherIP devices, just maintain a linked list in the private device information. Use list macros, it isn't hard.
I use lists in the driver to maintain the list. The problem is to get such a list in userspace in a safe way (the way over SIOCDEVPRIVATE ioctls is not safe).
Re: [PATCH 03/03][IPROUTE2] EtherIP tunnel and device support for iproute2
In reply to Joerg RoedelThis patch adds support for EtherIP tunnels and devices to the iproute2 userspace software package.
ip/iptunnel.c +43 -8
@@ -44,7 +44,7 @@ static void usage(void) __attribute__((nstatic void usage (void ) {fprintf (stderr,"Usage: ip tunnel { add | change | del | show } [ NAME ]\n" ); -fprintf (stderr," [ mode { ipip | gre | sit } ] [ remote ADDR ] [ local ADDR ]\n" ); +fprintf (stderr," [ mode { ipip | gre | sit | etherip } ] [ remote ADDR ] [ local ADDR ]\n" );fprintf (stderr," [ [i|o]seq ] [ [i|o]key KEY ] [ [i|o]csum ]\n" );fprintf (stderr," [ ttl TTL ] [ tos TOS ] [ [no]pmtudisc ] [ dev PHYS_DEV ]\n" );fprintf (stderr,"\n" );
@@ -202,6 +202,12 @@ static int parse_args(int argc, char **aexit (-1 ); } p->iph.protocol =IPPROTO_IPV6 ; + }else if (strcmp (*argv,"etherip" ) ==0 ) { +if (p->iph.protocol && p->iph.protocol !=IPPROTO_ETHERIP ) { +fprintf (stderr,"You managed to ask for more than one tunnel mode.\n" ); +exit (-1 ); + } + p->iph.protocol =IPPROTO_ETHERIP ; }else {fprintf (stderr,"Cannot guess tunnel mode.\n" );exit (-1 );
@@ -324,11 +330,15 @@ static int parse_args(int argc, char **a p->iph.protocol =IPPROTO_IPIP ; else if (memcmp(p->name, "sit", 3) == 0) p->iph.protocol = IPPROTO_IPV6; + else if (memcmp(p->name, "ethip", 5) == 0) + p->iph.protocol = IPPROTO_ETHERIP; } -if (p->iph.protocol ==IPPROTO_IPIP || p->iph.protocol ==IPPROTO_IPV6 ) { +if (p->iph.protocol ==IPPROTO_IPIP || + p->iph.protocol ==IPPROTO_IPV6 || + p->iph.protocol ==IPPROTO_ETHERIP ) {if ((p->i_flags &GRE_KEY ) || (p->o_flags &GRE_KEY )) { -fprintf (stderr,"Keys are not allowed with ipip and sit.\n" ); +fprintf (stderr,"Keys are not allowed with ipip, sit or etherip.\n" );return -1 ; } }
@@ -351,6 +361,21 @@ static int parse_args(int argc, char **afprintf (stderr,"Broadcast tunnel requires a source address.\n" );return -1 ; } + +if (p->iph.protocol ==IPPROTO_ETHERIP ) { +if ((cmd ==SIOCADDTUNNEL || cmd ==SIOCCHGTUNNEL ) && !p->iph.daddr) { +fprintf (stderr,"EtherIP tunnel requires a " +"destination address.\n" ); +return -1 ; + } + +/* +if (cmd != SIOCDELTUNNEL && p->iph.frag_off & htons(IP_DF)) { +fprintf(stderr, "Warning: [no]pmtudisc is ignored on" +" EtherIP tunnels\n"); +} +*/ + }return 0 ; }
@@ -374,6 +399,8 @@ static int do_add(int cmd, int argc, chareturn do_add_ioctl (cmd,"gre0" , &p);case IPPROTO_IPV6 :return do_add_ioctl (cmd,"sit0" , &p); +case IPPROTO_ETHERIP : +return do_add_ioctl (cmd,"ethip0" , &p);default :fprintf (stderr,"cannot determine tunnel mode (ipip, gre or sit)\n" );return -1 ;
@@ -395,6 +422,8 @@ int do_del(int argc, char **argv)return do_del_ioctl ("gre0" , &p);case IPPROTO_IPV6 :return do_del_ioctl ("sit0" , &p); +case IPPROTO_ETHERIP : +return do_del_ioctl ("ethip0" , &p);default :return do_del_ioctl (p.name, &p); }
@@ -418,7 +447,8 @@ void print_tunnel(struct ip_tunnel_parm p->name, p->iph.protocol ==IPPROTO_IPIP ?"ip" : (p->iph.protocol ==IPPROTO_GRE ?"gre" : - (p->iph.protocol ==IPPROTO_IPV6 ?"ipv6" :"unknown" )), + (p->iph.protocol ==IPPROTO_ETHERIP ?"etherip" : + (p->iph.protocol ==IPPROTO_IPV6 ?"ipv6" :"unknown" ))), p->iph.daddr ?format_host (AF_INET ,4 , &p->iph.daddr, s1,sizeof (s1)) :"any" , p->iph.saddr ? rt_addr_n2a(AF_INET, 4, &p->iph.saddr, s2, sizeof(s2)) : "any");
@@ -431,19 +461,19 @@ void print_tunnel(struct ip_tunnel_parmif (p->iph.ttl)printf (" ttl %d " , p->iph.ttl);else -printf (" ttl inherit " ); +printf (" ttl %s" , p->iph.protocol !=IPPROTO_ETHERIP ?"inherit " :"default" );if (p->iph.tos) {SPRINT_BUF (b1);printf (" tos" );if (p->iph.tos&1 ) -printf (" inherit" ); +printf (" %s" , p->iph.protocol !=IPPROTO_ETHERIP ?"inherit" :"default" );if (p->iph.tos&~1 )printf ("%c%s " , p->iph.tos&1 ?'/' :' ' ,rtnl_dsfield_n2a (p->iph.tos&~1 , b1,sizeof (b1))); } -if (!(p->iph.frag_off&htons (IP_DF ))) +if (p->iph.protocol !=IPPROTO_ETHERIP && !(p->iph.frag_off&htons (IP_DF )))printf (" nopmtudisc" );if ((p->i_flags&GRE_KEY ) && (p->o_flags&GRE_KEY ) && p->o_key == p->i_key)
@@ -506,8 +536,13 @@ static int do_tunnels_list(struct ip_tunfprintf (stderr,"Failed to get type of [%s]\n" , name);continue ; } -if (type !=ARPHRD_TUNNEL && type !=ARPHRD_IPGRE && type !=ARPHRD_SIT ) + +if (type !=ARPHRD_TUNNEL && + type !=ARPHRD_IPGRE && + type !=ARPHRD_SIT && + type !=ARPHRD_ETHERIP )continue ; +memset (&p1,0 ,sizeof (p1));if (do_get_ioctl (name, &p1))continue ;
lib/ll_types.c +3 -0
@@ -118,6 +118,9 @@ __PF(IEEE802_TR,tr)#ifdef ARPHRD_IEEE80211 __PF(IEEE80211,ieee802.11) #endif +#ifdef ARPHRD_ETHERIP +__PF(ETHERIP, etherip) +#endif #ifdef ARPHRD_VOID __PF(VOID,void)#endif