summaryrefslogtreecommitdiffstats
path: root/main/ipsec-tools/initial-contact-fix.diff
diff options
context:
space:
mode:
Diffstat (limited to 'main/ipsec-tools/initial-contact-fix.diff')
-rw-r--r--main/ipsec-tools/initial-contact-fix.diff69
1 files changed, 69 insertions, 0 deletions
diff --git a/main/ipsec-tools/initial-contact-fix.diff b/main/ipsec-tools/initial-contact-fix.diff
new file mode 100644
index 000000000..8eef37315
--- /dev/null
+++ b/main/ipsec-tools/initial-contact-fix.diff
@@ -0,0 +1,69 @@
+Index: src/racoon/admin.c
+===================================================================
+RCS file: /cvsroot/src/crypto/dist/ipsec-tools/src/racoon/admin.c,v
+retrieving revision 1.32
+diff -u -r1.32 admin.c
+--- src/racoon/admin.c 3 Sep 2009 09:29:07 -0000 1.32
++++ src/racoon/admin.c 9 Dec 2009 12:58:48 -0000
+@@ -299,9 +299,8 @@
+ break;
+
+ case ADMIN_DELETE_SA: {
+- struct ph1handle *iph1;
+- struct ph1selector sel;
+ char *loc, *rem;
++ struct ph1selector sel;
+
+ memset(&sel, 0, sizeof(sel));
+ sel.local = (struct sockaddr *)
+@@ -319,6 +318,7 @@
+ plog(LLV_INFO, LOCATION, NULL,
+ "admin delete-sa %s %s\n", loc, rem);
+ enumph1(&sel, admin_ph1_delete_sa, NULL);
++ remcontacted(sel.remote);
+
+ racoon_free(loc);
+ racoon_free(rem);
+Index: src/racoon/handler.c
+===================================================================
+RCS file: /cvsroot/src/crypto/dist/ipsec-tools/src/racoon/handler.c,v
+retrieving revision 1.31
+diff -u -r1.31 handler.c
+--- src/racoon/handler.c 22 Nov 2009 19:34:55 -0000 1.31
++++ src/racoon/handler.c 9 Dec 2009 12:58:48 -0000
+@@ -966,6 +966,20 @@
+ }
+
+ void
++remcontacted(remote)
++ struct sockaddr *remote;
++{
++ struct contacted *p;
++
++ LIST_FOREACH(p, &ctdtree, chain) {
++ if (cmpsaddr(remote, p->remote) == 0) {
++ LIST_REMOVE(p, chain);
++ break;
++ }
++ }
++}
++
++void
+ initctdtree()
+ {
+ LIST_INIT(&ctdtree);
+Index: src/racoon/handler.h
+===================================================================
+RCS file: /cvsroot/src/crypto/dist/ipsec-tools/src/racoon/handler.h,v
+retrieving revision 1.22
+diff -u -r1.22 handler.h
+--- src/racoon/handler.h 3 Sep 2009 09:29:07 -0000 1.22
++++ src/racoon/handler.h 9 Dec 2009 12:58:48 -0000
+@@ -518,6 +518,7 @@
+
+ extern struct contacted *getcontacted __P((struct sockaddr *));
+ extern int inscontacted __P((struct sockaddr *));
++extern void remcontacted __P((struct sockaddr *));
+ extern void initctdtree __P((void));
+
+ extern int check_recvdpkt __P((struct sockaddr *,