summaryrefslogtreecommitdiffstats
path: root/main/ipsec-tools/20-natoa-fix.patch
blob: 91d7224e2a61a62bf396f5adc441135c5849fd3c (plain)
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
Fix nat-oa parsing when rekeying.

From: Timo Teras <timo.teras@iki.fi>


---

 src/racoon/handler.c |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)


diff --git a/src/racoon/handler.c b/src/racoon/handler.c
index 6f91beb..960b5b3 100644
--- a/src/racoon/handler.c
+++ b/src/racoon/handler.c
@@ -736,6 +736,17 @@ initph2(iph2)
 		oakley_delivm(iph2->ivm);
 		iph2->ivm = NULL;
 	}
+
+#ifdef ENABLE_NATT
+	if (iph2->natoa_src) {
+		racoon_free(iph2->natoa_src);
+		iph2->natoa_src = NULL;
+	}
+	if (iph2->natoa_dst) {
+		racoon_free(iph2->natoa_dst);
+		iph2->natoa_dst = NULL;
+	}
+#endif
 }
 
 /*