bin/61978: [PATCH] sync src/usr.sbin/setkey/token.l with KAME
Xin LI
delphij at frontfree.net
Mon Jan 26 21:50:38 PST 2004
>Number: 61978
>Category: bin
>Synopsis: [PATCH] sync src/usr.sbin/setkey/token.l with KAME
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Mon Jan 26 21:50:11 PST 2004
>Closed-Date:
>Last-Modified:
>Originator: Xin LI
>Release: FreeBSD 5.2-RELEASE i386
>Organization:
The FreeBSD Simplified Chinese Project
>Environment:
System: FreeBSD beastie.frontfree.net 5.2-RELEASE FreeBSD 5.2-RELEASE #16: Sat Jan 10 15:24:09 CST 2004 delphij at beastie.frontfree.net:/usr/obj/usr/src/sys/BEASTIE i386
>Description:
Merge KAME's rev. 1.44-1.45 of setkey/token.l
>How-To-Repeat:
>Fix:
Apply the attached patch. Please note that NetBSD-specific and *BSD cross compile support was removed from this merge to reduce the diff. twofish-cbc is not implemented in FreeBSD and was not included in this patch.
--- patch begins here ---
--- token.l.orig Wed Nov 5 17:47:54 2003
+++ token.l Tue Jan 27 10:36:13 2004
@@ -1,5 +1,5 @@
-/* $FreeBSD: src/usr.sbin/setkey/token.l,v 1.9 2003/11/05 09:47:54 ume Exp $ */
-/* $KAME: token.l,v 1.43 2003/07/25 09:35:28 itojun Exp $ */
+/* $FreeBSD$ */
+/* $KAME: token.l,v 1.45 2004/01/08 06:01:03 sakane Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, 1998, and 1999 WIDE Project.
@@ -110,7 +110,7 @@
/* count up for nl */
{
char *p;
- for (p = yytext; *p != NULL; p++)
+ for (p = yytext; *p != 0; p++)
if (*p == '\n')
lineno++;
}
@@ -151,13 +151,13 @@
<S_AUTHALG>hmac-sha2-512 { yylval.num = SADB_X_AALG_SHA2_512; BEGIN INITIAL; return(ALG_AUTH); }
<S_AUTHALG>hmac-ripemd160 { yylval.num = SADB_X_AALG_RIPEMD160HMAC; BEGIN INITIAL; return(ALG_AUTH); }
<S_AUTHALG>aes-xcbc-mac { yylval.num = SADB_X_AALG_AES_XCBC_MAC; BEGIN INITIAL; return(ALG_AUTH); }
-<S_AUTHALG>null { yylval.num = SADB_X_AALG_NULL; BEGIN INITIAL; return(ALG_AUTH_NOKEY); }
+<S_AUTHALG>null { yylval.num = SADB_X_AALG_NULL; BEGIN INITIAL; return(ALG_AUTH); }
/* encryption alogorithm */
{hyphen}E { BEGIN S_ENCALG; return(F_ENC); }
<S_ENCALG>des-cbc { yylval.num = SADB_EALG_DESCBC; BEGIN INITIAL; return(ALG_ENC); }
<S_ENCALG>3des-cbc { yylval.num = SADB_EALG_3DESCBC; BEGIN INITIAL; return(ALG_ENC); }
-<S_ENCALG>null { yylval.num = SADB_EALG_NULL; BEGIN INITIAL; return(ALG_ENC_NOKEY); }
+<S_ENCALG>null { yylval.num = SADB_EALG_NULL; BEGIN INITIAL; return(ALG_ENC); }
<S_ENCALG>simple { yylval.num = SADB_EALG_NULL; BEGIN INITIAL; return(ALG_ENC_OLD); }
<S_ENCALG>blowfish-cbc { yylval.num = SADB_X_EALG_BLOWFISHCBC; BEGIN INITIAL; return(ALG_ENC); }
<S_ENCALG>cast128-cbc { yylval.num = SADB_X_EALG_CAST128CBC; BEGIN INITIAL; return(ALG_ENC); }
@@ -219,7 +219,7 @@
{quotedstring} {
char *p = yytext;
while (*++p != '"') ;
- *p = NULL;
+ *p = 0;
yytext++;
yylval.val.len = yyleng - 2;
yylval.val.buf = strdup(yytext);
--- patch ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-bugs
mailing list