Re: [PATCH][2.6] fix compilation w/o CONFIG_XFRM

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Oops, the last patch was broken.  Please try this one.
-- 
Debian GNU/Linux 3.0 is out! ( http://www.debian.org/ )
Email:  Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
--
Index: kernel-source-2.5/net/ipv4/ip_gre.c
===================================================================
RCS file: /home/gondolin/herbert/src/CVS/debian/kernel-source-2.5/net/ipv4/ip_gre.c,v
retrieving revision 1.2
diff -u -r1.2 ip_gre.c
--- kernel-source-2.5/net/ipv4/ip_gre.c	14 Oct 2003 08:24:37 -0000	1.2
+++ kernel-source-2.5/net/ipv4/ip_gre.c	18 Oct 2003 08:38:34 -0000
@@ -601,8 +601,7 @@
 
 	read_lock(&ipgre_lock);
 	if ((tunnel = ipgre_tunnel_lookup(iph->saddr, iph->daddr, key)) != NULL) {
-		secpath_put(skb->sp);
-		skb->sp = NULL;
+		secpath_reset(skb);
 
 		skb->mac.raw = skb->nh.raw;
 		skb->nh.raw = __pskb_pull(skb, offset);
Index: kernel-source-2.5/net/ipv4/ipip.c
===================================================================
RCS file: /home/gondolin/herbert/src/CVS/debian/kernel-source-2.5/net/ipv4/ipip.c,v
retrieving revision 1.5
diff -u -r1.5 ipip.c
--- kernel-source-2.5/net/ipv4/ipip.c	14 Oct 2003 08:24:37 -0000	1.5
+++ kernel-source-2.5/net/ipv4/ipip.c	18 Oct 2003 08:38:26 -0000
@@ -483,8 +483,7 @@
 			return 0;
 		}
 
-		secpath_put(skb->sp);
-		skb->sp = NULL;
+		secpath_reset(skb);
 
 		skb->mac.raw = skb->nh.raw;
 		skb->nh.raw = skb->data;
Index: kernel-source-2.5/net/ipv6/ip6_tunnel.c
===================================================================
RCS file: /home/gondolin/herbert/src/CVS/debian/kernel-source-2.5/net/ipv6/ip6_tunnel.c,v
retrieving revision 1.2
diff -u -r1.2 ip6_tunnel.c
--- kernel-source-2.5/net/ipv6/ip6_tunnel.c	14 Oct 2003 08:24:37 -0000	1.2
+++ kernel-source-2.5/net/ipv6/ip6_tunnel.c	18 Oct 2003 08:38:43 -0000
@@ -515,8 +515,7 @@
 			read_unlock(&ip6ip6_lock);
 			goto discard;
 		}
-		secpath_put(skb->sp);
-		skb->sp = NULL;
+		secpath_reset(skb);
 		skb->mac.raw = skb->nh.raw;
 		skb->nh.raw = skb->data;
 		skb->protocol = htons(ETH_P_IPV6);
Index: kernel-source-2.5/net/ipv6/sit.c
===================================================================
RCS file: /home/gondolin/herbert/src/CVS/debian/kernel-source-2.5/net/ipv6/sit.c,v
retrieving revision 1.2
diff -u -r1.2 sit.c
--- kernel-source-2.5/net/ipv6/sit.c	14 Oct 2003 08:24:37 -0000	1.2
+++ kernel-source-2.5/net/ipv6/sit.c	18 Oct 2003 08:38:39 -0000
@@ -377,8 +377,7 @@
 
 	read_lock(&ipip6_lock);
 	if ((tunnel = ipip6_tunnel_lookup(iph->saddr, iph->daddr)) != NULL) {
-		secpath_put(skb->sp);
-		skb->sp = NULL;
+		secpath_reset(skb);
 		skb->mac.raw = skb->nh.raw;
 		skb->nh.raw = skb->data;
 		memset(&(IPCB(skb)->opt), 0, sizeof(struct ip_options));
Index: kernel-source-2.5/include/net/xfrm.h
===================================================================
RCS file: /home/gondolin/herbert/src/CVS/debian/kernel-source-2.5/include/net/xfrm.h,v
retrieving revision 1.16
diff -u -r1.16 xfrm.h
--- kernel-source-2.5/include/net/xfrm.h	30 Aug 2003 03:26:00 -0000	1.16
+++ kernel-source-2.5/include/net/xfrm.h	18 Oct 2003 08:37:37 -0000
@@ -562,6 +562,15 @@
 
 extern struct sec_path *secpath_dup(struct sec_path *src);
 
+static inline void
+secpath_reset(struct sk_buff *skb)
+{
+#ifdef CONFIG_XFRM
+	secpath_put(skb->sp);
+	skb->sp = NULL;
+#endif
+}
+
 static inline int
 __xfrm4_state_addr_cmp(struct xfrm_tmpl *tmpl, struct xfrm_state *x)
 {
-
: send the line "unsubscribe linux-net" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux