1 diff -ur iproute2-2.6.33.orig/include/linux/if_tunnel.h iproute2-2.6.33/include/linux/if_tunnel.h
2 --- iproute2-2.6.33.orig/include/linux/if_tunnel.h 2010-02-24 22:56:50.000000000 -0500
3 +++ iproute2-2.6.33/include/linux/if_tunnel.h 2010-04-16 11:18:49.412491322 -0400
8 + __be16 proto_type; /* Added for EGRE */
12 diff -ur iproute2-2.6.33.orig/ip/iptunnel.c iproute2-2.6.33/ip/iptunnel.c
13 --- iproute2-2.6.33.orig/ip/iptunnel.c 2010-02-24 22:56:50.000000000 -0500
14 +++ iproute2-2.6.33/ip/iptunnel.c 2010-04-16 11:20:58.152357650 -0400
16 #include "ip_common.h"
19 +#define ETH_P_ETH 0x6558 /* Ethernet in Ethernet */
22 static void usage(void) __attribute__((noreturn));
24 static void usage(void)
26 fprintf(stderr, "Usage: ip tunnel { add | change | del | show | prl | 6rd } [ NAME ]\n");
27 - fprintf(stderr, " [ mode { ipip | gre | sit | isatap } ] [ remote ADDR ] [ local ADDR ]\n");
28 + fprintf(stderr, " [ mode { ipip | gre [ type { ip | eth } ] | sit | isatap } ] [ remote ADDR ] [ local ADDR ]\n");
29 fprintf(stderr, " [ [i|o]seq ] [ [i|o]key KEY ] [ [i|o]csum ]\n");
30 fprintf(stderr, " [ prl-default ADDR ] [ prl-nodefault ADDR ] [ prl-delete ADDR ]\n");
31 fprintf(stderr, " [ 6rd-prefix ADDR ] [ 6rd-relay_prefix ADDR ] [ 6rd-reset ]\n");
35 p->iph.protocol = IPPROTO_GRE;
37 + if (strcmp(*argv,"type") == 0)
40 + printf("90 route %s\n", *argv);
41 + if (strcmp(*argv,"eth") == 0)
43 + p->proto_type = ETH_P_ETH;
47 + p->proto_type = ETH_P_IP;
50 } else if (strcmp(*argv, "sit") == 0 ||
51 strcmp(*argv, "ipv6/ip") == 0) {
52 if (p->iph.protocol && p->iph.protocol != IPPROTO_IPV6) {
54 /* Do not use format_host() for local addr,
55 * symbolic name will not be useful.
57 + if(p->proto_type == ETH_P_ETH)
58 + printf("%s: %s/eth remote %s local %s ",
60 + tnl_strproto(p->iph.protocol),
61 + p->iph.daddr ? format_host(AF_INET, 4, &p->iph.daddr, s1, sizeof(s1)) : "any",
62 + p->iph.saddr ? rt_addr_n2a(AF_INET, 4, &p->iph.saddr, s2, sizeof(s2)) : "any");
64 printf("%s: %s/ip remote %s local %s ",
66 tnl_strproto(p->iph.protocol),