Module Name:    src
Committed By:   vanhu
Date:           Wed Feb  2 15:21:34 UTC 2011

Modified Files:
        src/crypto/dist/ipsec-tools/src/racoon: cftoken.l isakmp.c remoteconf.h
            sainfo.c sainfo.h

Log Message:
store ph1id in an u_int32_t instead of a (signed)int. Patch from Christophe 
Carre


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/crypto/dist/ipsec-tools/src/racoon/cftoken.l
cvs rdiff -u -r1.66 -r1.67 src/crypto/dist/ipsec-tools/src/racoon/isakmp.c
cvs rdiff -u -r1.13 -r1.14 \
    src/crypto/dist/ipsec-tools/src/racoon/remoteconf.h \
    src/crypto/dist/ipsec-tools/src/racoon/sainfo.c
cvs rdiff -u -r1.7 -r1.8 src/crypto/dist/ipsec-tools/src/racoon/sainfo.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/dist/ipsec-tools/src/racoon/cftoken.l
diff -u src/crypto/dist/ipsec-tools/src/racoon/cftoken.l:1.22 src/crypto/dist/ipsec-tools/src/racoon/cftoken.l:1.23
--- src/crypto/dist/ipsec-tools/src/racoon/cftoken.l:1.22	Fri Sep 24 15:09:29 2010
+++ src/crypto/dist/ipsec-tools/src/racoon/cftoken.l	Wed Feb  2 15:21:34 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: cftoken.l,v 1.22 2010/09/24 15:09:29 vanhu Exp $	*/
+/*	$NetBSD: cftoken.l,v 1.23 2011/02/02 15:21:34 vanhu Exp $	*/
 
 /* Id: cftoken.l,v 1.53 2006/08/22 18:17:17 manubsd Exp */
 
@@ -580,7 +580,7 @@
 			char *bp;
 
 			YYD;
-			yylval.num = strtol(yytext, &bp, 10);
+			yylval.num = strtoul(yytext, &bp, 10);
 			return(NUMBER);
 		}
 

Index: src/crypto/dist/ipsec-tools/src/racoon/isakmp.c
diff -u src/crypto/dist/ipsec-tools/src/racoon/isakmp.c:1.66 src/crypto/dist/ipsec-tools/src/racoon/isakmp.c:1.67
--- src/crypto/dist/ipsec-tools/src/racoon/isakmp.c:1.66	Wed Nov 17 10:40:41 2010
+++ src/crypto/dist/ipsec-tools/src/racoon/isakmp.c	Wed Feb  2 15:21:34 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: isakmp.c,v 1.66 2010/11/17 10:40:41 tteras Exp $	*/
+/*	$NetBSD: isakmp.c,v 1.67 2011/02/02 15:21:34 vanhu Exp $	*/
 
 /* Id: isakmp.c,v 1.74 2006/05/07 21:32:59 manubsd Exp */
 
