Re: [PATCH 05/05] ipv6: RFC4214 Support (3)

2007-11-14 Thread Vlad Yasevich
Stephen Hemminger wrote:
> David Miller wrote:
>> From: Stephen Hemminger <[EMAIL PROTECTED]>
>> Date: Tue, 13 Nov 2007 12:53:12 -0800
>>
>>  
>>> On Fri, 09 Nov 2007 16:35:59 -0800
>>> osprey67 <[EMAIL PROTECTED]> wrote:
>>>
>>>
 From: Fred L. Templin <[EMAIL PROTECTED]>

 This message attaches the combined diffs from
 messages 01/05 through 04/05. This file should be
 suitable for use with the patch utility.

 Signed-off-by: Fred L. Templin <[EMAIL PROTECTED]>

   
>>> Isn't increasing the size of struct ip_tunnel_parm
>>> going to cause kernel ABI changes?
>>> 
>>
>> Yeah it is, unfortunately.
>>   
> So we can't take it.  It might be possible to extend the structure if
> you put the
> new parameters at the end and handled the compatibility cases correctly.

It's fixed in the later patch set.

-vlad
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 05/05] ipv6: RFC4214 Support (3)

2007-11-13 Thread Stephen Hemminger

David Miller wrote:

From: Stephen Hemminger <[EMAIL PROTECTED]>
Date: Tue, 13 Nov 2007 12:53:12 -0800

  

On Fri, 09 Nov 2007 16:35:59 -0800
osprey67 <[EMAIL PROTECTED]> wrote:



From: Fred L. Templin <[EMAIL PROTECTED]>

This message attaches the combined diffs from
messages 01/05 through 04/05. This file should be
suitable for use with the patch utility.

Signed-off-by: Fred L. Templin <[EMAIL PROTECTED]>

  

Isn't increasing the size of struct ip_tunnel_parm
going to cause kernel ABI changes?



Yeah it is, unfortunately.
  
So we can't take it.  It might be possible to extend the structure if 
you put the

new parameters at the end and handled the compatibility cases correctly.
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 05/05] ipv6: RFC4214 Support (3)

2007-11-13 Thread David Miller
From: Stephen Hemminger <[EMAIL PROTECTED]>
Date: Tue, 13 Nov 2007 12:53:12 -0800

> On Fri, 09 Nov 2007 16:35:59 -0800
> osprey67 <[EMAIL PROTECTED]> wrote:
> 
> > From: Fred L. Templin <[EMAIL PROTECTED]>
> > 
> > This message attaches the combined diffs from
> > messages 01/05 through 04/05. This file should be
> > suitable for use with the patch utility.
> > 
> > Signed-off-by: Fred L. Templin <[EMAIL PROTECTED]>
> > 
> 
> Isn't increasing the size of struct ip_tunnel_parm
> going to cause kernel ABI changes?

Yeah it is, unfortunately.
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 05/05] ipv6: RFC4214 Support (3)

2007-11-13 Thread Stephen Hemminger
On Fri, 09 Nov 2007 16:35:59 -0800
osprey67 <[EMAIL PROTECTED]> wrote:

> From: Fred L. Templin <[EMAIL PROTECTED]>
> 
> This message attaches the combined diffs from
> messages 01/05 through 04/05. This file should be
> suitable for use with the patch utility.
> 
> Signed-off-by: Fred L. Templin <[EMAIL PROTECTED]>
> 

Isn't increasing the size of struct ip_tunnel_parm
going to cause kernel ABI changes?

-- 
Stephen Hemminger <[EMAIL PROTECTED]>
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 05/05] ipv6: RFC4214 Support (3)

2007-11-09 Thread YOSHIFUJI Hideaki / 吉藤英明
In article <[EMAIL PROTECTED]> (at Fri, 09 Nov 2007 16:35:59 -0800), osprey67 
<[EMAIL PROTECTED]> says:

> --- linux-2.6.24-rc2/include/linux/if_tunnel.h.orig   2007-11-09 
> 09:06:16.0 -0800
> +++ linux-2.6.24-rc2/include/linux/if_tunnel.h2007-11-09 
> 15:49:54.0 -0800
> @@ -25,6 +25,8 @@ struct ip_tunnel_parm
>   __be16  o_flags;
>   __be32  i_key;
>   __be32  o_key;
> + __be32  router;
> + __be32  lifetime;
>   struct iphdriph;
>  };
>  

No, you cannot simply change this.
If you change ioctl structure, you need to change
constants for SIOC{GET,ADD,CHG,DEL}TUNNEL.
Rename ole ones to OSIOxxx and assign new values.

If possible, new iproute2 should work with old kernels, and
old iproute2 should work with new kernels (without new features).

--yoshfuji
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 05/05] ipv6: RFC4214 Support (3)

2007-11-09 Thread osprey67

From: Fred L. Templin <[EMAIL PROTECTED]>

This message attaches the combined diffs from
messages 01/05 through 04/05. This file should be
suitable for use with the patch utility.

Signed-off-by: Fred L. Templin <[EMAIL PROTECTED]>

--- linux-2.6.24-rc2/include/linux/if.h.orig2007-11-08 12:05:47.0 
-0800
+++ linux-2.6.24-rc2/include/linux/if.h 2007-11-08 08:26:44.0 -0800
@@ -61,6 +61,7 @@
 #define IFF_MASTER_ALB 0x10/* bonding master, balance-alb. */
 #define IFF_BONDING0x20/* bonding master or slave  */
 #define IFF_SLAVE_NEEDARP 0x40 /* need ARPs for validation */
+#define IFF_ISATAP 0x80/* ISATAP interface (RFC4214)   */
 
 #define IF_GET_IFACE   0x0001  /* for querying only */
 #define IF_GET_PROTO   0x0002
