ports/security/ipsec-tools/files/wildcard-psk.diff
Kurt Jaeger 2e412fff60 security/ipsec-tools: 0.8.1 -> 0.8.2
From ChangeLog:
- Fix admin port establish-sa for tunnel mode SAs (Alexander Sbitnev)
- Fix source port selection regression from version 0.8.1
- Various logging improvements
- Additional compliance and build fixes

From submitter:
- extra patch to adding wildcard psk option

PR:		196930
Submitted by:	Harald Schmalzbauer <bugzilla.freebsd@omnilan.de>,
		Ed Schouten <ed@80368.nl>
Approved by:	vanhu (maintainer)
2015-02-06 20:31:54 +00:00

12 lines
431 B
Diff

--- src/racoon/localconf.c 9 Sep 2006 16:22:09 -0000 1.4
+++ src/racoon/localconf.c 11 Jul 2008 20:58:55 -0000
@@ -211,7 +211,8 @@ getpsk(str, len)
if (*p == '\0')
continue; /* no 2nd parameter */
p--;
- if (strncmp(buf, str, len) == 0 && buf[len] == '\0') {
+ if (strcmp(buf, "*") == 0
+ || (strncmp(buf, str, len) == 0 && buf[len] == '\0')) {
p++;
keylen = 0;
for (q = p; *q != '\0' && *q != '\n'; q++)