[packages] gettext: partly revert r24291, it totally broke the package build
[openwrt/svn-archive/archive.git] / net / openswan / patches / 200-linux-2.6.36.patch
1 ---
2 linux/net/ipsec/ipsec_xmit.c | 21 +++++++++++++++++++++
3 1 file changed, 21 insertions(+)
4
5 --- openswan-2.6.29.orig/linux/net/ipsec/ipsec_xmit.c
6 +++ openswan-2.6.29/linux/net/ipsec/ipsec_xmit.c
7 @@ -105,6 +105,15 @@ static __u32 zeroes[64];
8 int ipsec_xmit_trap_count = 0;
9 int ipsec_xmit_trap_sendcount = 0;
10
11 +#ifndef NIPQUAD
12 +#define NIPQUAD(addr) \
13 + ((unsigned char *)&addr)[0], \
14 + ((unsigned char *)&addr)[1], \
15 + ((unsigned char *)&addr)[2], \
16 + ((unsigned char *)&addr)[3]
17 +#define NIPQUAD_FMT "%u.%u.%u.%u"
18 +#endif
19 +
20 #define dmp(_x,_y,_z) if(debug_xmit && sysctl_ipsec_debug_verbose) ipsec_dmp_block(_x,_y,_z)
21
22 #if !defined(SKB_COPY_EXPAND) || defined(KLIPS_UNIT_TESTS)
23 @@ -2085,7 +2094,11 @@ ipsec_xmit_send(struct ipsec_xmit_state*
24 return IPSEC_XMIT_ROUTEERR;
25 }
26
27 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)
28 + if(ixs->dev == ixs->route->dst.dev) {
29 +#else
30 if(ixs->dev == ixs->route->u.dst.dev) {
31 +#endif
32 ip_rt_put(ixs->route);
33 /* This is recursion, drop it. */
34 if (ixs->stats)
35 @@ -2098,7 +2111,11 @@ ipsec_xmit_send(struct ipsec_xmit_state*
36 }
37
38 skb_dst_drop(ixs->skb);
39 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)
40 + skb_dst_set(ixs->skb, &ixs->route->dst);
41 +#else
42 skb_dst_set(ixs->skb, &ixs->route->u.dst);
43 +#endif
44 if(ixs->stats) {
45 ixs->stats->tx_bytes += ixs->skb->len;
46 }
47 @@ -2139,7 +2156,11 @@ ipsec_xmit_send(struct ipsec_xmit_state*
48
49 else
50 err = NF_HOOK(PF_INET, OSW_NF_INET_LOCAL_OUT, ixs->skb, NULL,
51 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)
52 + ixs->route->dst.dev,
53 +#else
54 ixs->route->u.dst.dev,
55 +#endif
56 ipsec_xmit_send2);
57
58 if(err != NET_XMIT_SUCCESS && err != NET_XMIT_CN) {