Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/crypto/dist/ipsec-tools/src/racoon store ph1id in an u_int32...



details:   https://anonhg.NetBSD.org/src/rev/36f8b6565667
branches:  trunk
changeset: 761614:36f8b6565667
user:      vanhu <vanhu%NetBSD.org@localhost>
date:      Wed Feb 02 15:21:34 2011 +0000

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

diffstat:

 crypto/dist/ipsec-tools/src/racoon/cftoken.l    |   4 ++--
 crypto/dist/ipsec-tools/src/racoon/isakmp.c     |   4 ++--
 crypto/dist/ipsec-tools/src/racoon/remoteconf.h |   4 ++--
 crypto/dist/ipsec-tools/src/racoon/sainfo.c     |  10 +++++-----
 crypto/dist/ipsec-tools/src/racoon/sainfo.h     |   6 +++---
 5 files changed, 14 insertions(+), 14 deletions(-)

diffs (126 lines):

diff -r ad3b442d0d22 -r 36f8b6565667 crypto/dist/ipsec-tools/src/racoon/cftoken.l
--- a/crypto/dist/ipsec-tools/src/racoon/cftoken.l      Wed Feb 02 15:17:37 2011 +0000
+++ b/crypto/dist/ipsec-tools/src/racoon/cftoken.l      Wed Feb 02 15:21:34 2011 +0000
@@ -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);
                }
 
diff -r ad3b442d0d22 -r 36f8b6565667 crypto/dist/ipsec-tools/src/racoon/isakmp.c
--- a/crypto/dist/ipsec-tools/src/racoon/isakmp.c       Wed Feb 02 15:17:37 2011 +0000
+++ b/crypto/dist/ipsec-tools/src/racoon/isakmp.c       Wed Feb 02 15:21:34 2011 +0000
@@ -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));
diff -r ad3b442d0d22 -r 36f8b6565667 crypto/dist/ipsec-tools/src/racoon/remoteconf.h
--- a/crypto/dist/ipsec-tools/src/racoon/remoteconf.h   Wed Feb 02 15:17:37 2011 +0000
+++ b/crypto/dist/ipsec-tools/src/racoon/remoteconf.h   Wed Feb 02 15:21:34 2011 +0000
@@ -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 ? */
 
diff -r ad3b442d0d22 -r 36f8b6565667 crypto/dist/ipsec-tools/src/racoon/sainfo.c
--- a/crypto/dist/ipsec-tools/src/racoon/sainfo.c       Wed Feb 02 15:17:37 2011 +0000
+++ b/crypto/dist/ipsec-tools/src/racoon/sainfo.c       Wed Feb 02 15:21:34 2011 +0000
@@ -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);
diff -r ad3b442d0d22 -r 36f8b6565667 crypto/dist/ipsec-tools/src/racoon/sainfo.h
--- a/crypto/dist/ipsec-tools/src/racoon/sainfo.h       Wed Feb 02 15:17:37 2011 +0000
+++ b/crypto/dist/ipsec-tools/src/racoon/sainfo.h       Wed Feb 02 15:21:34 2011 +0000
@@ -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 *));



Home | Main Index | Thread Index | Old Index