View | Details | Raw Unified | Return to bug 203308 | Differences between
and this patch

Collapse All | Expand All

(-)oakley.c (-1 / +14 lines)
Lines 2386-2391 Link Here
2386
	char *p;
2386
	char *p;
2387
	int len;
2387
	int len;
2388
	int error = -1;
2388
	int error = -1;
2389
	struct ipsecdoi_id_b *id_b;
2389
	
2390
	
2390
	/* SKEYID */
2391
	/* SKEYID */
2391
	switch (iph1->approval->authmethod) {
2392
	switch (iph1->approval->authmethod) {
Lines 2395-2401 Link Here
2395
	case OAKLEY_ATTR_AUTH_METHOD_XAUTH_PSKEY_R:
2396
	case OAKLEY_ATTR_AUTH_METHOD_XAUTH_PSKEY_R:
2396
#endif
2397
#endif
2397
		if (iph1->etype != ISAKMP_ETYPE_IDENT) {
2398
		if (iph1->etype != ISAKMP_ETYPE_IDENT) {
2398
			iph1->authstr = getpskbyname(iph1->id_p);
2399
		  id_b = (struct ipsecdoi_id_b *)iph1->id_p->v;
2400
		
2401
		  if (id_b->type != IPSECDOI_ID_IPV4_ADDR
2402
                   && id_b->type != IPSECDOI_ID_IPV6_ADDR) {
2403
	                	iph1->authstr = getpskbyname(iph1->id_p);
2404
			} else {
2405
               			struct sockaddr addr;
2406
                		u_int8_t prefix;
2407
                		u_int16_t ul_proto;
2408
                        	if (!ipsecdoi_id2sockaddr(iph1->id_p, &addr, &prefix, &ul_proto)) {
2409
					iph1->authstr = getpskbyaddr(&addr);
2410
				}
2411
			}
2399
			if (iph1->authstr == NULL) {
2412
			if (iph1->authstr == NULL) {
2400
				if (iph1->rmconf->verify_identifier) {
2413
				if (iph1->rmconf->verify_identifier) {
2401
					plog(LLV_ERROR, LOCATION, iph1->remote,
2414
					plog(LLV_ERROR, LOCATION, iph1->remote,

Return to bug 203308