| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | /* $NetBSD: ipsec_doi.c,v 1.48 2012/11/29 15:31:25 vanhu Exp $ */ | | 1 | /* $NetBSD: ipsec_doi.c,v 1.49 2013/06/18 05:39:50 tteras Exp $ */ |
2 | | | 2 | |
3 | /* Id: ipsec_doi.c,v 1.55 2006/08/17 09:20:41 vanhu Exp */ | | 3 | /* Id: ipsec_doi.c,v 1.55 2006/08/17 09:20:41 vanhu Exp */ |
4 | | | 4 | |
5 | /* | | 5 | /* |
6 | * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. | | 6 | * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. |
7 | * All rights reserved. | | 7 | * All rights reserved. |
8 | * | | 8 | * |
9 | * Redistribution and use in source and binary forms, with or without | | 9 | * Redistribution and use in source and binary forms, with or without |
10 | * modification, are permitted provided that the following conditions | | 10 | * modification, are permitted provided that the following conditions |
11 | * are met: | | 11 | * are met: |
12 | * 1. Redistributions of source code must retain the above copyright | | 12 | * 1. Redistributions of source code must retain the above copyright |
13 | * notice, this list of conditions and the following disclaimer. | | 13 | * notice, this list of conditions and the following disclaimer. |
14 | * 2. Redistributions in binary form must reproduce the above copyright | | 14 | * 2. Redistributions in binary form must reproduce the above copyright |
| @@ -1173,27 +1173,26 @@ get_proppair_and_doi_sit(sa, mode, doity | | | @@ -1173,27 +1173,26 @@ get_proppair_and_doi_sit(sa, mode, doity |
1173 | | | 1173 | |
1174 | /* check SITUATION */ | | 1174 | /* check SITUATION */ |
1175 | if (check_situation(ntohl(sab->sit)) < 0) | | 1175 | if (check_situation(ntohl(sab->sit)) < 0) |
1176 | goto bad; | | 1176 | goto bad; |
1177 | if (sittype != NULL) | | 1177 | if (sittype != NULL) |
1178 | *sittype = ntohl(sab->sit); | | 1178 | *sittype = ntohl(sab->sit); |
1179 | | | 1179 | |
1180 | pair = racoon_calloc(1, MAXPROPPAIRLEN * sizeof(*pair)); | | 1180 | pair = racoon_calloc(1, MAXPROPPAIRLEN * sizeof(*pair)); |
1181 | if (pair == NULL) { | | 1181 | if (pair == NULL) { |
1182 | plog(LLV_ERROR, LOCATION, NULL, | | 1182 | plog(LLV_ERROR, LOCATION, NULL, |
1183 | "failed to get buffer.\n"); | | 1183 | "failed to get buffer.\n"); |
1184 | goto bad; | | 1184 | goto bad; |
1185 | } | | 1185 | } |
1186 | memset(pair, 0, sizeof(pair)); | | | |
1187 | | | 1186 | |
1188 | bp = (caddr_t)(sab + 1); | | 1187 | bp = (caddr_t)(sab + 1); |
1189 | tlen = sa->l - sizeof(*sab); | | 1188 | tlen = sa->l - sizeof(*sab); |
1190 | | | 1189 | |
1191 | { | | 1190 | { |
1192 | struct isakmp_pl_p *prop; | | 1191 | struct isakmp_pl_p *prop; |
1193 | int proplen; | | 1192 | int proplen; |
1194 | vchar_t *pbuf = NULL; | | 1193 | vchar_t *pbuf = NULL; |
1195 | struct isakmp_parse_t *pa; | | 1194 | struct isakmp_parse_t *pa; |
1196 | | | 1195 | |
1197 | pbuf = isakmp_parsewoh(ISAKMP_NPTYPE_P, (struct isakmp_gen *)bp, tlen); | | 1196 | pbuf = isakmp_parsewoh(ISAKMP_NPTYPE_P, (struct isakmp_gen *)bp, tlen); |
1198 | if (pbuf == NULL) | | 1197 | if (pbuf == NULL) |
1199 | goto bad; | | 1198 | goto bad; |