001-ipsec-tools-def-psk.patch (732B)
1 --- a/src/racoon/oakley.c 2 +++ b/src/racoon/oakley.c 3 @@ -2424,8 +2424,21 @@ oakley_skeyid(iph1) 4 plog(LLV_ERROR, LOCATION, iph1->remote, 5 "couldn't find the pskey for %s.\n", 6 saddrwop2str(iph1->remote)); 7 + } 8 + } 9 + if (iph1->authstr == NULL) { 10 + /* 11 + * If we could not locate a psk above try and locate 12 + * the default psk, ie, "*". 13 + */ 14 + iph1->authstr = privsep_getpsk("*", 1); 15 + if (iph1->authstr == NULL) { 16 + plog(LLV_ERROR, LOCATION, iph1->remote, 17 + "couldn't find the the default pskey either.\n"); 18 goto end; 19 } 20 + plog(LLV_NOTIFY, LOCATION, iph1->remote, 21 + "Using default PSK.\n"); 22 } 23 plog(LLV_DEBUG, LOCATION, NULL, "the psk found.\n"); 24 /* should be secret PSK */