--- linux-2.6.24-rc2/include/linux/if_tunnel.h.orig 2007-11-09 
09:06:16.0 -0800
+++ linux-2.6.24-rc2/include/linux/if_tunnel.h  2007-11-09 15:49:54.0 
-0800
@@ -25,6 +25,8 @@ struct ip_tunnel_parm
__be16  o_flags;
__be32  i_key;
__be32  o_key;
+   __be32  router;
+   __be32  lifetime;
struct iphdriph;
 };
 
--- linux-2.6.24-rc2/include/linux/in.h.orig2007-11-09 08:00:32.0 
-0800
+++ linux-2.6.24-rc2/include/linux/in.h 2007-11-09 08:56:09.0 -0800
@@ -252,7 +252,15 @@ struct sockaddr_in {
 #define BADCLASS(x)(((x) & htonl(0xf000)) == htonl(0xf000))
 #define ZERONET(x) (((x) & htonl(0xff00)) == htonl(0x))
 #define LOCAL_MCAST(x) (((x) & htonl(0xFF00)) == htonl(0xE000))
-
+ 
+/* Special-Use IPv4 Addresses (RFC3330) */
+#define PRIVATE_10(x)  (((x) & htonl(0xff00)) == htonl(0x0A00))
+#define LINK_169(x)(((x) & htonl(0x)) == htonl(0xA9FE))
+#define PRIVATE_172(x) (((x) & htonl(0xfff0)) == htonl(0xAC10))
+#define TEST_192(x)(((x) & htonl(0xff00)) == htonl(0xC200))
+#define ANYCAST_6TO4(x)(((x) & htonl(0xff00)) == htonl(0xC0586300))
+#define PRIVATE_192(x) (((x) & htonl(0x)) == htonl(0xC0A8))
+#define TEST_198(x)(((x) & htonl(0xfffe)) == htonl(0xC612))
 #endif
 
 #endif /* _LINUX_IN_H */
--- linux-2.6.24-rc2/include/net/addrconf.h.orig2007-11-08 
12:06:17.0 -0800
+++ linux-2.6.24-rc2/include/net/addrconf.h 2007-11-09 08:12:29.0 
-0800
@@ -241,6 +241,14 @@ static inline int ipv6_addr_is_ll_all_ro
addr->s6_addr32[3] == htonl(0x0002));
 }
 
+#if defined(CONFIG_IPV6_ISATAP)
+/* only for IFF_ISATAP interfaces */
+static inline int ipv6_addr_is_isatap(const struct in6_addr *addr)
+{
+   return ((addr->s6_addr32[2] | htonl(0x0200)) == htonl(0x02005EFE));
+}
+#endif
+
 #ifdef CONFIG_PROC_FS
 extern int if6_proc_init(void);
 extern void if6_proc_exit(void);
--- linux-2.6.24-rc2/net/ipv6/Kconfig.orig  2007-11-08 12:07:17.0 
-0800
+++ linux-2.6.24-rc2/net/ipv6/Kconfig   2007-11-08 08:27:48.0 -0800
@@ -57,6 +57,17 @@ config IPV6_ROUTE_INFO
 
  If unsure, say N.
 
+config IPV6_ISATAP
+   bool "IPv6: ISATAP (RFC 4214) support (EXPERIMENTAL)"
+   depends on IPV6 && EXPERIMENTAL
+   ---help---
+ This is experimental support for the Intra-Site Automatic
+ Tunnel Addressing Protocol (ISATAP) per RFC4214. It uses
+ the SIT module, and is configured using the "ip" utility
+ with device names beginning with: "isatap".
+
+ If unsure, say N.
+
 config IPV6_OPTIMISTIC_DAD
bool "IPv6: Enable RFC 4429 Optimistic DAD (EXPERIMENTAL)"
depends on IPV6 && EXPERIMENTAL
--- linux-2.6.24-rc2/net/ipv6/addrconf.c.orig   2007-11-08 11:59:35.0 
-0800
+++ linux-2.6.24-rc2/net/ipv6/addrconf.c2007-11-09 14:19:19.0 
-0800
@@ -75,7 +75,7 @@
 #include 
 #include 
 #include 
-#include 
+#include 
 #include 
 
 #ifdef CONFIG_IPV6_PRIVACY
@@ -1424,6 +1424,24 @@ static int addrconf_ifid_infiniband(u8 *
return 0;
 }
 
+#if defined(CONFIG_IPV6_ISATAP)
+static int addrconf_ifid_isatap(u8 *eui, __be32 addr)
+{
+
+   eui[0] = 0x02; eui[1] = 0; eui[2] = 0x5E; eui[3] = 0xFE;
+   memcpy (eui+4, &addr, 4);
+
+   /* Special-Use IPv4 Addresses (RFC3330)
+   if (ZERONET(addr) || PRIVATE_10(addr) || LOOPBACK(addr) ||
+   LINK_169(addr) || PRIVATE_172(addr) || TEST_192(addr) ||
+   ANYCAST_6TO4(addr) || PRIVATE_192(addr) || TEST_198(addr) ||
+   MULTICAST(addr) || BADCLASS(addr)) eui[0] &= ~0x02;
+*/ eui[0] = 0;
+
+   return 0;
+}
+#endif
+
 static int ipv6_generate_eui64(u8 *eui, struct net_device *dev)
 {
switch (dev->type) {
@@ -1435,6 +1453,11 @@ static int ipv6_generate_eui64(u8 *eui, 
return addrconf_ifid_arcnet(eui, dev);
case ARPHRD_INFINIBAND:
return addrconf_ifid_infiniband(eui, dev);
+#if defined(CONFIG_IPV6_ISATAP)