packages/net/ipsec-tools/patches/001-ipsec-tools-def-psk.patch
florian 476ca0ea41 [package] ipsec-tools: update to 0.8.0, add init script
Signed-off-by: Artem Makhutov <artem@makhutov.org>

git-svn-id: svn://svn.openwrt.org/openwrt/packages@28102 3c298f89-4303-0410-b956-a3cf2f4a3e73
2011-08-28 12:08:31 +00:00

26 lines
873 B
Diff

diff -brau ipsec-tools-0.7.3.o/src/racoon/oakley.c ipsec-tools-0.7.3/src/racoon/oakley.c
--- a/src/racoon/oakley.c 2009-08-13 11:18:45.000000000 +0200
+++ b/src/racoon/oakley.c 2011-06-06 09:36:11.000000000 +0200
@@ -2498,8 +2498,21 @@
plog(LLV_ERROR, LOCATION, iph1->remote,
"couldn't find the pskey for %s.\n",
saddrwop2str(iph1->remote));
+ }
+ }
+ if (iph1->authstr == NULL) {
+ /*
+ * If we could not locate a psk above try and locate
+ * the default psk, ie, "*".
+ */
+ iph1->authstr = privsep_getpsk("*", 1);
+ if (iph1->authstr == NULL) {
+ plog(LLV_ERROR, LOCATION, iph1->remote,
+ "couldn't find the the default pskey either.\n");
goto end;
}
+ plog(LLV_NOTIFY, LOCATION, iph1->remote,
+ "Using default PSK.\n");
}
plog(LLV_DEBUG, LOCATION, NULL, "the psk found.\n");
/* should be secret PSK */