@@ -2246,7 +2246,7 @@
 	struct secpolicy *sp_out, *sp_in;
 {
 	struct remoteconf *conf;
-	int remoteid = 0;
+	uint32_t remoteid = 0;
 
 	plog(LLV_DEBUG, LOCATION, NULL,
 		"new acquire %s\n", spidx2str(&sp_out->spidx));

Index: src/crypto/dist/ipsec-tools/src/racoon/remoteconf.h
diff -u src/crypto/dist/ipsec-tools/src/racoon/remoteconf.h:1.13 src/crypto/dist/ipsec-tools/src/racoon/remoteconf.h:1.14
--- src/crypto/dist/ipsec-tools/src/racoon/remoteconf.h:1.13	Fri Jan 28 13:00:14 2011
+++ src/crypto/dist/ipsec-tools/src/racoon/remoteconf.h	Wed Feb  2 15:21:34 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: remoteconf.h,v 1.13 2011/01/28 13:00:14 tteras Exp $	*/
+/*	$NetBSD: remoteconf.h,v 1.14 2011/02/02 15:21:34 vanhu Exp $	*/
 
 /* Id: remoteconf.h,v 1.26 2006/05/06 15:52:44 manubsd Exp */
 
@@ -141,7 +141,7 @@
 #define REKEY_ON		TRUE
 #define REKEY_FORCE		2
 
-	int ph1id; /* ph1id to be matched with sainfo sections */
+	uint32_t ph1id; /* ph1id to be matched with sainfo sections */
 
 	int weak_phase1_check;		/* act on unencrypted deletions ? */
 
Index: src/crypto/dist/ipsec-tools/src/racoon/sainfo.c
diff -u src/crypto/dist/ipsec-tools/src/racoon/sainfo.c:1.13 src/crypto/dist/ipsec-tools/src/racoon/sainfo.c:1.14
--- src/crypto/dist/ipsec-tools/src/racoon/sainfo.c:1.13	Fri Jan 28 13:02:34 2011
+++ src/crypto/dist/ipsec-tools/src/racoon/sainfo.c	Wed Feb  2 15:21:34 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: sainfo.c,v 1.13 2011/01/28 13:02:34 tteras Exp $	*/
+/*	$NetBSD: sainfo.c,v 1.14 2011/02/02 15:21:34 vanhu Exp $	*/
 
 /*	$KAME: sainfo.c,v 1.16 2003/06/27 07:32:39 sakane Exp $	*/
 
@@ -79,7 +79,7 @@
 struct sainfo *
 getsainfo(loc, rmt, peer, client, remoteid)
 	const vchar_t *loc, *rmt, *peer, *client;
-	int remoteid;
+	uint32_t remoteid;
 {
 	struct sainfo *s = NULL;
 
@@ -110,7 +110,7 @@
 			dclient = ipsecdoi_id2str(client);
 
 		plog(LLV_DEBUG, LOCATION, NULL,
-			"getsainfo params: loc=\'%s\' rmt=\'%s\' peer=\'%s\' client=\'%s\' id=%i\n",
+			"getsainfo params: loc=\'%s\' rmt=\'%s\' peer=\'%s\' client=\'%s\' id=%u\n",
 			dloc, drmt, dpeer, dclient, remoteid );
  
                 racoon_free(dloc);
@@ -126,7 +126,7 @@
 
 		if(s->remoteid != remoteid) {
 			plog(LLV_DEBUG, LOCATION, NULL,
-				"remoteid mismatch: %i != %i\n",
+				"remoteid mismatch: %u != %u\n",
 				s->remoteid, remoteid);
 				continue;
 		}
@@ -383,7 +383,7 @@
         else
                 id_i = ipsecdoi_id2str(si->id_i);
  
-        snprintf(buf, 255, "loc=\'%s\', rmt=\'%s\', peer=\'%s\', id=%i",
+        snprintf(buf, 255, "loc=\'%s\', rmt=\'%s\', peer=\'%s\', id=%u",
 		idloc, idrmt, id_i, si->remoteid);
  
         racoon_free(idloc);

Index: src/crypto/dist/ipsec-tools/src/racoon/sainfo.h
diff -u src/crypto/dist/ipsec-tools/src/racoon/sainfo.h:1.7 src/crypto/dist/ipsec-tools/src/racoon/sainfo.h:1.8
--- src/crypto/dist/ipsec-tools/src/racoon/sainfo.h:1.7	Fri Jan 28 13:02:34 2011
+++ src/crypto/dist/ipsec-tools/src/racoon/sainfo.h	Wed Feb  2 15:21:34 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: sainfo.h,v 1.7 2011/01/28 13:02:34 tteras Exp $	*/
+/*	$NetBSD: sainfo.h,v 1.8 2011/02/02 15:21:34 vanhu Exp $	*/
 
 /* Id: sainfo.h,v 1.5 2006/07/09 17:19:38 manubsd Exp */
 
@@ -60,7 +60,7 @@
 	vchar_t *id_i;		/* identifier of the authorized initiator */
 	struct sainfoalg *algs[MAXALGCLASS];
 
-	int remoteid;
+	uint32_t remoteid;
 
 	LIST_ENTRY(sainfo) chain;
 };
@@ -73,7 +73,7 @@
 };
 
 extern struct sainfo *getsainfo __P((const vchar_t *,
-	const vchar_t *, const vchar_t *, const vchar_t *, int));
+	const vchar_t *, const vchar_t *, const vchar_t *, uint32_t));
 extern struct sainfo *newsainfo __P((void));
 extern void delsainfo __P((struct sainfo *));
 extern void inssainfo __P((struct sainfo *));

Reply via email to