r1310 - in trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian: . patches

Christoph Hellwig hch-guest@haydn.debian.org
Wed, 25 Aug 2004 04:53:03 -0600


Author: hch-guest
Date: 2004-08-25 04:52:56 -0600 (Wed, 25 Aug 2004)
New Revision: 1310

Added:
   trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/modular-xfrm_tunnel.dpatch
Modified:
   trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/changelog
   trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/00list-3
Log:

  * Modularize xfrm_tunnel (Christoph Hellwig).


Modified: trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/changelog
===================================================================
--- trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/changelog	2004-08-25 10:49:06 UTC (rev 1309)
+++ trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/changelog	2004-08-25 10:52:56 UTC (rev 1310)
@@ -39,8 +39,10 @@
   * Fix nfsd to not errornously return ESTALE on failed permission check
     (closes: #255931) (Christoph Hellwig).
 
-  * Fix SHM segment count limit off by one (Christoph Hellwig)
+  * Fix SHM segment count limit off by one (Christoph Hellwig).
 
+  * Modularize xfrm_tunnel (Christoph Hellwig).
+
  -- Andres Salomon <dilinger@voxel.net>  Wed, 18 Aug 2004 02:13:56 -0400
 
 kernel-source-2.6.8 (2.6.8-2) unstable; urgency=high

Modified: trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/00list-3
===================================================================
--- trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/00list-3	2004-08-25 10:49:06 UTC (rev 1309)
+++ trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/00list-3	2004-08-25 10:52:56 UTC (rev 1310)
@@ -42,4 +42,4 @@
 minix-block-accounting-fix
 nfsd-subtreecheck-nostale
 shm-segment-count-fix
-shm-segment-count-fix
+modular-xfrm_tunnel

Added: trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/modular-xfrm_tunnel.dpatch
===================================================================
--- trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/modular-xfrm_tunnel.dpatch	2004-08-25 10:49:06 UTC (rev 1309)
+++ trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/modular-xfrm_tunnel.dpatch	2004-08-25 10:52:56 UTC (rev 1310)
@@ -0,0 +1,371 @@
+#! /bin/sh -e 
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR@EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: Modularise xfrm_tunnel.
+## DP: Patch author: Herbert Xu <herbert@gondor.apana.org.au>
+## DP: Upstream status: backport
+
+. $(dirname $0)/DPATCH
+
+@DPATCH@
+# This is a BitKeeper generated diff -Nru style patch.
+#
+# ChangeSet
+#   2004/08/19 07:13:27-07:00 herbert@gondor.apana.org.au 
+#   [IPSEC]: Modularise xfrm_tunnel.
+#   
+#   This patch allows the the user to build xfrm4_tunnel/xfrm6_tunnel as
+#   modules.
+#   
+#   This makes sense because they're only used by IPComp/IPIP/IP6Tunnel
+#   which are modules themselves.  It also means that distros can cut
+#   down on there core kernel size when compiling with IPsec support.
+#   
+#   Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
+#   Signed-off-by: David S. Miller <davem@redhat.com>
+# 
+# net/xfrm/xfrm_export.c
+#   2004/08/19 07:13:10-07:00 herbert@gondor.apana.org.au +0 -2
+#   [IPSEC]: Modularise xfrm_tunnel.
+#   
+#   This patch allows the the user to build xfrm4_tunnel/xfrm6_tunnel as
+#   modules.
+#   
+#   This makes sense because they're only used by IPComp/IPIP/IP6Tunnel
+#   which are modules themselves.  It also means that distros can cut
+#   down on there core kernel size when compiling with IPsec support.
+#   
+#   Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
+#   Signed-off-by: David S. Miller <davem@redhat.com>
+# 
+# net/ipv6/xfrm6_tunnel.c
+#   2004/08/19 07:13:10-07:00 herbert@gondor.apana.org.au +10 -5
+#   [IPSEC]: Modularise xfrm_tunnel.
+#   
+#   This patch allows the the user to build xfrm4_tunnel/xfrm6_tunnel as
+#   modules.
+#   
+#   This makes sense because they're only used by IPComp/IPIP/IP6Tunnel
+#   which are modules themselves.  It also means that distros can cut
+#   down on there core kernel size when compiling with IPsec support.
+#   
+#   Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
+#   Signed-off-by: David S. Miller <davem@redhat.com>
+# 
+# net/ipv6/xfrm6_policy.c
+#   2004/08/19 07:13:10-07:00 herbert@gondor.apana.org.au +0 -2
+#   [IPSEC]: Modularise xfrm_tunnel.
+#   
+#   This patch allows the the user to build xfrm4_tunnel/xfrm6_tunnel as
+#   modules.
+#   
+#   This makes sense because they're only used by IPComp/IPIP/IP6Tunnel
+#   which are modules themselves.  It also means that distros can cut
+#   down on there core kernel size when compiling with IPsec support.
+#   
+#   Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
+#   Signed-off-by: David S. Miller <davem@redhat.com>
+# 
+# net/ipv6/Makefile
+#   2004/08/19 07:13:10-07:00 herbert@gondor.apana.org.au +2 -1
+#   [IPSEC]: Modularise xfrm_tunnel.
+#   
+#   This patch allows the the user to build xfrm4_tunnel/xfrm6_tunnel as
+#   modules.
+#   
+#   This makes sense because they're only used by IPComp/IPIP/IP6Tunnel
+#   which are modules themselves.  It also means that distros can cut
+#   down on there core kernel size when compiling with IPsec support.
+#   
+#   Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
+#   Signed-off-by: David S. Miller <davem@redhat.com>
+# 
+# net/ipv6/Kconfig
+#   2004/08/19 07:13:10-07:00 herbert@gondor.apana.org.au +13 -1
+#   [IPSEC]: Modularise xfrm_tunnel.
+#   
+#   This patch allows the the user to build xfrm4_tunnel/xfrm6_tunnel as
+#   modules.
+#   
+#   This makes sense because they're only used by IPComp/IPIP/IP6Tunnel
+#   which are modules themselves.  It also means that distros can cut
+#   down on there core kernel size when compiling with IPsec support.
+#   
+#   Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
+#   Signed-off-by: David S. Miller <davem@redhat.com>
+# 
+# net/ipv4/xfrm4_tunnel.c
+#   2004/08/19 07:13:10-07:00 herbert@gondor.apana.org.au +5 -0
+#   [IPSEC]: Modularise xfrm_tunnel.
+#   
+#   This patch allows the the user to build xfrm4_tunnel/xfrm6_tunnel as
+#   modules.
+#   
+#   This makes sense because they're only used by IPComp/IPIP/IP6Tunnel
+#   which are modules themselves.  It also means that distros can cut
+#   down on there core kernel size when compiling with IPsec support.
+#   
+#   Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
+#   Signed-off-by: David S. Miller <davem@redhat.com>
+# 
+# net/ipv4/Makefile
+#   2004/08/19 07:13:10-07:00 herbert@gondor.apana.org.au +2 -1
+#   [IPSEC]: Modularise xfrm_tunnel.
+#   
+#   This patch allows the the user to build xfrm4_tunnel/xfrm6_tunnel as
+#   modules.
+#   
+#   This makes sense because they're only used by IPComp/IPIP/IP6Tunnel
+#   which are modules themselves.  It also means that distros can cut
+#   down on there core kernel size when compiling with IPsec support.
+#   
+#   Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
+#   Signed-off-by: David S. Miller <davem@redhat.com>
+# 
+# net/ipv4/Kconfig
+#   2004/08/19 07:13:10-07:00 herbert@gondor.apana.org.au +11 -1
+#   [IPSEC]: Modularise xfrm_tunnel.
+#   
+#   This patch allows the the user to build xfrm4_tunnel/xfrm6_tunnel as
+#   modules.
+#   
+#   This makes sense because they're only used by IPComp/IPIP/IP6Tunnel
+#   which are modules themselves.  It also means that distros can cut
+#   down on there core kernel size when compiling with IPsec support.
+#   
+#   Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
+#   Signed-off-by: David S. Miller <davem@redhat.com>
+# 
+# include/net/xfrm.h
+#   2004/08/19 07:13:10-07:00 herbert@gondor.apana.org.au +0 -2
+#   [IPSEC]: Modularise xfrm_tunnel.
+#   
+#   This patch allows the the user to build xfrm4_tunnel/xfrm6_tunnel as
+#   modules.
+#   
+#   This makes sense because they're only used by IPComp/IPIP/IP6Tunnel
+#   which are modules themselves.  It also means that distros can cut
+#   down on there core kernel size when compiling with IPsec support.
+#   
+#   Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
+#   Signed-off-by: David S. Miller <davem@redhat.com>
+# 
+diff -Nru a/include/net/xfrm.h b/include/net/xfrm.h
+--- a/include/net/xfrm.h	2004-08-25 12:31:08 +02:00
++++ b/include/net/xfrm.h	2004-08-25 12:31:08 +02:00
+@@ -792,8 +792,6 @@
+ extern void xfrm4_state_fini(void);
+ extern void xfrm6_state_init(void);
+ extern void xfrm6_state_fini(void);
+-extern void xfrm6_tunnel_init(void);
+-extern void xfrm6_tunnel_fini(void);
+ 
+ extern int xfrm_state_walk(u8 proto, int (*func)(struct xfrm_state *, int, void*), void *);
+ extern struct xfrm_state *xfrm_state_alloc(void);
+diff -Nru a/net/ipv4/Kconfig b/net/ipv4/Kconfig
+--- a/net/ipv4/Kconfig	2004-08-25 12:31:08 +02:00
++++ b/net/ipv4/Kconfig	2004-08-25 12:31:08 +02:00
+@@ -187,7 +187,7 @@
+ config NET_IPIP
+ 	tristate "IP: tunneling"
+ 	depends on INET
+-	select XFRM
++	select INET_TUNNEL
+ 	---help---
+ 	  Tunneling means encapsulating data of one protocol type within
+ 	  another protocol and sending it over a channel that understands the
+@@ -351,11 +351,21 @@
+ config INET_IPCOMP
+ 	tristate "IP: IPComp transformation"
+ 	select XFRM
++	select INET_TUNNEL
+ 	select CRYPTO
+ 	select CRYPTO_DEFLATE
+ 	---help---
+ 	  Support for IP Paylod Compression (RFC3173), typically needed
+ 	  for IPsec.
++	  
++	  If unsure, say Y.
++
++config INET_TUNNEL
++	tristate "IP: tunnel transformation"
++	select XFRM
++	---help---
++	  Support for generic IP tunnel transformation, which is required by
++	  the IP tunneling module as well as tunnel mode IPComp.
+ 	  
+ 	  If unsure, say Y.
+ 
+diff -Nru a/net/ipv4/Makefile b/net/ipv4/Makefile
+--- a/net/ipv4/Makefile	2004-08-25 12:31:08 +02:00
++++ b/net/ipv4/Makefile	2004-08-25 12:31:08 +02:00
+@@ -19,9 +19,10 @@
+ obj-$(CONFIG_INET_AH) += ah4.o
+ obj-$(CONFIG_INET_ESP) += esp4.o
+ obj-$(CONFIG_INET_IPCOMP) += ipcomp.o
++obj-$(CONFIG_INET_TUNNEL) += xfrm4_tunnel.o 
+ obj-$(CONFIG_IP_PNP) += ipconfig.o
+ obj-$(CONFIG_NETFILTER)	+= netfilter/
+ obj-$(CONFIG_IP_VS) += ipvs/
+ 
+ obj-$(CONFIG_XFRM) += xfrm4_policy.o xfrm4_state.o xfrm4_input.o \
+-		      xfrm4_tunnel.o xfrm4_output.o
++		      xfrm4_output.o
+diff -Nru a/net/ipv4/xfrm4_tunnel.c b/net/ipv4/xfrm4_tunnel.c
+--- a/net/ipv4/xfrm4_tunnel.c	2004-08-25 12:31:08 +02:00
++++ b/net/ipv4/xfrm4_tunnel.c	2004-08-25 12:31:08 +02:00
+@@ -4,6 +4,7 @@
+  */
+ 
+ #include <linux/skbuff.h>
++#include <linux/module.h>
+ #include <net/xfrm.h>
+ #include <net/ip.h>
+ #include <net/protocol.h>
+@@ -43,6 +44,8 @@
+ 	return ret;
+ }
+ 
++EXPORT_SYMBOL(xfrm4_tunnel_register);
++
+ int xfrm4_tunnel_deregister(struct xfrm_tunnel *handler)
+ {
+ 	int ret;
+@@ -59,6 +62,8 @@
+ 
+ 	return ret;
+ }
++
++EXPORT_SYMBOL(xfrm4_tunnel_deregister);
+ 
+ static int ipip_rcv(struct sk_buff *skb)
+ {
+diff -Nru a/net/ipv6/Kconfig b/net/ipv6/Kconfig
+--- a/net/ipv6/Kconfig	2004-08-25 12:31:08 +02:00
++++ b/net/ipv6/Kconfig	2004-08-25 12:31:08 +02:00
+@@ -48,6 +48,7 @@
+ 	tristate "IPv6: IPComp transformation"
+ 	depends on IPV6
+ 	select XFRM
++	select INET6_TUNNEL
+ 	select CRYPTO
+ 	select CRYPTO_DEFLATE
+ 	---help---
+@@ -56,9 +57,21 @@
+ 
+ 	  If unsure, say Y.
+ 
++config INET6_TUNNEL
++	tristate "IPv6: tunnel transformation"
++	depends on IPV6
++	select XFRM
++	---help---
++	  Support for generic IPv6-in-IPv6 tunnel transformation, which is
++	  required by the IPv6-in-IPv6 tunneling module as well as tunnel mode
++	  IPComp.
++	  
++	  If unsure, say Y.
++
+ config IPV6_TUNNEL
+ 	tristate "IPv6: IPv6-in-IPv6 tunnel"
+ 	depends on IPV6
++	select INET6_TUNNEL
+ 	---help---
+ 	  Support for IPv6-in-IPv6 tunnels described in RFC 2473.
+ 
+diff -Nru a/net/ipv6/Makefile b/net/ipv6/Makefile
+--- a/net/ipv6/Makefile	2004-08-25 12:31:08 +02:00
++++ b/net/ipv6/Makefile	2004-08-25 12:31:08 +02:00
+@@ -11,12 +11,13 @@
+ 		ip6_flowlabel.o ipv6_syms.o
+ 
+ ipv6-$(CONFIG_XFRM) += xfrm6_policy.o xfrm6_state.o xfrm6_input.o \
+-	xfrm6_tunnel.o xfrm6_output.o
++	xfrm6_output.o
+ ipv6-objs += $(ipv6-y)
+ 
+ obj-$(CONFIG_INET6_AH) += ah6.o
+ obj-$(CONFIG_INET6_ESP) += esp6.o
+ obj-$(CONFIG_INET6_IPCOMP) += ipcomp6.o
++obj-$(CONFIG_INET6_TUNNEL) += xfrm6_tunnel.o 
+ obj-$(CONFIG_NETFILTER)	+= netfilter/
+ 
+ obj-$(CONFIG_IPV6_TUNNEL) += ip6_tunnel.o
+diff -Nru a/net/ipv6/xfrm6_policy.c b/net/ipv6/xfrm6_policy.c
+--- a/net/ipv6/xfrm6_policy.c	2004-08-25 12:31:08 +02:00
++++ b/net/ipv6/xfrm6_policy.c	2004-08-25 12:31:08 +02:00
+@@ -287,12 +287,10 @@
+ {
+ 	xfrm6_policy_init();
+ 	xfrm6_state_init();
+-	xfrm6_tunnel_init();
+ }
+ 
+ void __exit xfrm6_fini(void)
+ {
+-	xfrm6_tunnel_fini();
+ 	//xfrm6_input_fini();
+ 	xfrm6_policy_fini();
+ 	xfrm6_state_fini();
+diff -Nru a/net/ipv6/xfrm6_tunnel.c b/net/ipv6/xfrm6_tunnel.c
+--- a/net/ipv6/xfrm6_tunnel.c	2004-08-25 12:31:08 +02:00
++++ b/net/ipv6/xfrm6_tunnel.c	2004-08-25 12:31:08 +02:00
+@@ -501,31 +501,32 @@
+ 	.flags          = INET6_PROTO_NOPOLICY|INET6_PROTO_FINAL,
+ };
+ 
+-void __init xfrm6_tunnel_init(void)
++static int __init xfrm6_tunnel_init(void)
+ {
+ 	X6TPRINTK3(KERN_DEBUG "%s()\n", __FUNCTION__);
+ 
+ 	if (xfrm_register_type(&xfrm6_tunnel_type, AF_INET6) < 0) {
+ 		X6TPRINTK1(KERN_ERR
+ 			   "xfrm6_tunnel init: can't add xfrm type\n");
+-		return;
++		return -EAGAIN;
+ 	}
+ 	if (inet6_add_protocol(&xfrm6_tunnel_protocol, IPPROTO_IPV6) < 0) {
+ 		X6TPRINTK1(KERN_ERR
+ 			   "xfrm6_tunnel init(): can't add protocol\n");
+ 		xfrm_unregister_type(&xfrm6_tunnel_type, AF_INET6);
+-		return;
++		return -EAGAIN;
+ 	}
+ 	if (xfrm6_tunnel_spi_init() < 0) {
+ 		X6TPRINTK1(KERN_ERR
+ 			   "xfrm6_tunnel init: failed to initialize spi\n");
+ 		inet6_del_protocol(&xfrm6_tunnel_protocol, IPPROTO_IPV6);
+ 		xfrm_unregister_type(&xfrm6_tunnel_type, AF_INET6);
+-		return;
++		return -EAGAIN;
+ 	}
++	return 0;
+ }
+ 
+-void __exit xfrm6_tunnel_fini(void)
++static void __exit xfrm6_tunnel_fini(void)
+ {
+ 	X6TPRINTK3(KERN_DEBUG "%s()\n", __FUNCTION__);
+ 
+@@ -537,3 +538,7 @@
+ 		X6TPRINTK1(KERN_ERR
+ 			   "xfrm6_tunnel close: can't remove xfrm type\n");
+ }
++
++module_init(xfrm6_tunnel_init);
++module_exit(xfrm6_tunnel_fini);
++MODULE_LICENSE("GPL");
+diff -Nru a/net/xfrm/xfrm_export.c b/net/xfrm/xfrm_export.c
+--- a/net/xfrm/xfrm_export.c	2004-08-25 12:31:08 +02:00
++++ b/net/xfrm/xfrm_export.c	2004-08-25 12:31:08 +02:00
+@@ -33,8 +33,6 @@
+ EXPORT_SYMBOL(xfrm_get_acqseq);
+ EXPORT_SYMBOL(xfrm_parse_spi);
+ EXPORT_SYMBOL(xfrm4_rcv);
+-EXPORT_SYMBOL(xfrm4_tunnel_register);
+-EXPORT_SYMBOL(xfrm4_tunnel_deregister);
+ EXPORT_SYMBOL(xfrm_register_type);
+ EXPORT_SYMBOL(xfrm_unregister_type);
+ EXPORT_SYMBOL(xfrm_get_type);