1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
diff -ur openswan-2.6.16.orig/include/osw_select.h openswan-2.6.16/include/osw_select.h
--- openswan-2.6.16.orig/include/osw_select.h 2008-08-18 17:07:48.000000000 +0000
+++ openswan-2.6.16/include/osw_select.h 2008-09-20 20:01:54.000000000 +0000
@@ -44,6 +44,6 @@
#define OSW_FD_ISSET(d, s) ((OSW_FDS_BITS (s)[OSW_FDELT(d)] & OSW_FDMASK(d)) != 0)
#define osw_select(max, r, f, e, t) \
- select(max, (fd_set *)(r), (fd_set *)(f), (fd_set *)(e), t)
+ select(max, (fd_set *)(void *)(r), (fd_set *)(void *)(f), (fd_set *)(void *)(e), t)
#endif /* _OSW_SELECT_H_ */
diff -ur openswan-2.6.16.orig/programs/pluto/connections.c openswan-2.6.16/programs/pluto/connections.c
--- openswan-2.6.16.orig/programs/pluto/connections.c 2008-08-18 17:07:48.000000000 +0000
+++ openswan-2.6.16/programs/pluto/connections.c 2008-09-20 19:29:32.000000000 +0000
@@ -247,6 +247,15 @@
#ifdef DEBUG
lset_t old_cur_debugging = cur_debugging;
#endif
+ union {
+ struct alg_info** ppai;
+#ifdef KERNEL_ALG
+ struct alg_info_esp** ppai_esp;
+#endif
+#ifdef IKE_ALG
+ struct alg_info_ike** ppai_ike;
+#endif
+ } palg_info;
set_cur_connection(c);
@@ -323,10 +332,12 @@
gw_delref(&c->gw_info);
#ifdef KERNEL_ALG
- alg_info_delref((struct alg_info **)&c->alg_info_esp);
+ palg_info.ppai_esp = &c->alg_info_esp;
+ alg_info_delref(palg_info.ppai);
#endif
#ifdef IKE_ALG
- alg_info_delref((struct alg_info **)&c->alg_info_ike);
+ palg_info.ppai_ike = &c->alg_info_ike;
+ alg_info_delref(palg_info.ppai);
#endif
pfree(c);
}
|