1 Index: openswan-2.6.23/linux/net/ipsec/ipsec_xmit.c
2 ===================================================================
3 --- openswan-2.6.23.orig/linux/net/ipsec/ipsec_xmit.c 2009-09-09 02:42:54.000000000 +0200
4 +++ openswan-2.6.23/linux/net/ipsec/ipsec_xmit.c 2009-12-17 15:28:32.000000000 +0100
9 -#if defined(IP_SELECT_IDENT) && defined(IP_SELECT_IDENT_NEW)
10 +#if defined(IP_SELECT_IDENT) && defined(IP_SELECT_IDENT_NEW) && LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 30)
11 #define KLIPS_IP_SELECT_IDENT(iph, skb) ip_select_ident(iph, skb->dst, NULL)
14 @@ -2037,8 +2037,14 @@
15 return IPSEC_XMIT_RECURSDETECT;
18 +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 30)
19 dst_release(ixs->skb->dst);
20 ixs->skb->dst = &ixs->route->u.dst;
22 + dst_release(skb_dst(ixs->skb));
23 + skb_dst_set(ixs->skb, &ixs->route->u.dst);
27 ixs->stats->tx_bytes += ixs->skb->len;
29 Index: openswan-2.6.23/linux/net/ipsec/ipsec_rcv.c
30 ===================================================================
31 --- openswan-2.6.23.orig/linux/net/ipsec/ipsec_rcv.c 2009-12-17 15:28:32.000000000 +0100
32 +++ openswan-2.6.23/linux/net/ipsec/ipsec_rcv.c 2009-12-17 15:28:32.000000000 +0100
33 @@ -1710,10 +1710,18 @@
34 /* release the dst that was attached, since we have likely
35 * changed the actual destination of the packet.
37 +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 30)
39 dst_release(skb->dst);
45 + dst_release(skb_dst(skb));
46 + skb_dst_set(skb, NULL);
49 skb->pkt_type = PACKET_HOST;
50 if(irs->hard_header_len &&
51 (skb_mac_header(skb) != (skb_network_header(skb) - irs->hard_header_len)) &&
52 Index: openswan-2.6.23/linux/include/openswan/ipsec_param.h
53 ===================================================================
54 --- openswan-2.6.23.orig/linux/include/openswan/ipsec_param.h 2009-09-09 02:42:54.000000000 +0200
55 +++ openswan-2.6.23/linux/include/openswan/ipsec_param.h 2009-12-17 15:28:32.000000000 +0100
59 #if defined(IP_SELECT_IDENT) && defined(IP_SELECT_IDENT_NEW)
60 +/* 2.6.31 changed skb_buff */
61 +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 30)
62 #define KLIPS_IP_SELECT_IDENT(iph, skb) ip_select_ident(iph, skb->dst, NULL)
64 +#define KLIPS_IP_SELECT_IDENT(iph, skb) ip_select_ident(iph, skb_dst(skb), NULL)
68 #endif /* SUSE_LINUX_2_4_19_IS_STUPID */
69 Index: openswan-2.6.23/linux/net/ipsec/pfkey_v2.c
70 ===================================================================
71 --- openswan-2.6.23.orig/linux/net/ipsec/pfkey_v2.c 2009-09-09 02:42:54.000000000 +0200
72 +++ openswan-2.6.23/linux/net/ipsec/pfkey_v2.c 2009-12-17 15:28:32.000000000 +0100
74 printk(" h:0p%p", skb_transport_header(skb));
75 printk(" nh:0p%p", skb_network_header(skb));
76 printk(" mac:0p%p", skb_mac_header(skb));
77 +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 30)
78 printk(" dst:0p%p", skb->dst);
80 + printk(" dst:0p%p", skb_dst(skb));
82 if(sysctl_ipsec_debug_verbose) {
85 Index: openswan-2.6.23/linux/net/ipsec/ipsec_mast.c
86 ===================================================================
87 --- openswan-2.6.23.orig/linux/net/ipsec/ipsec_mast.c 2009-12-17 15:28:57.000000000 +0100
88 +++ openswan-2.6.23/linux/net/ipsec/ipsec_mast.c 2009-12-17 15:29:58.000000000 +0100
91 return IPSEC_XMIT_RECURSDETECT;
93 +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 30)
94 dst_release(ixs->skb->dst);
95 ixs->skb->dst = &ixs->route->u.dst;
97 + dst_release(skb_dst(ixs->skb));
98 + skb_dst_set(ixs->skb, &ixs->route->u.dst);
100 ixs->stats->tx_bytes += ixs->skb->len;
101 if(ixs->skb->len < ixs->skb->nh.raw - ixs->skb->data) {
102 ixs->stats->tx_errors++;