[kernel] r19446 - dists/sid/linux/debian/patches/debian

Ben Hutchings benh at alioth.debian.org
Mon Oct 22 04:04:54 UTC 2012


Author: benh
Date: Mon Oct 22 04:04:51 2012
New Revision: 19446

Log:
Refresh xfrm ABI kluge to work the way it claims to

Modified:
   dists/sid/linux/debian/patches/debian/xfrm-avoid-ABI-change-in-3.2.31.patch

Modified: dists/sid/linux/debian/patches/debian/xfrm-avoid-ABI-change-in-3.2.31.patch
==============================================================================
--- dists/sid/linux/debian/patches/debian/xfrm-avoid-ABI-change-in-3.2.31.patch	Mon Oct 22 03:56:20 2012	(r19445)
+++ dists/sid/linux/debian/patches/debian/xfrm-avoid-ABI-change-in-3.2.31.patch	Mon Oct 22 04:04:51 2012	(r19446)
@@ -10,19 +10,80 @@
 
 --- a/include/net/xfrm.h
 +++ b/include/net/xfrm.h
-@@ -269,11 +269,13 @@ struct xfrm_replay {
+@@ -269,9 +269,6 @@ struct xfrm_replay {
  	int	(*check)(struct xfrm_state *x,
  			 struct sk_buff *skb,
  			 __be32 net_seq);
-+	void	(*notify)(struct xfrm_state *x, int event);
-+	int	(*overflow)(struct xfrm_state *x, struct sk_buff *skb);
-+#ifndef __GENKSYMS__
- 	int	(*recheck)(struct xfrm_state *x,
- 			   struct sk_buff *skb,
- 			   __be32 net_seq);
--	void	(*notify)(struct xfrm_state *x, int event);
--	int	(*overflow)(struct xfrm_state *x, struct sk_buff *skb);
-+#endif
+-	int	(*recheck)(struct xfrm_state *x,
+-			   struct sk_buff *skb,
+-			   __be32 net_seq);
+ 	void	(*notify)(struct xfrm_state *x, int event);
+ 	int	(*overflow)(struct xfrm_state *x, struct sk_buff *skb);
  };
+--- a/net/xfrm/xfrm_input.c
++++ b/net/xfrm/xfrm_input.c
+@@ -102,6 +102,19 @@ int xfrm_prepare_input(struct xfrm_state
+ }
+ EXPORT_SYMBOL(xfrm_prepare_input);
  
- struct net_device;
++extern struct xfrm_replay xfrm_replay_esn;
++extern int xfrm_replay_recheck_esn(struct xfrm_state *x,
++				   struct sk_buff *skb, __be32 net_seq);
++
++static int
++xfrm_recheck(struct xfrm_state *x, struct sk_buff *skb, __be32 net_seq)
++{
++	if (x->repl == &xfrm_replay_esn)
++		return xfrm_replay_recheck_esn(x, skb, net_seq);
++	else
++		return x->repl->check(x, skb, net_seq);
++}
++
+ int xfrm_input(struct sk_buff *skb, int nexthdr, __be32 spi, int encap_type)
+ {
+ 	struct net *net = dev_net(skb->dev);
+@@ -212,7 +225,7 @@ resume:
+ 		/* only the first xfrm gets the encap type */
+ 		encap_type = 0;
+ 
+-		if (async && x->repl->recheck(x, skb, seq)) {
++		if (async && xfrm_recheck(x, skb, seq)) {
+ 			XFRM_INC_STATS(net, LINUX_MIB_XFRMINSTATESEQERROR);
+ 			goto drop_unlock;
+ 		}
+--- a/net/xfrm/xfrm_replay.c
++++ b/net/xfrm/xfrm_replay.c
+@@ -420,7 +420,7 @@ err:
+ 	return -EINVAL;
+ }
+ 
+-static int xfrm_replay_recheck_esn(struct xfrm_state *x,
++int xfrm_replay_recheck_esn(struct xfrm_state *x,
+ 				   struct sk_buff *skb, __be32 net_seq)
+ {
+ 	if (unlikely(XFRM_SKB_CB(skb)->seq.input.hi !=
+@@ -491,7 +491,6 @@ static void xfrm_replay_advance_esn(stru
+ static struct xfrm_replay xfrm_replay_legacy = {
+ 	.advance	= xfrm_replay_advance,
+ 	.check		= xfrm_replay_check,
+-	.recheck	= xfrm_replay_check,
+ 	.notify		= xfrm_replay_notify,
+ 	.overflow	= xfrm_replay_overflow,
+ };
+@@ -499,15 +498,13 @@ static struct xfrm_replay xfrm_replay_le
+ static struct xfrm_replay xfrm_replay_bmp = {
+ 	.advance	= xfrm_replay_advance_bmp,
+ 	.check		= xfrm_replay_check_bmp,
+-	.recheck	= xfrm_replay_check_bmp,
+ 	.notify		= xfrm_replay_notify_bmp,
+ 	.overflow	= xfrm_replay_overflow_bmp,
+ };
+ 
+-static struct xfrm_replay xfrm_replay_esn = {
++struct xfrm_replay xfrm_replay_esn = {
+ 	.advance	= xfrm_replay_advance_esn,
+ 	.check		= xfrm_replay_check_esn,
+-	.recheck	= xfrm_replay_recheck_esn,
+ 	.notify		= xfrm_replay_notify_bmp,
+ 	.overflow	= xfrm_replay_overflow_esn,
+ };



More information about the Kernel-svn-changes mailing list