Annotation of embedaddon/ipsec-tools/src/racoon/cfparse.c, revision 1.1
1.1 ! misho 1:
! 2: /* A Bison parser, made by GNU Bison 2.4.1. */
! 3:
! 4: /* Skeleton implementation for Bison's Yacc-like parsers in C
! 5:
! 6: Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
! 7: Free Software Foundation, Inc.
! 8:
! 9: This program is free software: you can redistribute it and/or modify
! 10: it under the terms of the GNU General Public License as published by
! 11: the Free Software Foundation, either version 3 of the License, or
! 12: (at your option) any later version.
! 13:
! 14: This program is distributed in the hope that it will be useful,
! 15: but WITHOUT ANY WARRANTY; without even the implied warranty of
! 16: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
! 17: GNU General Public License for more details.
! 18:
! 19: You should have received a copy of the GNU General Public License
! 20: along with this program. If not, see <http://www.gnu.org/licenses/>. */
! 21:
! 22: /* As a special exception, you may create a larger work that contains
! 23: part or all of the Bison parser skeleton and distribute that work
! 24: under terms of your choice, so long as that work isn't itself a
! 25: parser generator using the skeleton or a modified version thereof
! 26: as a parser skeleton. Alternatively, if you modify or redistribute
! 27: the parser skeleton itself, you may (at your option) remove this
! 28: special exception, which will cause the skeleton and the resulting
! 29: Bison output files to be licensed under the GNU General Public
! 30: License without this special exception.
! 31:
! 32: This special exception was added by the Free Software Foundation in
! 33: version 2.2 of Bison. */
! 34:
! 35: /* C LALR(1) parser skeleton written by Richard Stallman, by
! 36: simplifying the original so-called "semantic" parser. */
! 37:
! 38: /* All symbols defined below should begin with yy or YY, to avoid
! 39: infringing on user name space. This should be done even for local
! 40: variables, as they might otherwise be expanded by user macros.
! 41: There are some unavoidable exceptions within include files to
! 42: define necessary library symbols; they are noted "INFRINGES ON
! 43: USER NAME SPACE" below. */
! 44:
! 45: /* Identify Bison output. */
! 46: #define YYBISON 1
! 47:
! 48: /* Bison version. */
! 49: #define YYBISON_VERSION "2.4.1"
! 50:
! 51: /* Skeleton name. */
! 52: #define YYSKELETON_NAME "yacc.c"
! 53:
! 54: /* Pure parsers. */
! 55: #define YYPURE 0
! 56:
! 57: /* Push parsers. */
! 58: #define YYPUSH 0
! 59:
! 60: /* Pull parsers. */
! 61: #define YYPULL 1
! 62:
! 63: /* Using locations. */
! 64: #define YYLSP_NEEDED 0
! 65:
! 66:
! 67:
! 68: /* Copy the first part of user declarations. */
! 69:
! 70: /* Line 189 of yacc.c */
! 71: #line 5 "cfparse.y"
! 72:
! 73: /*
! 74: * Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002 and 2003 WIDE Project.
! 75: * All rights reserved.
! 76: *
! 77: * Redistribution and use in source and binary forms, with or without
! 78: * modification, are permitted provided that the following conditions
! 79: * are met:
! 80: * 1. Redistributions of source code must retain the above copyright
! 81: * notice, this list of conditions and the following disclaimer.
! 82: * 2. Redistributions in binary form must reproduce the above copyright
! 83: * notice, this list of conditions and the following disclaimer in the
! 84: * documentation and/or other materials provided with the distribution.
! 85: * 3. Neither the name of the project nor the names of its contributors
! 86: * may be used to endorse or promote products derived from this software
! 87: * without specific prior written permission.
! 88: *
! 89: * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
! 90: * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
! 91: * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
! 92: * ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
! 93: * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
! 94: * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
! 95: * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
! 96: * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
! 97: * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
! 98: * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
! 99: * SUCH DAMAGE.
! 100: */
! 101:
! 102: #include "config.h"
! 103:
! 104: #include <sys/types.h>
! 105: #include <sys/param.h>
! 106: #include <sys/queue.h>
! 107: #include <sys/socket.h>
! 108:
! 109: #include <netinet/in.h>
! 110: #include PATH_IPSEC_H
! 111:
! 112: #ifdef ENABLE_HYBRID
! 113: #include <arpa/inet.h>
! 114: #endif
! 115:
! 116: #include <stdlib.h>
! 117: #include <stdio.h>
! 118: #include <string.h>
! 119: #include <errno.h>
! 120: #include <netdb.h>
! 121: #include <pwd.h>
! 122: #include <grp.h>
! 123:
! 124: #include "var.h"
! 125: #include "misc.h"
! 126: #include "vmbuf.h"
! 127: #include "plog.h"
! 128: #include "sockmisc.h"
! 129: #include "str2val.h"
! 130: #include "genlist.h"
! 131: #include "debug.h"
! 132:
! 133: #include "admin.h"
! 134: #include "privsep.h"
! 135: #include "cfparse_proto.h"
! 136: #include "cftoken_proto.h"
! 137: #include "algorithm.h"
! 138: #include "localconf.h"
! 139: #include "policy.h"
! 140: #include "sainfo.h"
! 141: #include "oakley.h"
! 142: #include "pfkey.h"
! 143: #include "remoteconf.h"
! 144: #include "grabmyaddr.h"
! 145: #include "isakmp_var.h"
! 146: #include "handler.h"
! 147: #include "isakmp.h"
! 148: #include "nattraversal.h"
! 149: #include "isakmp_frag.h"
! 150: #ifdef ENABLE_HYBRID
! 151: #include "resolv.h"
! 152: #include "isakmp_unity.h"
! 153: #include "isakmp_xauth.h"
! 154: #include "isakmp_cfg.h"
! 155: #endif
! 156: #include "ipsec_doi.h"
! 157: #include "strnames.h"
! 158: #include "gcmalloc.h"
! 159: #ifdef HAVE_GSSAPI
! 160: #include "gssapi.h"
! 161: #endif
! 162: #include "vendorid.h"
! 163: #include "rsalist.h"
! 164: #include "crypto_openssl.h"
! 165:
! 166: struct secprotospec {
! 167: int prop_no;
! 168: int trns_no;
! 169: int strength; /* for isakmp/ipsec */
! 170: int encklen; /* for isakmp/ipsec */
! 171: time_t lifetime; /* for isakmp */
! 172: int lifebyte; /* for isakmp */
! 173: int proto_id; /* for ipsec (isakmp?) */
! 174: int ipsec_level; /* for ipsec */
! 175: int encmode; /* for ipsec */
! 176: int vendorid; /* for isakmp */
! 177: char *gssid;
! 178: struct sockaddr *remote;
! 179: int algclass[MAXALGCLASS];
! 180:
! 181: struct secprotospec *next; /* the tail is the most prefiered. */
! 182: struct secprotospec *prev;
! 183: };
! 184:
! 185: static int num2dhgroup[] = {
! 186: 0,
! 187: OAKLEY_ATTR_GRP_DESC_MODP768,
! 188: OAKLEY_ATTR_GRP_DESC_MODP1024,
! 189: OAKLEY_ATTR_GRP_DESC_EC2N155,
! 190: OAKLEY_ATTR_GRP_DESC_EC2N185,
! 191: OAKLEY_ATTR_GRP_DESC_MODP1536,
! 192: 0,
! 193: 0,
! 194: 0,
! 195: 0,
! 196: 0,
! 197: 0,
! 198: 0,
! 199: 0,
! 200: OAKLEY_ATTR_GRP_DESC_MODP2048,
! 201: OAKLEY_ATTR_GRP_DESC_MODP3072,
! 202: OAKLEY_ATTR_GRP_DESC_MODP4096,
! 203: OAKLEY_ATTR_GRP_DESC_MODP6144,
! 204: OAKLEY_ATTR_GRP_DESC_MODP8192
! 205: };
! 206:
! 207: static struct remoteconf *cur_rmconf;
! 208: static int tmpalgtype[MAXALGCLASS];
! 209: static struct sainfo *cur_sainfo;
! 210: static int cur_algclass;
! 211: static int oldloglevel = LLV_BASE;
! 212:
! 213: static struct secprotospec *newspspec __P((void));
! 214: static void insspspec __P((struct remoteconf *, struct secprotospec *));
! 215: void dupspspec_list __P((struct remoteconf *dst, struct remoteconf *src));
! 216: void flushspspec __P((struct remoteconf *));
! 217: static void adminsock_conf __P((vchar_t *, vchar_t *, vchar_t *, int));
! 218:
! 219: static int set_isakmp_proposal __P((struct remoteconf *));
! 220: static void clean_tmpalgtype __P((void));
! 221: static int expand_isakmpspec __P((int, int, int *,
! 222: int, int, time_t, int, int, int, char *, struct remoteconf *));
! 223:
! 224: void freeetypes (struct etypes **etypes);
! 225:
! 226: static int load_x509(const char *file, char **filenameptr,
! 227: vchar_t **certptr)
! 228: {
! 229: char path[PATH_MAX];
! 230:
! 231: getpathname(path, sizeof(path), LC_PATHTYPE_CERT, file);
! 232: *certptr = eay_get_x509cert(path);
! 233: if (*certptr == NULL)
! 234: return -1;
! 235:
! 236: *filenameptr = racoon_strdup(file);
! 237: STRDUP_FATAL(*filenameptr);
! 238:
! 239: return 0;
! 240: }
! 241:
! 242:
! 243:
! 244: /* Line 189 of yacc.c */
! 245: #line 246 "cfparse.c"
! 246:
! 247: /* Enabling traces. */
! 248: #ifndef YYDEBUG
! 249: # define YYDEBUG 0
! 250: #endif
! 251:
! 252: /* Enabling verbose error messages. */
! 253: #ifdef YYERROR_VERBOSE
! 254: # undef YYERROR_VERBOSE
! 255: # define YYERROR_VERBOSE 1
! 256: #else
! 257: # define YYERROR_VERBOSE 0
! 258: #endif
! 259:
! 260: /* Enabling the token table. */
! 261: #ifndef YYTOKEN_TABLE
! 262: # define YYTOKEN_TABLE 0
! 263: #endif
! 264:
! 265:
! 266: /* Tokens. */
! 267: #ifndef YYTOKENTYPE
! 268: # define YYTOKENTYPE
! 269: /* Put the tokens into the symbol table, so that GDB and other debuggers
! 270: know about them. */
! 271: enum yytokentype {
! 272: PRIVSEP = 258,
! 273: USER = 259,
! 274: GROUP = 260,
! 275: CHROOT = 261,
! 276: PATH = 262,
! 277: PATHTYPE = 263,
! 278: INCLUDE = 264,
! 279: PFKEY_BUFFER = 265,
! 280: LOGGING = 266,
! 281: LOGLEV = 267,
! 282: PADDING = 268,
! 283: PAD_RANDOMIZE = 269,
! 284: PAD_RANDOMIZELEN = 270,
! 285: PAD_MAXLEN = 271,
! 286: PAD_STRICT = 272,
! 287: PAD_EXCLTAIL = 273,
! 288: LISTEN = 274,
! 289: X_ISAKMP = 275,
! 290: X_ISAKMP_NATT = 276,
! 291: X_ADMIN = 277,
! 292: STRICT_ADDRESS = 278,
! 293: ADMINSOCK = 279,
! 294: DISABLED = 280,
! 295: LDAPCFG = 281,
! 296: LDAP_HOST = 282,
! 297: LDAP_PORT = 283,
! 298: LDAP_PVER = 284,
! 299: LDAP_BASE = 285,
! 300: LDAP_BIND_DN = 286,
! 301: LDAP_BIND_PW = 287,
! 302: LDAP_SUBTREE = 288,
! 303: LDAP_ATTR_USER = 289,
! 304: LDAP_ATTR_ADDR = 290,
! 305: LDAP_ATTR_MASK = 291,
! 306: LDAP_ATTR_GROUP = 292,
! 307: LDAP_ATTR_MEMBER = 293,
! 308: RADCFG = 294,
! 309: RAD_AUTH = 295,
! 310: RAD_ACCT = 296,
! 311: RAD_TIMEOUT = 297,
! 312: RAD_RETRIES = 298,
! 313: MODECFG = 299,
! 314: CFG_NET4 = 300,
! 315: CFG_MASK4 = 301,
! 316: CFG_DNS4 = 302,
! 317: CFG_NBNS4 = 303,
! 318: CFG_DEFAULT_DOMAIN = 304,
! 319: CFG_AUTH_SOURCE = 305,
! 320: CFG_AUTH_GROUPS = 306,
! 321: CFG_SYSTEM = 307,
! 322: CFG_RADIUS = 308,
! 323: CFG_PAM = 309,
! 324: CFG_LDAP = 310,
! 325: CFG_LOCAL = 311,
! 326: CFG_NONE = 312,
! 327: CFG_GROUP_SOURCE = 313,
! 328: CFG_ACCOUNTING = 314,
! 329: CFG_CONF_SOURCE = 315,
! 330: CFG_MOTD = 316,
! 331: CFG_POOL_SIZE = 317,
! 332: CFG_AUTH_THROTTLE = 318,
! 333: CFG_SPLIT_NETWORK = 319,
! 334: CFG_SPLIT_LOCAL = 320,
! 335: CFG_SPLIT_INCLUDE = 321,
! 336: CFG_SPLIT_DNS = 322,
! 337: CFG_PFS_GROUP = 323,
! 338: CFG_SAVE_PASSWD = 324,
! 339: RETRY = 325,
! 340: RETRY_COUNTER = 326,
! 341: RETRY_INTERVAL = 327,
! 342: RETRY_PERSEND = 328,
! 343: RETRY_PHASE1 = 329,
! 344: RETRY_PHASE2 = 330,
! 345: NATT_KA = 331,
! 346: ALGORITHM_CLASS = 332,
! 347: ALGORITHMTYPE = 333,
! 348: STRENGTHTYPE = 334,
! 349: SAINFO = 335,
! 350: FROM = 336,
! 351: REMOTE = 337,
! 352: ANONYMOUS = 338,
! 353: CLIENTADDR = 339,
! 354: INHERIT = 340,
! 355: REMOTE_ADDRESS = 341,
! 356: EXCHANGE_MODE = 342,
! 357: EXCHANGETYPE = 343,
! 358: DOI = 344,
! 359: DOITYPE = 345,
! 360: SITUATION = 346,
! 361: SITUATIONTYPE = 347,
! 362: CERTIFICATE_TYPE = 348,
! 363: CERTTYPE = 349,
! 364: PEERS_CERTFILE = 350,
! 365: CA_TYPE = 351,
! 366: VERIFY_CERT = 352,
! 367: SEND_CERT = 353,
! 368: SEND_CR = 354,
! 369: MATCH_EMPTY_CR = 355,
! 370: IDENTIFIERTYPE = 356,
! 371: IDENTIFIERQUAL = 357,
! 372: MY_IDENTIFIER = 358,
! 373: PEERS_IDENTIFIER = 359,
! 374: VERIFY_IDENTIFIER = 360,
! 375: DNSSEC = 361,
! 376: CERT_X509 = 362,
! 377: CERT_PLAINRSA = 363,
! 378: NONCE_SIZE = 364,
! 379: DH_GROUP = 365,
! 380: KEEPALIVE = 366,
! 381: PASSIVE = 367,
! 382: INITIAL_CONTACT = 368,
! 383: NAT_TRAVERSAL = 369,
! 384: REMOTE_FORCE_LEVEL = 370,
! 385: PROPOSAL_CHECK = 371,
! 386: PROPOSAL_CHECK_LEVEL = 372,
! 387: GENERATE_POLICY = 373,
! 388: GENERATE_LEVEL = 374,
! 389: SUPPORT_PROXY = 375,
! 390: PROPOSAL = 376,
! 391: EXEC_PATH = 377,
! 392: EXEC_COMMAND = 378,
! 393: EXEC_SUCCESS = 379,
! 394: EXEC_FAILURE = 380,
! 395: GSS_ID = 381,
! 396: GSS_ID_ENC = 382,
! 397: GSS_ID_ENCTYPE = 383,
! 398: COMPLEX_BUNDLE = 384,
! 399: DPD = 385,
! 400: DPD_DELAY = 386,
! 401: DPD_RETRY = 387,
! 402: DPD_MAXFAIL = 388,
! 403: PH1ID = 389,
! 404: XAUTH_LOGIN = 390,
! 405: WEAK_PHASE1_CHECK = 391,
! 406: REKEY = 392,
! 407: PREFIX = 393,
! 408: PORT = 394,
! 409: PORTANY = 395,
! 410: UL_PROTO = 396,
! 411: ANY = 397,
! 412: IKE_FRAG = 398,
! 413: ESP_FRAG = 399,
! 414: MODE_CFG = 400,
! 415: PFS_GROUP = 401,
! 416: LIFETIME = 402,
! 417: LIFETYPE_TIME = 403,
! 418: LIFETYPE_BYTE = 404,
! 419: STRENGTH = 405,
! 420: REMOTEID = 406,
! 421: SCRIPT = 407,
! 422: PHASE1_UP = 408,
! 423: PHASE1_DOWN = 409,
! 424: PHASE1_DEAD = 410,
! 425: NUMBER = 411,
! 426: SWITCH = 412,
! 427: BOOLEAN = 413,
! 428: HEXSTRING = 414,
! 429: QUOTEDSTRING = 415,
! 430: ADDRSTRING = 416,
! 431: ADDRRANGE = 417,
! 432: UNITTYPE_BYTE = 418,
! 433: UNITTYPE_KBYTES = 419,
! 434: UNITTYPE_MBYTES = 420,
! 435: UNITTYPE_TBYTES = 421,
! 436: UNITTYPE_SEC = 422,
! 437: UNITTYPE_MIN = 423,
! 438: UNITTYPE_HOUR = 424,
! 439: EOS = 425,
! 440: BOC = 426,
! 441: EOC = 427,
! 442: COMMA = 428
! 443: };
! 444: #endif
! 445: /* Tokens. */
! 446: #define PRIVSEP 258
! 447: #define USER 259
! 448: #define GROUP 260
! 449: #define CHROOT 261
! 450: #define PATH 262
! 451: #define PATHTYPE 263
! 452: #define INCLUDE 264
! 453: #define PFKEY_BUFFER 265
! 454: #define LOGGING 266
! 455: #define LOGLEV 267
! 456: #define PADDING 268
! 457: #define PAD_RANDOMIZE 269
! 458: #define PAD_RANDOMIZELEN 270
! 459: #define PAD_MAXLEN 271
! 460: #define PAD_STRICT 272
! 461: #define PAD_EXCLTAIL 273
! 462: #define LISTEN 274
! 463: #define X_ISAKMP 275
! 464: #define X_ISAKMP_NATT 276
! 465: #define X_ADMIN 277
! 466: #define STRICT_ADDRESS 278
! 467: #define ADMINSOCK 279
! 468: #define DISABLED 280
! 469: #define LDAPCFG 281
! 470: #define LDAP_HOST 282
! 471: #define LDAP_PORT 283
! 472: #define LDAP_PVER 284
! 473: #define LDAP_BASE 285
! 474: #define LDAP_BIND_DN 286
! 475: #define LDAP_BIND_PW 287
! 476: #define LDAP_SUBTREE 288
! 477: #define LDAP_ATTR_USER 289
! 478: #define LDAP_ATTR_ADDR 290
! 479: #define LDAP_ATTR_MASK 291
! 480: #define LDAP_ATTR_GROUP 292
! 481: #define LDAP_ATTR_MEMBER 293
! 482: #define RADCFG 294
! 483: #define RAD_AUTH 295
! 484: #define RAD_ACCT 296
! 485: #define RAD_TIMEOUT 297
! 486: #define RAD_RETRIES 298
! 487: #define MODECFG 299
! 488: #define CFG_NET4 300
! 489: #define CFG_MASK4 301
! 490: #define CFG_DNS4 302
! 491: #define CFG_NBNS4 303
! 492: #define CFG_DEFAULT_DOMAIN 304
! 493: #define CFG_AUTH_SOURCE 305
! 494: #define CFG_AUTH_GROUPS 306
! 495: #define CFG_SYSTEM 307
! 496: #define CFG_RADIUS 308
! 497: #define CFG_PAM 309
! 498: #define CFG_LDAP 310
! 499: #define CFG_LOCAL 311
! 500: #define CFG_NONE 312
! 501: #define CFG_GROUP_SOURCE 313
! 502: #define CFG_ACCOUNTING 314
! 503: #define CFG_CONF_SOURCE 315
! 504: #define CFG_MOTD 316
! 505: #define CFG_POOL_SIZE 317
! 506: #define CFG_AUTH_THROTTLE 318
! 507: #define CFG_SPLIT_NETWORK 319
! 508: #define CFG_SPLIT_LOCAL 320
! 509: #define CFG_SPLIT_INCLUDE 321
! 510: #define CFG_SPLIT_DNS 322
! 511: #define CFG_PFS_GROUP 323
! 512: #define CFG_SAVE_PASSWD 324
! 513: #define RETRY 325
! 514: #define RETRY_COUNTER 326
! 515: #define RETRY_INTERVAL 327
! 516: #define RETRY_PERSEND 328
! 517: #define RETRY_PHASE1 329
! 518: #define RETRY_PHASE2 330
! 519: #define NATT_KA 331
! 520: #define ALGORITHM_CLASS 332
! 521: #define ALGORITHMTYPE 333
! 522: #define STRENGTHTYPE 334
! 523: #define SAINFO 335
! 524: #define FROM 336
! 525: #define REMOTE 337
! 526: #define ANONYMOUS 338
! 527: #define CLIENTADDR 339
! 528: #define INHERIT 340
! 529: #define REMOTE_ADDRESS 341
! 530: #define EXCHANGE_MODE 342
! 531: #define EXCHANGETYPE 343
! 532: #define DOI 344
! 533: #define DOITYPE 345
! 534: #define SITUATION 346
! 535: #define SITUATIONTYPE 347
! 536: #define CERTIFICATE_TYPE 348
! 537: #define CERTTYPE 349
! 538: #define PEERS_CERTFILE 350
! 539: #define CA_TYPE 351
! 540: #define VERIFY_CERT 352
! 541: #define SEND_CERT 353
! 542: #define SEND_CR 354
! 543: #define MATCH_EMPTY_CR 355
! 544: #define IDENTIFIERTYPE 356
! 545: #define IDENTIFIERQUAL 357
! 546: #define MY_IDENTIFIER 358
! 547: #define PEERS_IDENTIFIER 359
! 548: #define VERIFY_IDENTIFIER 360
! 549: #define DNSSEC 361
! 550: #define CERT_X509 362
! 551: #define CERT_PLAINRSA 363
! 552: #define NONCE_SIZE 364
! 553: #define DH_GROUP 365
! 554: #define KEEPALIVE 366
! 555: #define PASSIVE 367
! 556: #define INITIAL_CONTACT 368
! 557: #define NAT_TRAVERSAL 369
! 558: #define REMOTE_FORCE_LEVEL 370
! 559: #define PROPOSAL_CHECK 371
! 560: #define PROPOSAL_CHECK_LEVEL 372
! 561: #define GENERATE_POLICY 373
! 562: #define GENERATE_LEVEL 374
! 563: #define SUPPORT_PROXY 375
! 564: #define PROPOSAL 376
! 565: #define EXEC_PATH 377
! 566: #define EXEC_COMMAND 378
! 567: #define EXEC_SUCCESS 379
! 568: #define EXEC_FAILURE 380
! 569: #define GSS_ID 381
! 570: #define GSS_ID_ENC 382
! 571: #define GSS_ID_ENCTYPE 383
! 572: #define COMPLEX_BUNDLE 384
! 573: #define DPD 385
! 574: #define DPD_DELAY 386
! 575: #define DPD_RETRY 387
! 576: #define DPD_MAXFAIL 388
! 577: #define PH1ID 389
! 578: #define XAUTH_LOGIN 390
! 579: #define WEAK_PHASE1_CHECK 391
! 580: #define REKEY 392
! 581: #define PREFIX 393
! 582: #define PORT 394
! 583: #define PORTANY 395
! 584: #define UL_PROTO 396
! 585: #define ANY 397
! 586: #define IKE_FRAG 398
! 587: #define ESP_FRAG 399
! 588: #define MODE_CFG 400
! 589: #define PFS_GROUP 401
! 590: #define LIFETIME 402
! 591: #define LIFETYPE_TIME 403
! 592: #define LIFETYPE_BYTE 404
! 593: #define STRENGTH 405
! 594: #define REMOTEID 406
! 595: #define SCRIPT 407
! 596: #define PHASE1_UP 408
! 597: #define PHASE1_DOWN 409
! 598: #define PHASE1_DEAD 410
! 599: #define NUMBER 411
! 600: #define SWITCH 412
! 601: #define BOOLEAN 413
! 602: #define HEXSTRING 414
! 603: #define QUOTEDSTRING 415
! 604: #define ADDRSTRING 416
! 605: #define ADDRRANGE 417
! 606: #define UNITTYPE_BYTE 418
! 607: #define UNITTYPE_KBYTES 419
! 608: #define UNITTYPE_MBYTES 420
! 609: #define UNITTYPE_TBYTES 421
! 610: #define UNITTYPE_SEC 422
! 611: #define UNITTYPE_MIN 423
! 612: #define UNITTYPE_HOUR 424
! 613: #define EOS 425
! 614: #define BOC 426
! 615: #define EOC 427
! 616: #define COMMA 428
! 617:
! 618:
! 619:
! 620:
! 621: #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
! 622: typedef union YYSTYPE
! 623: {
! 624:
! 625: /* Line 214 of yacc.c */
! 626: #line 177 "cfparse.y"
! 627:
! 628: unsigned long num;
! 629: vchar_t *val;
! 630: struct remoteconf *rmconf;
! 631: struct sockaddr *saddr;
! 632: struct sainfoalg *alg;
! 633:
! 634:
! 635:
! 636: /* Line 214 of yacc.c */
! 637: #line 638 "cfparse.c"
! 638: } YYSTYPE;
! 639: # define YYSTYPE_IS_TRIVIAL 1
! 640: # define yystype YYSTYPE /* obsolescent; will be withdrawn */
! 641: # define YYSTYPE_IS_DECLARED 1
! 642: #endif
! 643:
! 644:
! 645: /* Copy the second part of user declarations. */
! 646:
! 647:
! 648: /* Line 264 of yacc.c */
! 649: #line 650 "cfparse.c"
! 650:
! 651: #ifdef short
! 652: # undef short
! 653: #endif
! 654:
! 655: #ifdef YYTYPE_UINT8
! 656: typedef YYTYPE_UINT8 yytype_uint8;
! 657: #else
! 658: typedef unsigned char yytype_uint8;
! 659: #endif
! 660:
! 661: #ifdef YYTYPE_INT8
! 662: typedef YYTYPE_INT8 yytype_int8;
! 663: #elif (defined __STDC__ || defined __C99__FUNC__ \
! 664: || defined __cplusplus || defined _MSC_VER)
! 665: typedef signed char yytype_int8;
! 666: #else
! 667: typedef short int yytype_int8;
! 668: #endif
! 669:
! 670: #ifdef YYTYPE_UINT16
! 671: typedef YYTYPE_UINT16 yytype_uint16;
! 672: #else
! 673: typedef unsigned short int yytype_uint16;
! 674: #endif
! 675:
! 676: #ifdef YYTYPE_INT16
! 677: typedef YYTYPE_INT16 yytype_int16;
! 678: #else
! 679: typedef short int yytype_int16;
! 680: #endif
! 681:
! 682: #ifndef YYSIZE_T
! 683: # ifdef __SIZE_TYPE__
! 684: # define YYSIZE_T __SIZE_TYPE__
! 685: # elif defined size_t
! 686: # define YYSIZE_T size_t
! 687: # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
! 688: || defined __cplusplus || defined _MSC_VER)
! 689: # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
! 690: # define YYSIZE_T size_t
! 691: # else
! 692: # define YYSIZE_T unsigned int
! 693: # endif
! 694: #endif
! 695:
! 696: #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
! 697:
! 698: #ifndef YY_
! 699: # if YYENABLE_NLS
! 700: # if ENABLE_NLS
! 701: # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
! 702: # define YY_(msgid) dgettext ("bison-runtime", msgid)
! 703: # endif
! 704: # endif
! 705: # ifndef YY_
! 706: # define YY_(msgid) msgid
! 707: # endif
! 708: #endif
! 709:
! 710: /* Suppress unused-variable warnings by "using" E. */
! 711: #if ! defined lint || defined __GNUC__
! 712: # define YYUSE(e) ((void) (e))
! 713: #else
! 714: # define YYUSE(e) /* empty */
! 715: #endif
! 716:
! 717: /* Identity function, used to suppress warnings about constant conditions. */
! 718: #ifndef lint
! 719: # define YYID(n) (n)
! 720: #else
! 721: #if (defined __STDC__ || defined __C99__FUNC__ \
! 722: || defined __cplusplus || defined _MSC_VER)
! 723: static int
! 724: YYID (int yyi)
! 725: #else
! 726: static int
! 727: YYID (yyi)
! 728: int yyi;
! 729: #endif
! 730: {
! 731: return yyi;
! 732: }
! 733: #endif
! 734:
! 735: #if ! defined yyoverflow || YYERROR_VERBOSE
! 736:
! 737: /* The parser invokes alloca or malloc; define the necessary symbols. */
! 738:
! 739: # ifdef YYSTACK_USE_ALLOCA
! 740: # if YYSTACK_USE_ALLOCA
! 741: # ifdef __GNUC__
! 742: # define YYSTACK_ALLOC __builtin_alloca
! 743: # elif defined __BUILTIN_VA_ARG_INCR
! 744: # include <alloca.h> /* INFRINGES ON USER NAME SPACE */
! 745: # elif defined _AIX
! 746: # define YYSTACK_ALLOC __alloca
! 747: # elif defined _MSC_VER
! 748: # include <malloc.h> /* INFRINGES ON USER NAME SPACE */
! 749: # define alloca _alloca
! 750: # else
! 751: # define YYSTACK_ALLOC alloca
! 752: # if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
! 753: || defined __cplusplus || defined _MSC_VER)
! 754: # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
! 755: # ifndef _STDLIB_H
! 756: # define _STDLIB_H 1
! 757: # endif
! 758: # endif
! 759: # endif
! 760: # endif
! 761: # endif
! 762:
! 763: # ifdef YYSTACK_ALLOC
! 764: /* Pacify GCC's `empty if-body' warning. */
! 765: # define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
! 766: # ifndef YYSTACK_ALLOC_MAXIMUM
! 767: /* The OS might guarantee only one guard page at the bottom of the stack,
! 768: and a page size can be as small as 4096 bytes. So we cannot safely
! 769: invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
! 770: to allow for a few compiler-allocated temporary stack slots. */
! 771: # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
! 772: # endif
! 773: # else
! 774: # define YYSTACK_ALLOC YYMALLOC
! 775: # define YYSTACK_FREE YYFREE
! 776: # ifndef YYSTACK_ALLOC_MAXIMUM
! 777: # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
! 778: # endif
! 779: # if (defined __cplusplus && ! defined _STDLIB_H \
! 780: && ! ((defined YYMALLOC || defined malloc) \
! 781: && (defined YYFREE || defined free)))
! 782: # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
! 783: # ifndef _STDLIB_H
! 784: # define _STDLIB_H 1
! 785: # endif
! 786: # endif
! 787: # ifndef YYMALLOC
! 788: # define YYMALLOC malloc
! 789: # if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
! 790: || defined __cplusplus || defined _MSC_VER)
! 791: void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
! 792: # endif
! 793: # endif
! 794: # ifndef YYFREE
! 795: # define YYFREE free
! 796: # if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
! 797: || defined __cplusplus || defined _MSC_VER)
! 798: void free (void *); /* INFRINGES ON USER NAME SPACE */
! 799: # endif
! 800: # endif
! 801: # endif
! 802: #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
! 803:
! 804:
! 805: #if (! defined yyoverflow \
! 806: && (! defined __cplusplus \
! 807: || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
! 808:
! 809: /* A type that is properly aligned for any stack member. */
! 810: union yyalloc
! 811: {
! 812: yytype_int16 yyss_alloc;
! 813: YYSTYPE yyvs_alloc;
! 814: };
! 815:
! 816: /* The size of the maximum gap between one aligned stack and the next. */
! 817: # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
! 818:
! 819: /* The size of an array large to enough to hold all stacks, each with
! 820: N elements. */
! 821: # define YYSTACK_BYTES(N) \
! 822: ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
! 823: + YYSTACK_GAP_MAXIMUM)
! 824:
! 825: /* Copy COUNT objects from FROM to TO. The source and destination do
! 826: not overlap. */
! 827: # ifndef YYCOPY
! 828: # if defined __GNUC__ && 1 < __GNUC__
! 829: # define YYCOPY(To, From, Count) \
! 830: __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
! 831: # else
! 832: # define YYCOPY(To, From, Count) \
! 833: do \
! 834: { \
! 835: YYSIZE_T yyi; \
! 836: for (yyi = 0; yyi < (Count); yyi++) \
! 837: (To)[yyi] = (From)[yyi]; \
! 838: } \
! 839: while (YYID (0))
! 840: # endif
! 841: # endif
! 842:
! 843: /* Relocate STACK from its old location to the new one. The
! 844: local variables YYSIZE and YYSTACKSIZE give the old and new number of
! 845: elements in the stack, and YYPTR gives the new location of the
! 846: stack. Advance YYPTR to a properly aligned location for the next
! 847: stack. */
! 848: # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
! 849: do \
! 850: { \
! 851: YYSIZE_T yynewbytes; \
! 852: YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
! 853: Stack = &yyptr->Stack_alloc; \
! 854: yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
! 855: yyptr += yynewbytes / sizeof (*yyptr); \
! 856: } \
! 857: while (YYID (0))
! 858:
! 859: #endif
! 860:
! 861: /* YYFINAL -- State number of the termination state. */
! 862: #define YYFINAL 2
! 863: /* YYLAST -- Last index in YYTABLE. */
! 864: #define YYLAST 548
! 865:
! 866: /* YYNTOKENS -- Number of terminals. */
! 867: #define YYNTOKENS 174
! 868: /* YYNNTS -- Number of nonterminals. */
! 869: #define YYNNTS 203
! 870: /* YYNRULES -- Number of rules. */
! 871: #define YYNRULES 379
! 872: /* YYNRULES -- Number of states. */
! 873: #define YYNSTATES 689
! 874:
! 875: /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
! 876: #define YYUNDEFTOK 2
! 877: #define YYMAXUTOK 428
! 878:
! 879: #define YYTRANSLATE(YYX) \
! 880: ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
! 881:
! 882: /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
! 883: static const yytype_uint8 yytranslate[] =
! 884: {
! 885: 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
! 886: 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
! 887: 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
! 888: 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
! 889: 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
! 890: 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
! 891: 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
! 892: 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
! 893: 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
! 894: 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
! 895: 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
! 896: 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
! 897: 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
! 898: 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
! 899: 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
! 900: 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
! 901: 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
! 902: 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
! 903: 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
! 904: 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
! 905: 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
! 906: 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
! 907: 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
! 908: 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
! 909: 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
! 910: 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
! 911: 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
! 912: 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
! 913: 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
! 914: 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
! 915: 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
! 916: 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
! 917: 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
! 918: 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
! 919: 85, 86, 87, 88, 89, 90, 91, 92, 93, 94,
! 920: 95, 96, 97, 98, 99, 100, 101, 102, 103, 104,
! 921: 105, 106, 107, 108, 109, 110, 111, 112, 113, 114,
! 922: 115, 116, 117, 118, 119, 120, 121, 122, 123, 124,
! 923: 125, 126, 127, 128, 129, 130, 131, 132, 133, 134,
! 924: 135, 136, 137, 138, 139, 140, 141, 142, 143, 144,
! 925: 145, 146, 147, 148, 149, 150, 151, 152, 153, 154,
! 926: 155, 156, 157, 158, 159, 160, 161, 162, 163, 164,
! 927: 165, 166, 167, 168, 169, 170, 171, 172, 173
! 928: };
! 929:
! 930: #if YYDEBUG
! 931: /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
! 932: YYRHS. */
! 933: static const yytype_uint16 yyprhs[] =
! 934: {
! 935: 0, 0, 3, 4, 7, 9, 11, 13, 15, 17,
! 936: 19, 21, 23, 25, 27, 29, 31, 33, 35, 37,
! 937: 42, 43, 46, 47, 52, 53, 58, 59, 64, 65,
! 938: 70, 71, 76, 77, 83, 84, 89, 93, 97, 101,
! 939: 105, 107, 112, 113, 116, 117, 122, 123, 128, 129,
! 940: 134, 135, 140, 141, 146, 151, 152, 155, 156, 161,
! 941: 162, 167, 168, 176, 177, 182, 183, 188, 189, 193,
! 942: 196, 197, 199, 200, 206, 207, 210, 211, 217, 218,
! 943: 225, 226, 232, 233, 240, 241, 246, 247, 252, 253,
! 944: 259, 260, 263, 264, 269, 270, 275, 276, 281, 282,
! 945: 287, 288, 293, 294, 299, 300, 305, 306, 311, 312,
! 946: 317, 318, 323, 324, 329, 330, 335, 340, 341, 344,
! 947: 345, 350, 351, 356, 360, 364, 365, 371, 372, 378,
! 948: 379, 384, 385, 390, 391, 396, 397, 402, 403, 408,
! 949: 409, 414, 415, 420, 421, 426, 427, 432, 433, 438,
! 950: 439, 444, 445, 450, 451, 456, 457, 462, 463, 468,
! 951: 469, 474, 475, 480, 481, 486, 487, 492, 493, 498,
! 952: 499, 504, 506, 510, 512, 514, 518, 520, 522, 526,
! 953: 529, 531, 535, 537, 539, 543, 545, 550, 551, 554,
! 954: 555, 560, 561, 567, 568, 573, 574, 580, 581, 587,
! 955: 588, 594, 595, 596, 605, 607, 610, 613, 616, 619,
! 956: 622, 628, 635, 638, 639, 643, 646, 647, 650, 651,
! 957: 656, 657, 662, 663, 670, 671, 678, 679, 684, 686,
! 958: 687, 692, 695, 696, 698, 699, 701, 703, 705, 707,
! 959: 709, 710, 712, 713, 720, 721, 726, 727, 734, 735,
! 960: 740, 744, 747, 749, 750, 753, 754, 759, 760, 765,
! 961: 766, 771, 772, 777, 780, 781, 786, 787, 793, 794,
! 962: 800, 801, 806, 807, 813, 814, 819, 820, 825, 826,
! 963: 831, 832, 837, 838, 844, 845, 852, 853, 858, 859,
! 964: 865, 866, 873, 874, 879, 880, 885, 886, 891, 892,
! 965: 897, 898, 903, 904, 909, 910, 915, 916, 922, 923,
! 966: 929, 930, 936, 937, 942, 943, 948, 949, 954, 955,
! 967: 960, 961, 966, 967, 972, 973, 978, 979, 984, 985,
! 968: 990, 991, 996, 997, 1002, 1003, 1008, 1009, 1014, 1015,
! 969: 1020, 1021, 1026, 1027, 1034, 1035, 1040, 1041, 1048, 1049,
! 970: 1055, 1056, 1059, 1060, 1066, 1067, 1072, 1074, 1076, 1077,
! 971: 1079, 1081, 1082, 1085, 1086, 1093, 1094, 1101, 1102, 1107,
! 972: 1108, 1113, 1114, 1120, 1122, 1124, 1126, 1128, 1130, 1132
! 973: };
! 974:
! 975: /* YYRHS -- A `-1'-separated list of the rules' RHS. */
! 976: static const yytype_int16 yyrhs[] =
! 977: {
! 978: 175, 0, -1, -1, 175, 176, -1, 177, -1, 185,
! 979: -1, 189, -1, 190, -1, 191, -1, 192, -1, 194,
! 980: -1, 202, -1, 223, -1, 213, -1, 239, -1, 277,
! 981: -1, 286, -1, 306, -1, 187, -1, 3, 171, 178,
! 982: 172, -1, -1, 178, 179, -1, -1, 4, 160, 180,
! 983: 170, -1, -1, 4, 156, 181, 170, -1, -1, 5,
! 984: 160, 182, 170, -1, -1, 5, 156, 183, 170, -1,
! 985: -1, 6, 160, 184, 170, -1, -1, 7, 8, 160,
! 986: 186, 170, -1, -1, 129, 157, 188, 170, -1, 9,
! 987: 160, 170, -1, 10, 156, 170, -1, 127, 128, 170,
! 988: -1, 11, 193, 170, -1, 12, -1, 13, 171, 195,
! 989: 172, -1, -1, 195, 196, -1, -1, 14, 157, 197,
! 990: 170, -1, -1, 15, 157, 198, 170, -1, -1, 16,
! 991: 156, 199, 170, -1, -1, 17, 157, 200, 170, -1,
! 992: -1, 18, 157, 201, 170, -1, 19, 171, 203, 172,
! 993: -1, -1, 203, 204, -1, -1, 20, 211, 205, 170,
! 994: -1, -1, 21, 211, 206, 170, -1, -1, 24, 160,
! 995: 160, 160, 156, 207, 170, -1, -1, 24, 160, 208,
! 996: 170, -1, -1, 24, 25, 209, 170, -1, -1, 23,
! 997: 210, 170, -1, 161, 212, -1, -1, 139, -1, -1,
! 998: 39, 214, 171, 215, 172, -1, -1, 215, 216, -1,
! 999: -1, 40, 160, 160, 217, 170, -1, -1, 40, 160,
! 1000: 156, 160, 218, 170, -1, -1, 41, 160, 160, 219,
! 1001: 170, -1, -1, 41, 160, 156, 160, 220, 170, -1,
! 1002: -1, 42, 156, 221, 170, -1, -1, 43, 156, 222,
! 1003: 170, -1, -1, 26, 224, 171, 225, 172, -1, -1,
! 1004: 225, 226, -1, -1, 29, 156, 227, 170, -1, -1,
! 1005: 27, 160, 228, 170, -1, -1, 28, 156, 229, 170,
! 1006: -1, -1, 30, 160, 230, 170, -1, -1, 33, 157,
! 1007: 231, 170, -1, -1, 31, 160, 232, 170, -1, -1,
! 1008: 32, 160, 233, 170, -1, -1, 34, 160, 234, 170,
! 1009: -1, -1, 35, 160, 235, 170, -1, -1, 36, 160,
! 1010: 236, 170, -1, -1, 37, 160, 237, 170, -1, -1,
! 1011: 38, 160, 238, 170, -1, 44, 171, 240, 172, -1,
! 1012: -1, 240, 241, -1, -1, 45, 161, 242, 170, -1,
! 1013: -1, 46, 161, 243, 170, -1, 47, 267, 170, -1,
! 1014: 48, 269, 170, -1, -1, 64, 65, 271, 244, 170,
! 1015: -1, -1, 64, 66, 271, 245, 170, -1, -1, 67,
! 1016: 275, 246, 170, -1, -1, 49, 160, 247, 170, -1,
! 1017: -1, 50, 52, 248, 170, -1, -1, 50, 53, 249,
! 1018: 170, -1, -1, 50, 54, 250, 170, -1, -1, 50,
! 1019: 55, 251, 170, -1, -1, 51, 273, 252, 170, -1,
! 1020: -1, 58, 52, 253, 170, -1, -1, 58, 55, 254,
! 1021: 170, -1, -1, 59, 57, 255, 170, -1, -1, 59,
! 1022: 52, 256, 170, -1, -1, 59, 53, 257, 170, -1,
! 1023: -1, 59, 54, 258, 170, -1, -1, 62, 156, 259,
! 1024: 170, -1, -1, 68, 156, 260, 170, -1, -1, 69,
! 1025: 157, 261, 170, -1, -1, 63, 156, 262, 170, -1,
! 1026: -1, 60, 56, 263, 170, -1, -1, 60, 53, 264,
! 1027: 170, -1, -1, 60, 55, 265, 170, -1, -1, 61,
! 1028: 160, 266, 170, -1, 268, -1, 268, 173, 267, -1,
! 1029: 161, -1, 270, -1, 270, 173, 269, -1, 161, -1,
! 1030: 272, -1, 271, 173, 272, -1, 161, 138, -1, 274,
! 1031: -1, 274, 173, 273, -1, 160, -1, 276, -1, 276,
! 1032: 173, 275, -1, 160, -1, 70, 171, 278, 172, -1,
! 1033: -1, 278, 279, -1, -1, 71, 156, 280, 170, -1,
! 1034: -1, 72, 156, 375, 281, 170, -1, -1, 73, 156,
! 1035: 282, 170, -1, -1, 74, 156, 375, 283, 170, -1,
! 1036: -1, 75, 156, 375, 284, 170, -1, -1, 76, 156,
! 1037: 375, 285, 170, -1, -1, -1, 80, 287, 289, 291,
! 1038: 171, 292, 288, 172, -1, 83, -1, 83, 84, -1,
! 1039: 83, 290, -1, 290, 83, -1, 290, 84, -1, 290,
! 1040: 290, -1, 101, 161, 302, 303, 304, -1, 101, 161,
! 1041: 162, 302, 303, 304, -1, 101, 160, -1, -1, 81,
! 1042: 101, 367, -1, 5, 160, -1, -1, 292, 293, -1,
! 1043: -1, 146, 366, 294, 170, -1, -1, 151, 156, 295,
! 1044: 170, -1, -1, 147, 148, 156, 375, 296, 170, -1,
! 1045: -1, 147, 149, 156, 376, 297, 170, -1, -1, 77,
! 1046: 298, 299, 170, -1, 301, -1, -1, 301, 300, 173,
! 1047: 299, -1, 78, 305, -1, -1, 138, -1, -1, 139,
! 1048: -1, 140, -1, 156, -1, 141, -1, 142, -1, -1,
! 1049: 156, -1, -1, 82, 160, 85, 160, 307, 311, -1,
! 1050: -1, 82, 160, 308, 311, -1, -1, 82, 312, 85,
! 1051: 312, 309, 311, -1, -1, 82, 312, 310, 311, -1,
! 1052: 171, 313, 172, -1, 83, 212, -1, 211, -1, -1,
! 1053: 313, 314, -1, -1, 86, 211, 315, 170, -1, -1,
! 1054: 87, 316, 362, 170, -1, -1, 89, 90, 317, 170,
! 1055: -1, -1, 91, 92, 318, 170, -1, 93, 363, -1,
! 1056: -1, 95, 160, 319, 170, -1, -1, 95, 107, 160,
! 1057: 320, 170, -1, -1, 95, 108, 160, 321, 170, -1,
! 1058: -1, 95, 106, 322, 170, -1, -1, 96, 107, 160,
! 1059: 323, 170, -1, -1, 97, 157, 324, 170, -1, -1,
! 1060: 98, 157, 325, 170, -1, -1, 99, 157, 326, 170,
! 1061: -1, -1, 100, 157, 327, 170, -1, -1, 103, 101,
! 1062: 367, 328, 170, -1, -1, 103, 101, 102, 367, 329,
! 1063: 170, -1, -1, 135, 367, 330, 170, -1, -1, 104,
! 1064: 101, 367, 331, 170, -1, -1, 104, 101, 102, 367,
! 1065: 332, 170, -1, -1, 105, 157, 333, 170, -1, -1,
! 1066: 109, 156, 334, 170, -1, -1, 110, 335, 366, 170,
! 1067: -1, -1, 112, 157, 336, 170, -1, -1, 143, 157,
! 1068: 337, 170, -1, -1, 143, 115, 338, 170, -1, -1,
! 1069: 144, 156, 339, 170, -1, -1, 152, 160, 153, 340,
! 1070: 170, -1, -1, 152, 160, 154, 341, 170, -1, -1,
! 1071: 152, 160, 155, 342, 170, -1, -1, 145, 157, 343,
! 1072: 170, -1, -1, 136, 157, 344, 170, -1, -1, 118,
! 1073: 157, 345, 170, -1, -1, 118, 119, 346, 170, -1,
! 1074: -1, 120, 157, 347, 170, -1, -1, 113, 157, 348,
! 1075: 170, -1, -1, 114, 157, 349, 170, -1, -1, 114,
! 1076: 115, 350, 170, -1, -1, 130, 157, 351, 170, -1,
! 1077: -1, 131, 156, 352, 170, -1, -1, 132, 156, 353,
! 1078: 170, -1, -1, 133, 156, 354, 170, -1, -1, 137,
! 1079: 157, 355, 170, -1, -1, 137, 115, 356, 170, -1,
! 1080: -1, 134, 156, 357, 170, -1, -1, 147, 148, 156,
! 1081: 375, 358, 170, -1, -1, 116, 117, 359, 170, -1,
! 1082: -1, 147, 149, 156, 376, 360, 170, -1, -1, 121,
! 1083: 361, 171, 368, 172, -1, -1, 362, 88, -1, -1,
! 1084: 107, 160, 160, 364, 170, -1, -1, 108, 160, 365,
! 1085: 170, -1, 78, -1, 156, -1, -1, 161, -1, 160,
! 1086: -1, -1, 368, 369, -1, -1, 147, 148, 156, 375,
! 1087: 370, 170, -1, -1, 147, 149, 156, 376, 371, 170,
! 1088: -1, -1, 110, 366, 372, 170, -1, -1, 126, 160,
! 1089: 373, 170, -1, -1, 77, 78, 305, 374, 170, -1,
! 1090: 167, -1, 168, -1, 169, -1, 163, -1, 164, -1,
! 1091: 165, -1, 166, -1
! 1092: };
! 1093:
! 1094: /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
! 1095: static const yytype_uint16 yyrline[] =
! 1096: {
! 1097: 0, 266, 266, 268, 271, 272, 273, 274, 275, 276,
! 1098: 277, 278, 279, 280, 281, 282, 283, 284, 285, 290,
! 1099: 292, 294, 298, 297, 308, 308, 310, 309, 320, 320,
! 1100: 321, 321, 327, 326, 347, 347, 352, 366, 373, 385,
! 1101: 388, 402, 404, 406, 409, 409, 410, 410, 411, 411,
! 1102: 412, 412, 413, 413, 418, 420, 422, 426, 425, 432,
! 1103: 431, 443, 442, 452, 451, 461, 460, 469, 469, 472,
! 1104: 484, 485, 490, 490, 507, 509, 513, 512, 531, 530,
! 1105: 549, 548, 567, 566, 585, 584, 594, 593, 606, 606,
! 1106: 617, 619, 623, 622, 634, 633, 645, 644, 654, 653,
! 1107: 665, 664, 674, 673, 685, 684, 696, 695, 707, 706,
! 1108: 718, 717, 729, 728, 740, 739, 754, 756, 758, 762,
! 1109: 761, 773, 772, 783, 785, 788, 787, 797, 796, 806,
! 1110: 805, 813, 812, 825, 824, 834, 833, 847, 846, 860,
! 1111: 859, 873, 872, 880, 879, 889, 888, 902, 901, 911,
! 1112: 910, 920, 919, 933, 932, 946, 945, 956, 955, 965,
! 1113: 964, 974, 973, 983, 982, 992, 991, 1005, 1004, 1018,
! 1114: 1017, 1031, 1032, 1035, 1052, 1053, 1056, 1073, 1074, 1077,
! 1115: 1100, 1101, 1104, 1138, 1139, 1142, 1179, 1181, 1183, 1187,
! 1116: 1186, 1192, 1191, 1197, 1196, 1202, 1201, 1207, 1206, 1212,
! 1117: 1211, 1228, 1236, 1227, 1275, 1280, 1285, 1290, 1295, 1300,
! 1118: 1307, 1356, 1421, 1450, 1453, 1478, 1491, 1493, 1497, 1496,
! 1119: 1502, 1501, 1507, 1506, 1512, 1511, 1523, 1523, 1530, 1535,
! 1120: 1534, 1541, 1597, 1598, 1601, 1602, 1603, 1606, 1607, 1608,
! 1121: 1611, 1612, 1618, 1617, 1648, 1647, 1668, 1667, 1691, 1690,
! 1122: 1707, 1784, 1790, 1799, 1801, 1805, 1804, 1814, 1813, 1818,
! 1123: 1818, 1819, 1819, 1820, 1822, 1821, 1842, 1841, 1859, 1858,
! 1124: 1889, 1888, 1903, 1902, 1919, 1919, 1920, 1920, 1921, 1921,
! 1125: 1922, 1922, 1924, 1923, 1933, 1932, 1942, 1941, 1959, 1958,
! 1126: 1976, 1975, 1992, 1992, 1993, 1993, 1995, 1994, 2000, 2000,
! 1127: 2001, 2001, 2002, 2002, 2003, 2003, 2013, 2013, 2020, 2020,
! 1128: 2027, 2027, 2034, 2034, 2035, 2035, 2038, 2038, 2039, 2039,
! 1129: 2040, 2040, 2041, 2041, 2043, 2042, 2054, 2053, 2065, 2064,
! 1130: 2073, 2072, 2082, 2081, 2091, 2090, 2099, 2099, 2100, 2100,
! 1131: 2102, 2101, 2107, 2106, 2111, 2111, 2113, 2112, 2127, 2126,
! 1132: 2137, 2139, 2163, 2162, 2184, 2183, 2217, 2225, 2237, 2238,
! 1133: 2239, 2241, 2243, 2247, 2246, 2252, 2251, 2264, 2263, 2269,
! 1134: 2268, 2282, 2281, 2379, 2380, 2381, 2384, 2385, 2386, 2387
! 1135: };
! 1136: #endif
! 1137:
! 1138: #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
! 1139: /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
! 1140: First, the terminals, then, starting at YYNTOKENS, nonterminals. */
! 1141: static const char *const yytname[] =
! 1142: {
! 1143: "$end", "error", "$undefined", "PRIVSEP", "USER", "GROUP", "CHROOT",
! 1144: "PATH", "PATHTYPE", "INCLUDE", "PFKEY_BUFFER", "LOGGING", "LOGLEV",
! 1145: "PADDING", "PAD_RANDOMIZE", "PAD_RANDOMIZELEN", "PAD_MAXLEN",
! 1146: "PAD_STRICT", "PAD_EXCLTAIL", "LISTEN", "X_ISAKMP", "X_ISAKMP_NATT",
! 1147: "X_ADMIN", "STRICT_ADDRESS", "ADMINSOCK", "DISABLED", "LDAPCFG",
! 1148: "LDAP_HOST", "LDAP_PORT", "LDAP_PVER", "LDAP_BASE", "LDAP_BIND_DN",
! 1149: "LDAP_BIND_PW", "LDAP_SUBTREE", "LDAP_ATTR_USER", "LDAP_ATTR_ADDR",
! 1150: "LDAP_ATTR_MASK", "LDAP_ATTR_GROUP", "LDAP_ATTR_MEMBER", "RADCFG",
! 1151: "RAD_AUTH", "RAD_ACCT", "RAD_TIMEOUT", "RAD_RETRIES", "MODECFG",
! 1152: "CFG_NET4", "CFG_MASK4", "CFG_DNS4", "CFG_NBNS4", "CFG_DEFAULT_DOMAIN",
! 1153: "CFG_AUTH_SOURCE", "CFG_AUTH_GROUPS", "CFG_SYSTEM", "CFG_RADIUS",
! 1154: "CFG_PAM", "CFG_LDAP", "CFG_LOCAL", "CFG_NONE", "CFG_GROUP_SOURCE",
! 1155: "CFG_ACCOUNTING", "CFG_CONF_SOURCE", "CFG_MOTD", "CFG_POOL_SIZE",
! 1156: "CFG_AUTH_THROTTLE", "CFG_SPLIT_NETWORK", "CFG_SPLIT_LOCAL",
! 1157: "CFG_SPLIT_INCLUDE", "CFG_SPLIT_DNS", "CFG_PFS_GROUP", "CFG_SAVE_PASSWD",
! 1158: "RETRY", "RETRY_COUNTER", "RETRY_INTERVAL", "RETRY_PERSEND",
! 1159: "RETRY_PHASE1", "RETRY_PHASE2", "NATT_KA", "ALGORITHM_CLASS",
! 1160: "ALGORITHMTYPE", "STRENGTHTYPE", "SAINFO", "FROM", "REMOTE", "ANONYMOUS",
! 1161: "CLIENTADDR", "INHERIT", "REMOTE_ADDRESS", "EXCHANGE_MODE",
! 1162: "EXCHANGETYPE", "DOI", "DOITYPE", "SITUATION", "SITUATIONTYPE",
! 1163: "CERTIFICATE_TYPE", "CERTTYPE", "PEERS_CERTFILE", "CA_TYPE",
! 1164: "VERIFY_CERT", "SEND_CERT", "SEND_CR", "MATCH_EMPTY_CR",
! 1165: "IDENTIFIERTYPE", "IDENTIFIERQUAL", "MY_IDENTIFIER", "PEERS_IDENTIFIER",
! 1166: "VERIFY_IDENTIFIER", "DNSSEC", "CERT_X509", "CERT_PLAINRSA",
! 1167: "NONCE_SIZE", "DH_GROUP", "KEEPALIVE", "PASSIVE", "INITIAL_CONTACT",
! 1168: "NAT_TRAVERSAL", "REMOTE_FORCE_LEVEL", "PROPOSAL_CHECK",
! 1169: "PROPOSAL_CHECK_LEVEL", "GENERATE_POLICY", "GENERATE_LEVEL",
! 1170: "SUPPORT_PROXY", "PROPOSAL", "EXEC_PATH", "EXEC_COMMAND", "EXEC_SUCCESS",
! 1171: "EXEC_FAILURE", "GSS_ID", "GSS_ID_ENC", "GSS_ID_ENCTYPE",
! 1172: "COMPLEX_BUNDLE", "DPD", "DPD_DELAY", "DPD_RETRY", "DPD_MAXFAIL",
! 1173: "PH1ID", "XAUTH_LOGIN", "WEAK_PHASE1_CHECK", "REKEY", "PREFIX", "PORT",
! 1174: "PORTANY", "UL_PROTO", "ANY", "IKE_FRAG", "ESP_FRAG", "MODE_CFG",
! 1175: "PFS_GROUP", "LIFETIME", "LIFETYPE_TIME", "LIFETYPE_BYTE", "STRENGTH",
! 1176: "REMOTEID", "SCRIPT", "PHASE1_UP", "PHASE1_DOWN", "PHASE1_DEAD",
! 1177: "NUMBER", "SWITCH", "BOOLEAN", "HEXSTRING", "QUOTEDSTRING", "ADDRSTRING",
! 1178: "ADDRRANGE", "UNITTYPE_BYTE", "UNITTYPE_KBYTES", "UNITTYPE_MBYTES",
! 1179: "UNITTYPE_TBYTES", "UNITTYPE_SEC", "UNITTYPE_MIN", "UNITTYPE_HOUR",
! 1180: "EOS", "BOC", "EOC", "COMMA", "$accept", "statements", "statement",
! 1181: "privsep_statement", "privsep_stmts", "privsep_stmt", "$@1", "$@2",
! 1182: "$@3", "$@4", "$@5", "path_statement", "$@6", "special_statement", "$@7",
! 1183: "include_statement", "pfkey_statement", "gssenc_statement",
! 1184: "logging_statement", "log_level", "padding_statement", "padding_stmts",
! 1185: "padding_stmt", "$@8", "$@9", "$@10", "$@11", "$@12", "listen_statement",
! 1186: "listen_stmts", "listen_stmt", "$@13", "$@14", "$@15", "$@16", "$@17",
! 1187: "$@18", "ike_addrinfo_port", "ike_port", "radcfg_statement", "$@19",
! 1188: "radcfg_stmts", "radcfg_stmt", "$@20", "$@21", "$@22", "$@23", "$@24",
! 1189: "$@25", "ldapcfg_statement", "$@26", "ldapcfg_stmts", "ldapcfg_stmt",
! 1190: "$@27", "$@28", "$@29", "$@30", "$@31", "$@32", "$@33", "$@34", "$@35",
! 1191: "$@36", "$@37", "$@38", "modecfg_statement", "modecfg_stmts",
! 1192: "modecfg_stmt", "$@39", "$@40", "$@41", "$@42", "$@43", "$@44", "$@45",
! 1193: "$@46", "$@47", "$@48", "$@49", "$@50", "$@51", "$@52", "$@53", "$@54",
! 1194: "$@55", "$@56", "$@57", "$@58", "$@59", "$@60", "$@61", "$@62", "$@63",
! 1195: "addrdnslist", "addrdns", "addrwinslist", "addrwins", "splitnetlist",
! 1196: "splitnet", "authgrouplist", "authgroup", "splitdnslist", "splitdns",
! 1197: "timer_statement", "timer_stmts", "timer_stmt", "$@64", "$@65", "$@66",
! 1198: "$@67", "$@68", "$@69", "sainfo_statement", "$@70", "$@71",
! 1199: "sainfo_name", "sainfo_id", "sainfo_param", "sainfo_specs",
! 1200: "sainfo_spec", "$@72", "$@73", "$@74", "$@75", "$@76", "algorithms",
! 1201: "$@77", "algorithm", "prefix", "port", "ul_proto", "keylength",
! 1202: "remote_statement", "$@78", "$@79", "$@80", "$@81", "remote_specs_block",
! 1203: "remote_index", "remote_specs", "remote_spec", "$@82", "$@83", "$@84",
! 1204: "$@85", "$@86", "$@87", "$@88", "$@89", "$@90", "$@91", "$@92", "$@93",
! 1205: "$@94", "$@95", "$@96", "$@97", "$@98", "$@99", "$@100", "$@101",
! 1206: "$@102", "$@103", "$@104", "$@105", "$@106", "$@107", "$@108", "$@109",
! 1207: "$@110", "$@111", "$@112", "$@113", "$@114", "$@115", "$@116", "$@117",
! 1208: "$@118", "$@119", "$@120", "$@121", "$@122", "$@123", "$@124", "$@125",
! 1209: "$@126", "$@127", "$@128", "exchange_types", "cert_spec", "$@129",
! 1210: "$@130", "dh_group_num", "identifierstring", "isakmpproposal_specs",
! 1211: "isakmpproposal_spec", "$@131", "$@132", "$@133", "$@134", "$@135",
! 1212: "unittype_time", "unittype_byte", 0
! 1213: };
! 1214: #endif
! 1215:
! 1216: # ifdef YYPRINT
! 1217: /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
! 1218: token YYLEX-NUM. */
! 1219: static const yytype_uint16 yytoknum[] =
! 1220: {
! 1221: 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
! 1222: 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
! 1223: 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
! 1224: 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
! 1225: 295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
! 1226: 305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
! 1227: 315, 316, 317, 318, 319, 320, 321, 322, 323, 324,
! 1228: 325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
! 1229: 335, 336, 337, 338, 339, 340, 341, 342, 343, 344,
! 1230: 345, 346, 347, 348, 349, 350, 351, 352, 353, 354,
! 1231: 355, 356, 357, 358, 359, 360, 361, 362, 363, 364,
! 1232: 365, 366, 367, 368, 369, 370, 371, 372, 373, 374,
! 1233: 375, 376, 377, 378, 379, 380, 381, 382, 383, 384,
! 1234: 385, 386, 387, 388, 389, 390, 391, 392, 393, 394,
! 1235: 395, 396, 397, 398, 399, 400, 401, 402, 403, 404,
! 1236: 405, 406, 407, 408, 409, 410, 411, 412, 413, 414,
! 1237: 415, 416, 417, 418, 419, 420, 421, 422, 423, 424,
! 1238: 425, 426, 427, 428
! 1239: };
! 1240: # endif
! 1241:
! 1242: /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
! 1243: static const yytype_uint16 yyr1[] =
! 1244: {
! 1245: 0, 174, 175, 175, 176, 176, 176, 176, 176, 176,
! 1246: 176, 176, 176, 176, 176, 176, 176, 176, 176, 177,
! 1247: 178, 178, 180, 179, 181, 179, 182, 179, 183, 179,
! 1248: 184, 179, 186, 185, 188, 187, 189, 190, 191, 192,
! 1249: 193, 194, 195, 195, 197, 196, 198, 196, 199, 196,
! 1250: 200, 196, 201, 196, 202, 203, 203, 205, 204, 206,
! 1251: 204, 207, 204, 208, 204, 209, 204, 210, 204, 211,
! 1252: 212, 212, 214, 213, 215, 215, 217, 216, 218, 216,
! 1253: 219, 216, 220, 216, 221, 216, 222, 216, 224, 223,
! 1254: 225, 225, 227, 226, 228, 226, 229, 226, 230, 226,
! 1255: 231, 226, 232, 226, 233, 226, 234, 226, 235, 226,
! 1256: 236, 226, 237, 226, 238, 226, 239, 240, 240, 242,
! 1257: 241, 243, 241, 241, 241, 244, 241, 245, 241, 246,
! 1258: 241, 247, 241, 248, 241, 249, 241, 250, 241, 251,
! 1259: 241, 252, 241, 253, 241, 254, 241, 255, 241, 256,
! 1260: 241, 257, 241, 258, 241, 259, 241, 260, 241, 261,
! 1261: 241, 262, 241, 263, 241, 264, 241, 265, 241, 266,
! 1262: 241, 267, 267, 268, 269, 269, 270, 271, 271, 272,
! 1263: 273, 273, 274, 275, 275, 276, 277, 278, 278, 280,
! 1264: 279, 281, 279, 282, 279, 283, 279, 284, 279, 285,
! 1265: 279, 287, 288, 286, 289, 289, 289, 289, 289, 289,
! 1266: 290, 290, 290, 291, 291, 291, 292, 292, 294, 293,
! 1267: 295, 293, 296, 293, 297, 293, 298, 293, 299, 300,
! 1268: 299, 301, 302, 302, 303, 303, 303, 304, 304, 304,
! 1269: 305, 305, 307, 306, 308, 306, 309, 306, 310, 306,
! 1270: 311, 312, 312, 313, 313, 315, 314, 316, 314, 317,
! 1271: 314, 318, 314, 314, 319, 314, 320, 314, 321, 314,
! 1272: 322, 314, 323, 314, 324, 314, 325, 314, 326, 314,
! 1273: 327, 314, 328, 314, 329, 314, 330, 314, 331, 314,
! 1274: 332, 314, 333, 314, 334, 314, 335, 314, 336, 314,
! 1275: 337, 314, 338, 314, 339, 314, 340, 314, 341, 314,
! 1276: 342, 314, 343, 314, 344, 314, 345, 314, 346, 314,
! 1277: 347, 314, 348, 314, 349, 314, 350, 314, 351, 314,
! 1278: 352, 314, 353, 314, 354, 314, 355, 314, 356, 314,
! 1279: 357, 314, 358, 314, 359, 314, 360, 314, 361, 314,
! 1280: 362, 362, 364, 363, 365, 363, 366, 366, 367, 367,
! 1281: 367, 368, 368, 370, 369, 371, 369, 372, 369, 373,
! 1282: 369, 374, 369, 375, 375, 375, 376, 376, 376, 376
! 1283: };
! 1284:
! 1285: /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
! 1286: static const yytype_uint8 yyr2[] =
! 1287: {
! 1288: 0, 2, 0, 2, 1, 1, 1, 1, 1, 1,
! 1289: 1, 1, 1, 1, 1, 1, 1, 1, 1, 4,
! 1290: 0, 2, 0, 4, 0, 4, 0, 4, 0, 4,
! 1291: 0, 4, 0, 5, 0, 4, 3, 3, 3, 3,
! 1292: 1, 4, 0, 2, 0, 4, 0, 4, 0, 4,
! 1293: 0, 4, 0, 4, 4, 0, 2, 0, 4, 0,
! 1294: 4, 0, 7, 0, 4, 0, 4, 0, 3, 2,
! 1295: 0, 1, 0, 5, 0, 2, 0, 5, 0, 6,
! 1296: 0, 5, 0, 6, 0, 4, 0, 4, 0, 5,
! 1297: 0, 2, 0, 4, 0, 4, 0, 4, 0, 4,
! 1298: 0, 4, 0, 4, 0, 4, 0, 4, 0, 4,
! 1299: 0, 4, 0, 4, 0, 4, 4, 0, 2, 0,
! 1300: 4, 0, 4, 3, 3, 0, 5, 0, 5, 0,
! 1301: 4, 0, 4, 0, 4, 0, 4, 0, 4, 0,
! 1302: 4, 0, 4, 0, 4, 0, 4, 0, 4, 0,
! 1303: 4, 0, 4, 0, 4, 0, 4, 0, 4, 0,
! 1304: 4, 0, 4, 0, 4, 0, 4, 0, 4, 0,
! 1305: 4, 1, 3, 1, 1, 3, 1, 1, 3, 2,
! 1306: 1, 3, 1, 1, 3, 1, 4, 0, 2, 0,
! 1307: 4, 0, 5, 0, 4, 0, 5, 0, 5, 0,
! 1308: 5, 0, 0, 8, 1, 2, 2, 2, 2, 2,
! 1309: 5, 6, 2, 0, 3, 2, 0, 2, 0, 4,
! 1310: 0, 4, 0, 6, 0, 6, 0, 4, 1, 0,
! 1311: 4, 2, 0, 1, 0, 1, 1, 1, 1, 1,
! 1312: 0, 1, 0, 6, 0, 4, 0, 6, 0, 4,
! 1313: 3, 2, 1, 0, 2, 0, 4, 0, 4, 0,
! 1314: 4, 0, 4, 2, 0, 4, 0, 5, 0, 5,
! 1315: 0, 4, 0, 5, 0, 4, 0, 4, 0, 4,
! 1316: 0, 4, 0, 5, 0, 6, 0, 4, 0, 5,
! 1317: 0, 6, 0, 4, 0, 4, 0, 4, 0, 4,
! 1318: 0, 4, 0, 4, 0, 4, 0, 5, 0, 5,
! 1319: 0, 5, 0, 4, 0, 4, 0, 4, 0, 4,
! 1320: 0, 4, 0, 4, 0, 4, 0, 4, 0, 4,
! 1321: 0, 4, 0, 4, 0, 4, 0, 4, 0, 4,
! 1322: 0, 4, 0, 6, 0, 4, 0, 6, 0, 5,
! 1323: 0, 2, 0, 5, 0, 4, 1, 1, 0, 1,
! 1324: 1, 0, 2, 0, 6, 0, 6, 0, 4, 0,
! 1325: 4, 0, 5, 1, 1, 1, 1, 1, 1, 1
! 1326: };
! 1327:
! 1328: /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
! 1329: STATE-NUM when YYTABLE doesn't specify something else to do. Zero
! 1330: means the default is an error. */
! 1331: static const yytype_uint16 yydefact[] =
! 1332: {
! 1333: 2, 0, 1, 0, 0, 0, 0, 0, 0, 0,
! 1334: 88, 72, 0, 0, 201, 0, 0, 0, 3, 4,
! 1335: 5, 18, 6, 7, 8, 9, 10, 11, 13, 12,
! 1336: 14, 15, 16, 17, 20, 0, 0, 0, 40, 0,
! 1337: 42, 55, 0, 0, 117, 187, 0, 70, 244, 70,
! 1338: 252, 248, 0, 34, 0, 32, 36, 37, 39, 0,
! 1339: 0, 90, 74, 0, 0, 204, 0, 213, 0, 71,
! 1340: 251, 0, 0, 69, 0, 0, 38, 0, 0, 0,
! 1341: 0, 19, 21, 0, 0, 0, 0, 0, 0, 41,
! 1342: 43, 0, 0, 67, 0, 54, 56, 0, 0, 0,
! 1343: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
! 1344: 0, 0, 0, 0, 0, 0, 116, 118, 0, 0,
! 1345: 0, 0, 0, 0, 186, 188, 205, 206, 212, 232,
! 1346: 0, 0, 0, 207, 208, 209, 242, 253, 245, 246,
! 1347: 249, 35, 24, 22, 28, 26, 30, 33, 44, 46,
! 1348: 48, 50, 52, 57, 59, 0, 65, 63, 0, 0,
! 1349: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
! 1350: 89, 91, 0, 0, 0, 0, 73, 75, 119, 121,
! 1351: 173, 0, 171, 176, 0, 174, 131, 133, 135, 137,
! 1352: 139, 182, 141, 180, 143, 145, 149, 151, 153, 147,
! 1353: 165, 167, 163, 169, 155, 161, 0, 0, 185, 129,
! 1354: 183, 157, 159, 189, 0, 193, 0, 0, 0, 233,
! 1355: 232, 234, 215, 358, 216, 0, 0, 0, 0, 0,
! 1356: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
! 1357: 68, 0, 0, 0, 94, 96, 92, 98, 102, 104,
! 1358: 100, 106, 108, 110, 112, 114, 0, 0, 84, 86,
! 1359: 0, 0, 123, 0, 124, 0, 0, 0, 0, 0,
! 1360: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
! 1361: 0, 0, 0, 0, 0, 0, 125, 177, 127, 0,
! 1362: 0, 0, 0, 0, 373, 374, 375, 191, 0, 195,
! 1363: 197, 199, 234, 235, 236, 0, 360, 359, 214, 202,
! 1364: 243, 0, 257, 0, 0, 0, 0, 0, 0, 0,
! 1365: 0, 0, 0, 0, 0, 0, 296, 0, 0, 0,
! 1366: 0, 0, 0, 348, 0, 0, 0, 0, 0, 358,
! 1367: 0, 0, 0, 0, 0, 0, 0, 250, 254, 247,
! 1368: 25, 23, 29, 27, 31, 45, 47, 49, 51, 53,
! 1369: 58, 60, 66, 0, 64, 0, 0, 0, 0, 0,
! 1370: 0, 0, 0, 0, 0, 0, 0, 0, 76, 0,
! 1371: 80, 0, 0, 120, 122, 172, 175, 132, 134, 136,
! 1372: 138, 140, 142, 181, 144, 146, 150, 152, 154, 148,
! 1373: 166, 168, 164, 170, 156, 162, 179, 0, 0, 0,
! 1374: 130, 184, 158, 160, 190, 0, 194, 0, 0, 0,
! 1375: 0, 238, 239, 237, 210, 226, 0, 0, 0, 0,
! 1376: 217, 255, 350, 259, 261, 0, 0, 263, 270, 0,
! 1377: 0, 264, 0, 274, 276, 278, 280, 358, 358, 292,
! 1378: 294, 0, 298, 322, 326, 324, 344, 318, 316, 320,
! 1379: 0, 328, 330, 332, 334, 340, 286, 314, 338, 336,
! 1380: 302, 300, 304, 312, 0, 0, 0, 61, 95, 97,
! 1381: 93, 99, 103, 105, 101, 107, 109, 111, 113, 115,
! 1382: 78, 0, 82, 0, 85, 87, 178, 126, 128, 192,
! 1383: 196, 198, 200, 211, 0, 356, 357, 218, 0, 0,
! 1384: 220, 203, 0, 0, 0, 0, 0, 354, 0, 266,
! 1385: 268, 0, 272, 0, 0, 0, 0, 358, 282, 358,
! 1386: 288, 0, 0, 0, 0, 0, 0, 0, 0, 0,
! 1387: 0, 0, 361, 0, 0, 0, 0, 0, 0, 0,
! 1388: 0, 0, 0, 0, 0, 0, 0, 0, 306, 308,
! 1389: 310, 0, 0, 77, 0, 81, 240, 0, 228, 0,
! 1390: 0, 0, 0, 256, 351, 258, 260, 262, 352, 0,
! 1391: 271, 0, 0, 265, 0, 275, 277, 279, 281, 284,
! 1392: 0, 290, 0, 293, 295, 297, 299, 323, 327, 325,
! 1393: 345, 319, 317, 321, 0, 329, 331, 333, 335, 341,
! 1394: 287, 315, 339, 337, 303, 301, 305, 313, 342, 376,
! 1395: 377, 378, 379, 346, 0, 0, 0, 62, 79, 83,
! 1396: 241, 231, 227, 0, 219, 222, 224, 221, 0, 355,
! 1397: 267, 269, 273, 0, 283, 0, 289, 0, 0, 0,
! 1398: 0, 349, 362, 0, 0, 307, 309, 311, 0, 0,
! 1399: 0, 353, 285, 291, 240, 367, 369, 0, 0, 343,
! 1400: 347, 230, 223, 225, 371, 0, 0, 0, 0, 0,
! 1401: 368, 370, 363, 365, 372, 0, 0, 364, 366
! 1402: };
! 1403:
! 1404: /* YYDEFGOTO[NTERM-NUM]. */
! 1405: static const yytype_int16 yydefgoto[] =
! 1406: {
! 1407: -1, 1, 18, 19, 54, 82, 229, 228, 231, 230,
! 1408: 232, 20, 83, 21, 77, 22, 23, 24, 25, 39,
! 1409: 26, 59, 90, 233, 234, 235, 236, 237, 27, 60,
! 1410: 96, 238, 239, 561, 243, 241, 155, 50, 70, 28,
! 1411: 43, 98, 177, 491, 562, 493, 564, 381, 382, 29,
! 1412: 42, 97, 171, 367, 365, 366, 368, 371, 369, 370,
! 1413: 372, 373, 374, 375, 376, 30, 63, 117, 260, 261,
! 1414: 408, 409, 289, 266, 267, 268, 269, 270, 271, 273,
! 1415: 274, 278, 275, 276, 277, 283, 291, 292, 284, 281,
! 1416: 279, 280, 282, 181, 182, 184, 185, 286, 287, 192,
! 1417: 193, 209, 210, 31, 64, 125, 293, 415, 298, 417,
! 1418: 418, 419, 32, 46, 429, 67, 68, 132, 309, 430,
! 1419: 569, 572, 659, 660, 504, 567, 633, 568, 221, 305,
! 1420: 424, 631, 33, 225, 72, 227, 75, 138, 51, 226,
! 1421: 348, 512, 432, 514, 515, 521, 581, 582, 518, 584,
! 1422: 523, 524, 525, 526, 590, 643, 548, 592, 645, 531,
! 1423: 532, 451, 534, 553, 552, 554, 624, 625, 626, 555,
! 1424: 549, 540, 539, 541, 535, 537, 536, 543, 544, 545,
! 1425: 546, 551, 550, 547, 653, 538, 654, 460, 513, 437,
! 1426: 638, 579, 507, 308, 604, 652, 685, 686, 675, 676,
! 1427: 679, 297, 623
! 1428: };
! 1429:
! 1430: /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
! 1431: STATE-NUM. */
! 1432: #define YYPACT_NINF -535
! 1433: static const yytype_int16 yypact[] =
! 1434: {
! 1435: -535, 42, -535, -101, 87, -53, -14, 144, 9, 24,
! 1436: -535, -535, 26, 36, -535, -43, 65, 7, -535, -535,
! 1437: -535, -535, -535, -535, -535, -535, -535, -535, -535, -535,
! 1438: -535, -535, -535, -535, -535, 40, 35, 39, -535, 48,
! 1439: -535, -535, 53, 54, -535, -535, 2, 72, 134, 72,
! 1440: -535, 143, 62, -535, 3, -535, -535, -535, -535, -4,
! 1441: -5, -535, -535, 29, -9, 22, -113, 49, 45, -535,
! 1442: -535, 74, 68, -535, -45, 68, -535, 66, -23, -13,
! 1443: 81, -535, -535, 70, 85, 86, 88, 89, 98, -535,
! 1444: -535, 84, 84, -535, -8, -535, -535, -6, -7, 95,
! 1445: 97, 102, 104, 99, 96, 106, 4, 56, 79, 107,
! 1446: 101, 112, 75, 110, 115, 116, -535, -535, 118, 119,
! 1447: 120, 121, 122, 123, -535, -535, -535, -535, -535, -78,
! 1448: 124, 171, 109, -535, -535, -535, -535, -535, -535, -535,
! 1449: -535, -535, -535, -535, -535, -535, -535, -535, -535, -535,
! 1450: -535, -535, -535, -535, -535, 111, -535, 125, 126, 127,
! 1451: 131, 128, 130, 132, 136, 135, 137, 138, 139, 140,
! 1452: -535, -535, 141, 142, 147, 148, -535, -535, -535, -535,
! 1453: -535, 145, 133, -535, 146, 149, -535, -535, -535, -535,
! 1454: -535, -535, -535, 150, -535, -535, -535, -535, -535, -535,
! 1455: -535, -535, -535, -535, -535, -535, 151, 151, -535, -535,
! 1456: 152, -535, -535, -535, 14, -535, 14, 14, 14, -535,
! 1457: 153, 34, -535, 1, -535, 68, 117, 68, 154, 156,
! 1458: 157, 158, 159, 160, 161, 162, 163, 164, 165, 166,
! 1459: -535, 167, 178, 169, -535, -535, -535, -535, -535, -535,
! 1460: -535, -535, -535, -535, -535, -535, -2, -1, -535, -535,
! 1461: 172, 173, -535, 102, -535, 104, 174, 175, 176, 177,
! 1462: 179, 180, 106, 181, 182, 183, 185, 186, 187, 188,
! 1463: 189, 190, 191, 192, 193, 170, 168, -535, 168, 194,
! 1464: 110, 195, 196, 197, -535, -535, -535, -535, 198, -535,
! 1465: -535, -535, 34, -535, -535, -3, -535, -535, -535, -20,
! 1466: -535, 84, -535, 204, 213, 80, -35, 200, 212, 214,
! 1467: 215, 216, 208, 209, 217, 155, -535, 218, 219, -57,
! 1468: 201, -75, 220, -535, 221, 223, 224, 225, 226, 1,
! 1469: 227, -46, -21, 229, 230, 41, 210, -535, -535, -535,
! 1470: -535, -535, -535, -535, -535, -535, -535, -535, -535, -535,
! 1471: -535, -535, -535, 232, -535, 222, 228, 231, 233, 234,
! 1472: 235, 236, 237, 238, 239, 240, 241, 242, -535, 252,
! 1473: -535, 243, 244, -535, -535, -535, -535, -535, -535, -535,
! 1474: -535, -535, -535, -535, -535, -535, -535, -535, -535, -535,
! 1475: -535, -535, -535, -535, -535, -535, -535, 151, 245, 246,
! 1476: -535, -535, -535, -535, -535, 247, -535, 248, 249, 250,
! 1477: -3, -535, -535, -535, -535, -535, -37, 43, 265, 211,
! 1478: -535, -535, -535, -535, -535, 262, 263, -535, -535, 264,
! 1479: 266, -535, 267, -535, -535, -535, -535, -59, -56, -535,
! 1480: -535, -37, -535, -535, -535, -535, -535, -535, -535, -535,
! 1481: 254, -535, -535, -535, -535, -535, -535, -535, -535, -535,
! 1482: -535, -535, -535, -535, 272, 273, 31, -535, -535, -535,
! 1483: -535, -535, -535, -535, -535, -535, -535, -535, -535, -535,
! 1484: -535, 260, -535, 261, -535, -535, -535, -535, -535, -535,
! 1485: -535, -535, -535, -535, 270, -535, -535, -535, 276, 277,
! 1486: -535, -535, 268, -49, 269, 271, 274, -535, 275, -535,
! 1487: -535, 278, -535, 279, 280, 281, 282, 1, -535, 1,
! 1488: -535, 283, 284, 285, 286, 287, 288, 289, 290, 292,
! 1489: 293, 294, -535, 295, 296, 297, 298, 299, 300, 301,
! 1490: 302, 303, 304, 305, 306, 307, 14, 13, -535, -535,
! 1491: -535, 308, 309, -535, 310, -535, 291, 311, 312, 313,
! 1492: 14, 13, 314, -535, -535, -535, -535, -535, -535, 316,
! 1493: -535, 317, 318, -535, 319, -535, -535, -535, -535, -535,
! 1494: 320, -535, 321, -535, -535, -535, -535, -535, -535, -535,
! 1495: -535, -535, -535, -535, -27, -535, -535, -535, -535, -535,
! 1496: -535, -535, -535, -535, -535, -535, -535, -535, -535, -535,
! 1497: -535, -535, -535, -535, 322, 323, 324, -535, -535, -535,
! 1498: -535, -535, -535, 325, -535, -535, -535, -535, 326, -535,
! 1499: -535, -535, -535, 327, -535, 329, -535, 315, -37, 335,
! 1500: 50, -535, -535, 330, 331, -535, -535, -535, 270, 332,
! 1501: 333, -535, -535, -535, 291, -535, -535, 348, 349, -535,
! 1502: -535, -535, -535, -535, -535, 336, 337, 14, 13, 338,
! 1503: -535, -535, -535, -535, -535, 339, 340, -535, -535
! 1504: };
! 1505:
! 1506: /* YYPGOTO[NTERM-NUM]. */
! 1507: static const yytype_int16 yypgoto[] =
! 1508: {
! 1509: -535, -535, -535, -535, -535, -535, -535, -535, -535, -535,
! 1510: -535, -535, -535, -535, -535, -535, -535, -535, -535, -535,
! 1511: -535, -535, -535, -535, -535, -535, -535, -535, -535, -535,
! 1512: -535, -535, -535, -535, -535, -535, -535, -88, 341, -535,
! 1513: -535, -535, -535, -535, -535, -535, -535, -535, -535, -535,
! 1514: -535, -535, -535, -535, -535, -535, -535, -535, -535, -535,
! 1515: -535, -535, -535, -535, -535, -535, -535, -535, -535, -535,
! 1516: -535, -535, -535, -535, -535, -535, -535, -535, -535, -535,
! 1517: -535, -535, -535, -535, -535, -535, -535, -535, -535, -535,
! 1518: -535, -535, -535, 19, -535, 52, -535, 113, -111, 47,
! 1519: -535, 23, -535, -535, -535, -535, -535, -535, -535, -535,
! 1520: -535, -535, -535, -535, -535, -535, 92, -535, -535, -535,
! 1521: -535, -535, -535, -535, -535, -344, -535, -535, 328, 93,
! 1522: -99, -278, -535, -535, -535, -535, -535, -55, 361, -535,
! 1523: -535, -535, -535, -535, -535, -535, -535, -535, -535, -535,
! 1524: -535, -535, -535, -535, -535, -535, -535, -535, -535, -535,
! 1525: -535, -535, -535, -535, -535, -535, -535, -535, -535, -535,
! 1526: -535, -535, -535, -535, -535, -535, -535, -535, -535, -535,
! 1527: -535, -535, -535, -535, -535, -535, -535, -535, -535, -535,
! 1528: -535, -535, -446, -333, -535, -535, -535, -535, -535, -535,
! 1529: -535, -216, -534
! 1530: };
! 1531:
! 1532: /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
! 1533: positive, shift that token. If negative, reduce the rule which
! 1534: number is the opposite. If zero, do what YYDEFACT says.
! 1535: If YYTABLE_NINF, syntax error. */
! 1536: #define YYTABLE_NINF -230
! 1537: static const yytype_int16 yytable[] =
! 1538: {
! 1539: 299, 300, 301, 153, 154, 533, 466, 78, 79, 80,
! 1540: 84, 85, 86, 87, 88, 91, 92, 156, 93, 94,
! 1541: 140, 158, 159, 160, 161, 162, 163, 164, 165, 166,
! 1542: 167, 168, 169, 172, 173, 174, 175, 636, 47, 574,
! 1543: 47, 505, 2, 527, 457, 3, 529, 128, 129, 4,
! 1544: 647, 5, 6, 7, 130, 8, 194, 425, 454, 195,
! 1545: 219, 9, 118, 119, 120, 121, 122, 123, 10, 468,
! 1546: 34, 438, 439, 440, 99, 100, 101, 102, 103, 104,
! 1547: 105, 11, 458, 648, 220, 65, 12, 106, 107, 108,
! 1548: 109, 110, 111, 112, 470, 35, 113, 114, 115, 649,
! 1549: 455, 306, 307, 66, 306, 307, 126, 36, 196, 197,
! 1550: 198, 469, 13, 199, 528, 530, 49, 48, 49, 506,
! 1551: 650, 575, 14, 66, 15, 441, 426, 427, 133, 134,
! 1552: 131, 428, 200, 142, 201, 202, 471, 143, 421, 422,
! 1553: 206, 207, 37, 144, 683, 651, 66, 145, 187, 188,
! 1554: 189, 190, 157, 423, 377, 379, 38, 127, 378, 380,
! 1555: 135, 306, 307, 124, 53, 176, 170, 95, 89, 16,
! 1556: 310, 17, 349, 303, 304, 81, 619, 620, 621, 622,
! 1557: 40, 294, 295, 296, 558, 559, 560, 435, 436, 474,
! 1558: 475, 508, 509, 52, 589, 41, 591, 44, 667, 668,
! 1559: 55, 116, 665, 311, 312, 56, 313, 45, 314, 57,
! 1560: 315, 69, 316, 317, 318, 319, 320, 321, 58, 71,
! 1561: 322, 323, 324, 431, 61, 62, 325, 326, 74, 327,
! 1562: 328, 329, 76, 330, 136, 331, 141, 332, 333, 137,
! 1563: 147, 146, 148, 149, 150, 49, 151, 334, 335, 336,
! 1564: 337, 338, 339, 340, 341, 152, 178, 204, 179, 186,
! 1565: 342, 343, 344, 180, 345, 183, 191, 203, 205, 346,
! 1566: 208, 211, 223, 212, 213, 214, 215, 216, 217, 218,
! 1567: 224, 240, 385, 245, 222, 242, 244, 246, 247, 347,
! 1568: 248, 219, 249, 250, 433, 251, 496, 252, 253, 254,
! 1569: 255, 256, 257, 258, 259, 434, 263, 442, 406, 447,
! 1570: 448, 450, 285, 411, 671, 262, 264, 386, 456, 393,
! 1571: 288, 503, 265, 272, 350, 290, 351, 352, 353, 354,
! 1572: 355, 356, 357, 358, 359, 360, 361, 362, 363, 364,
! 1573: 618, 407, 383, 384, 387, 388, 389, 390, 566, 391,
! 1574: 392, 394, 395, 396, 635, 397, 398, 399, 400, 401,
! 1575: 402, 403, 404, 405, 410, 412, 413, 414, 416, 443,
! 1576: 476, 444, 445, 446, 449, 452, 453, 459, 461, 462,
! 1577: 463, 464, 465, 511, 467, 472, 674, 473, 477, 0,
! 1578: 73, 0, 478, 664, 0, 420, 0, 0, 479, 0,
! 1579: 0, 480, 490, 481, 482, 483, 484, 485, 486, 487,
! 1580: 488, 489, 492, 494, 495, 497, 498, 499, 500, 501,
! 1581: 502, 510, 516, 517, 519, 542, 520, 522, 556, 557,
! 1582: 563, 565, 570, 571, 578, 139, 0, 0, 573, 576,
! 1583: 0, 577, 0, 0, 0, 580, 0, 630, 583, 585,
! 1584: 586, 587, 588, 593, 594, 595, 596, 597, 598, 599,
! 1585: 600, 682, 601, 602, 603, 605, 606, 607, 608, 609,
! 1586: 610, 611, 612, 613, 614, 615, 616, 617, 627, 628,
! 1587: 629, 632, 0, 634, 637, -229, 639, 640, 641, 642,
! 1588: 644, 646, 655, 656, 657, 666, 661, 662, 658, 663,
! 1589: 669, 670, 672, 673, 677, 678, 680, 681, 684, 687,
! 1590: 688, 0, 0, 0, 0, 0, 0, 0, 0, 0,
! 1591: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
! 1592: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
! 1593: 0, 0, 0, 0, 0, 0, 0, 0, 302
! 1594: };
! 1595:
! 1596: static const yytype_int16 yycheck[] =
! 1597: {
! 1598: 216, 217, 218, 91, 92, 451, 339, 4, 5, 6,
! 1599: 14, 15, 16, 17, 18, 20, 21, 25, 23, 24,
! 1600: 75, 27, 28, 29, 30, 31, 32, 33, 34, 35,
! 1601: 36, 37, 38, 40, 41, 42, 43, 571, 83, 88,
! 1602: 83, 78, 0, 102, 119, 3, 102, 160, 161, 7,
! 1603: 77, 9, 10, 11, 5, 13, 52, 77, 115, 55,
! 1604: 138, 19, 71, 72, 73, 74, 75, 76, 26, 115,
! 1605: 171, 106, 107, 108, 45, 46, 47, 48, 49, 50,
! 1606: 51, 39, 157, 110, 162, 83, 44, 58, 59, 60,
! 1607: 61, 62, 63, 64, 115, 8, 67, 68, 69, 126,
! 1608: 157, 160, 161, 101, 160, 161, 84, 160, 52, 53,
! 1609: 54, 157, 70, 57, 447, 448, 161, 160, 161, 156,
! 1610: 147, 170, 80, 101, 82, 160, 146, 147, 83, 84,
! 1611: 81, 151, 53, 156, 55, 56, 157, 160, 141, 142,
! 1612: 65, 66, 156, 156, 678, 172, 101, 160, 52, 53,
! 1613: 54, 55, 160, 156, 156, 156, 12, 65, 160, 160,
! 1614: 68, 160, 161, 172, 157, 172, 172, 172, 172, 127,
! 1615: 225, 129, 227, 139, 140, 172, 163, 164, 165, 166,
! 1616: 171, 167, 168, 169, 153, 154, 155, 107, 108, 148,
! 1617: 149, 148, 149, 128, 527, 171, 529, 171, 148, 149,
! 1618: 160, 172, 648, 86, 87, 170, 89, 171, 91, 170,
! 1619: 93, 139, 95, 96, 97, 98, 99, 100, 170, 85,
! 1620: 103, 104, 105, 311, 171, 171, 109, 110, 85, 112,
! 1621: 113, 114, 170, 116, 160, 118, 170, 120, 121, 171,
! 1622: 170, 160, 157, 157, 156, 161, 157, 130, 131, 132,
! 1623: 133, 134, 135, 136, 137, 157, 161, 156, 161, 160,
! 1624: 143, 144, 145, 161, 147, 161, 160, 160, 156, 152,
! 1625: 160, 156, 101, 157, 156, 156, 156, 156, 156, 156,
! 1626: 171, 170, 263, 156, 160, 160, 160, 156, 160, 172,
! 1627: 160, 138, 160, 157, 90, 160, 407, 160, 160, 160,
! 1628: 160, 160, 160, 156, 156, 92, 173, 107, 138, 101,
! 1629: 101, 156, 161, 290, 658, 170, 170, 265, 117, 272,
! 1630: 207, 420, 173, 173, 170, 173, 170, 170, 170, 170,
! 1631: 170, 170, 170, 170, 170, 170, 170, 170, 160, 170,
! 1632: 556, 173, 170, 170, 170, 170, 170, 170, 78, 170,
! 1633: 170, 170, 170, 170, 570, 170, 170, 170, 170, 170,
! 1634: 170, 170, 170, 170, 170, 170, 170, 170, 170, 157,
! 1635: 160, 157, 157, 157, 157, 157, 157, 157, 157, 156,
! 1636: 156, 156, 156, 172, 157, 156, 664, 157, 156, -1,
! 1637: 49, -1, 170, 78, -1, 302, -1, -1, 170, -1,
! 1638: -1, 170, 160, 170, 170, 170, 170, 170, 170, 170,
! 1639: 170, 170, 160, 170, 170, 170, 170, 170, 170, 170,
! 1640: 170, 156, 160, 160, 160, 171, 160, 160, 156, 156,
! 1641: 170, 170, 156, 156, 160, 74, -1, -1, 170, 170,
! 1642: -1, 170, -1, -1, -1, 170, -1, 156, 170, 170,
! 1643: 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
! 1644: 170, 677, 170, 170, 170, 170, 170, 170, 170, 170,
! 1645: 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
! 1646: 170, 170, -1, 170, 170, 173, 170, 170, 170, 170,
! 1647: 170, 170, 170, 170, 170, 160, 170, 170, 173, 170,
! 1648: 170, 170, 170, 170, 156, 156, 170, 170, 170, 170,
! 1649: 170, -1, -1, -1, -1, -1, -1, -1, -1, -1,
! 1650: -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
! 1651: -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
! 1652: -1, -1, -1, -1, -1, -1, -1, -1, 220
! 1653: };
! 1654:
! 1655: /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
! 1656: symbol of state STATE-NUM. */
! 1657: static const yytype_uint16 yystos[] =
! 1658: {
! 1659: 0, 175, 0, 3, 7, 9, 10, 11, 13, 19,
! 1660: 26, 39, 44, 70, 80, 82, 127, 129, 176, 177,
! 1661: 185, 187, 189, 190, 191, 192, 194, 202, 213, 223,
! 1662: 239, 277, 286, 306, 171, 8, 160, 156, 12, 193,
! 1663: 171, 171, 224, 214, 171, 171, 287, 83, 160, 161,
! 1664: 211, 312, 128, 157, 178, 160, 170, 170, 170, 195,
! 1665: 203, 171, 171, 240, 278, 83, 101, 289, 290, 139,
! 1666: 212, 85, 308, 212, 85, 310, 170, 188, 4, 5,
! 1667: 6, 172, 179, 186, 14, 15, 16, 17, 18, 172,
! 1668: 196, 20, 21, 23, 24, 172, 204, 225, 215, 45,
! 1669: 46, 47, 48, 49, 50, 51, 58, 59, 60, 61,
! 1670: 62, 63, 64, 67, 68, 69, 172, 241, 71, 72,
! 1671: 73, 74, 75, 76, 172, 279, 84, 290, 160, 161,
! 1672: 5, 81, 291, 83, 84, 290, 160, 171, 311, 312,
! 1673: 311, 170, 156, 160, 156, 160, 160, 170, 157, 157,
! 1674: 156, 157, 157, 211, 211, 210, 25, 160, 27, 28,
! 1675: 29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
! 1676: 172, 226, 40, 41, 42, 43, 172, 216, 161, 161,
! 1677: 161, 267, 268, 161, 269, 270, 160, 52, 53, 54,
! 1678: 55, 160, 273, 274, 52, 55, 52, 53, 54, 57,
! 1679: 53, 55, 56, 160, 156, 156, 65, 66, 160, 275,
! 1680: 276, 156, 157, 156, 156, 156, 156, 156, 156, 138,
! 1681: 162, 302, 160, 101, 171, 307, 313, 309, 181, 180,
! 1682: 183, 182, 184, 197, 198, 199, 200, 201, 205, 206,
! 1683: 170, 209, 160, 208, 160, 156, 156, 160, 160, 160,
! 1684: 157, 160, 160, 160, 160, 160, 160, 160, 156, 156,
! 1685: 242, 243, 170, 173, 170, 173, 247, 248, 249, 250,
! 1686: 251, 252, 173, 253, 254, 256, 257, 258, 255, 264,
! 1687: 265, 263, 266, 259, 262, 161, 271, 272, 271, 246,
! 1688: 173, 260, 261, 280, 167, 168, 169, 375, 282, 375,
! 1689: 375, 375, 302, 139, 140, 303, 160, 161, 367, 292,
! 1690: 311, 86, 87, 89, 91, 93, 95, 96, 97, 98,
! 1691: 99, 100, 103, 104, 105, 109, 110, 112, 113, 114,
! 1692: 116, 118, 120, 121, 130, 131, 132, 133, 134, 135,
! 1693: 136, 137, 143, 144, 145, 147, 152, 172, 314, 311,
! 1694: 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
! 1695: 170, 170, 170, 160, 170, 228, 229, 227, 230, 232,
! 1696: 233, 231, 234, 235, 236, 237, 238, 156, 160, 156,
! 1697: 160, 221, 222, 170, 170, 267, 269, 170, 170, 170,
! 1698: 170, 170, 170, 273, 170, 170, 170, 170, 170, 170,
! 1699: 170, 170, 170, 170, 170, 170, 138, 173, 244, 245,
! 1700: 170, 275, 170, 170, 170, 281, 170, 283, 284, 285,
! 1701: 303, 141, 142, 156, 304, 77, 146, 147, 151, 288,
! 1702: 293, 211, 316, 90, 92, 107, 108, 363, 106, 107,
! 1703: 108, 160, 107, 157, 157, 157, 157, 101, 101, 157,
! 1704: 156, 335, 157, 157, 115, 157, 117, 119, 157, 157,
! 1705: 361, 157, 156, 156, 156, 156, 367, 157, 115, 157,
! 1706: 115, 157, 156, 157, 148, 149, 160, 156, 170, 170,
! 1707: 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
! 1708: 160, 217, 160, 219, 170, 170, 272, 170, 170, 170,
! 1709: 170, 170, 170, 304, 298, 78, 156, 366, 148, 149,
! 1710: 156, 172, 315, 362, 317, 318, 160, 160, 322, 160,
! 1711: 160, 319, 160, 324, 325, 326, 327, 102, 367, 102,
! 1712: 367, 333, 334, 366, 336, 348, 350, 349, 359, 346,
! 1713: 345, 347, 171, 351, 352, 353, 354, 357, 330, 344,
! 1714: 356, 355, 338, 337, 339, 343, 156, 156, 153, 154,
! 1715: 155, 207, 218, 170, 220, 170, 78, 299, 301, 294,
! 1716: 156, 156, 295, 170, 88, 170, 170, 170, 160, 365,
! 1717: 170, 320, 321, 170, 323, 170, 170, 170, 170, 367,
! 1718: 328, 367, 331, 170, 170, 170, 170, 170, 170, 170,
! 1719: 170, 170, 170, 170, 368, 170, 170, 170, 170, 170,
! 1720: 170, 170, 170, 170, 170, 170, 170, 170, 375, 163,
! 1721: 164, 165, 166, 376, 340, 341, 342, 170, 170, 170,
! 1722: 156, 305, 170, 300, 170, 375, 376, 170, 364, 170,
! 1723: 170, 170, 170, 329, 170, 332, 170, 77, 110, 126,
! 1724: 147, 172, 369, 358, 360, 170, 170, 170, 173, 296,
! 1725: 297, 170, 170, 170, 78, 366, 160, 148, 149, 170,
! 1726: 170, 299, 170, 170, 305, 372, 373, 156, 156, 374,
! 1727: 170, 170, 375, 376, 170, 370, 371, 170, 170
! 1728: };
! 1729:
! 1730: #define yyerrok (yyerrstatus = 0)
! 1731: #define yyclearin (yychar = YYEMPTY)
! 1732: #define YYEMPTY (-2)
! 1733: #define YYEOF 0
! 1734:
! 1735: #define YYACCEPT goto yyacceptlab
! 1736: #define YYABORT goto yyabortlab
! 1737: #define YYERROR goto yyerrorlab
! 1738:
! 1739:
! 1740: /* Like YYERROR except do call yyerror. This remains here temporarily
! 1741: to ease the transition to the new meaning of YYERROR, for GCC.
! 1742: Once GCC version 2 has supplanted version 1, this can go. */
! 1743:
! 1744: #define YYFAIL goto yyerrlab
! 1745:
! 1746: #define YYRECOVERING() (!!yyerrstatus)
! 1747:
! 1748: #define YYBACKUP(Token, Value) \
! 1749: do \
! 1750: if (yychar == YYEMPTY && yylen == 1) \
! 1751: { \
! 1752: yychar = (Token); \
! 1753: yylval = (Value); \
! 1754: yytoken = YYTRANSLATE (yychar); \
! 1755: YYPOPSTACK (1); \
! 1756: goto yybackup; \
! 1757: } \
! 1758: else \
! 1759: { \
! 1760: yyerror (YY_("syntax error: cannot back up")); \
! 1761: YYERROR; \
! 1762: } \
! 1763: while (YYID (0))
! 1764:
! 1765:
! 1766: #define YYTERROR 1
! 1767: #define YYERRCODE 256
! 1768:
! 1769:
! 1770: /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
! 1771: If N is 0, then set CURRENT to the empty location which ends
! 1772: the previous symbol: RHS[0] (always defined). */
! 1773:
! 1774: #define YYRHSLOC(Rhs, K) ((Rhs)[K])
! 1775: #ifndef YYLLOC_DEFAULT
! 1776: # define YYLLOC_DEFAULT(Current, Rhs, N) \
! 1777: do \
! 1778: if (YYID (N)) \
! 1779: { \
! 1780: (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
! 1781: (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
! 1782: (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
! 1783: (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
! 1784: } \
! 1785: else \
! 1786: { \
! 1787: (Current).first_line = (Current).last_line = \
! 1788: YYRHSLOC (Rhs, 0).last_line; \
! 1789: (Current).first_column = (Current).last_column = \
! 1790: YYRHSLOC (Rhs, 0).last_column; \
! 1791: } \
! 1792: while (YYID (0))
! 1793: #endif
! 1794:
! 1795:
! 1796: /* YY_LOCATION_PRINT -- Print the location on the stream.
! 1797: This macro was not mandated originally: define only if we know
! 1798: we won't break user code: when these are the locations we know. */
! 1799:
! 1800: #ifndef YY_LOCATION_PRINT
! 1801: # if YYLTYPE_IS_TRIVIAL
! 1802: # define YY_LOCATION_PRINT(File, Loc) \
! 1803: fprintf (File, "%d.%d-%d.%d", \
! 1804: (Loc).first_line, (Loc).first_column, \
! 1805: (Loc).last_line, (Loc).last_column)
! 1806: # else
! 1807: # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
! 1808: # endif
! 1809: #endif
! 1810:
! 1811:
! 1812: /* YYLEX -- calling `yylex' with the right arguments. */
! 1813:
! 1814: #ifdef YYLEX_PARAM
! 1815: # define YYLEX yylex (YYLEX_PARAM)
! 1816: #else
! 1817: # define YYLEX yylex ()
! 1818: #endif
! 1819:
! 1820: /* Enable debugging if requested. */
! 1821: #if YYDEBUG
! 1822:
! 1823: # ifndef YYFPRINTF
! 1824: # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
! 1825: # define YYFPRINTF fprintf
! 1826: # endif
! 1827:
! 1828: # define YYDPRINTF(Args) \
! 1829: do { \
! 1830: if (yydebug) \
! 1831: YYFPRINTF Args; \
! 1832: } while (YYID (0))
! 1833:
! 1834: # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
! 1835: do { \
! 1836: if (yydebug) \
! 1837: { \
! 1838: YYFPRINTF (stderr, "%s ", Title); \
! 1839: yy_symbol_print (stderr, \
! 1840: Type, Value); \
! 1841: YYFPRINTF (stderr, "\n"); \
! 1842: } \
! 1843: } while (YYID (0))
! 1844:
! 1845:
! 1846: /*--------------------------------.
! 1847: | Print this symbol on YYOUTPUT. |
! 1848: `--------------------------------*/
! 1849:
! 1850: /*ARGSUSED*/
! 1851: #if (defined __STDC__ || defined __C99__FUNC__ \
! 1852: || defined __cplusplus || defined _MSC_VER)
! 1853: static void
! 1854: yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
! 1855: #else
! 1856: static void
! 1857: yy_symbol_value_print (yyoutput, yytype, yyvaluep)
! 1858: FILE *yyoutput;
! 1859: int yytype;
! 1860: YYSTYPE const * const yyvaluep;
! 1861: #endif
! 1862: {
! 1863: if (!yyvaluep)
! 1864: return;
! 1865: # ifdef YYPRINT
! 1866: if (yytype < YYNTOKENS)
! 1867: YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
! 1868: # else
! 1869: YYUSE (yyoutput);
! 1870: # endif
! 1871: switch (yytype)
! 1872: {
! 1873: default:
! 1874: break;
! 1875: }
! 1876: }
! 1877:
! 1878:
! 1879: /*--------------------------------.
! 1880: | Print this symbol on YYOUTPUT. |
! 1881: `--------------------------------*/
! 1882:
! 1883: #if (defined __STDC__ || defined __C99__FUNC__ \
! 1884: || defined __cplusplus || defined _MSC_VER)
! 1885: static void
! 1886: yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
! 1887: #else
! 1888: static void
! 1889: yy_symbol_print (yyoutput, yytype, yyvaluep)
! 1890: FILE *yyoutput;
! 1891: int yytype;
! 1892: YYSTYPE const * const yyvaluep;
! 1893: #endif
! 1894: {
! 1895: if (yytype < YYNTOKENS)
! 1896: YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
! 1897: else
! 1898: YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
! 1899:
! 1900: yy_symbol_value_print (yyoutput, yytype, yyvaluep);
! 1901: YYFPRINTF (yyoutput, ")");
! 1902: }
! 1903:
! 1904: /*------------------------------------------------------------------.
! 1905: | yy_stack_print -- Print the state stack from its BOTTOM up to its |
! 1906: | TOP (included). |
! 1907: `------------------------------------------------------------------*/
! 1908:
! 1909: #if (defined __STDC__ || defined __C99__FUNC__ \
! 1910: || defined __cplusplus || defined _MSC_VER)
! 1911: static void
! 1912: yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
! 1913: #else
! 1914: static void
! 1915: yy_stack_print (yybottom, yytop)
! 1916: yytype_int16 *yybottom;
! 1917: yytype_int16 *yytop;
! 1918: #endif
! 1919: {
! 1920: YYFPRINTF (stderr, "Stack now");
! 1921: for (; yybottom <= yytop; yybottom++)
! 1922: {
! 1923: int yybot = *yybottom;
! 1924: YYFPRINTF (stderr, " %d", yybot);
! 1925: }
! 1926: YYFPRINTF (stderr, "\n");
! 1927: }
! 1928:
! 1929: # define YY_STACK_PRINT(Bottom, Top) \
! 1930: do { \
! 1931: if (yydebug) \
! 1932: yy_stack_print ((Bottom), (Top)); \
! 1933: } while (YYID (0))
! 1934:
! 1935:
! 1936: /*------------------------------------------------.
! 1937: | Report that the YYRULE is going to be reduced. |
! 1938: `------------------------------------------------*/
! 1939:
! 1940: #if (defined __STDC__ || defined __C99__FUNC__ \
! 1941: || defined __cplusplus || defined _MSC_VER)
! 1942: static void
! 1943: yy_reduce_print (YYSTYPE *yyvsp, int yyrule)
! 1944: #else
! 1945: static void
! 1946: yy_reduce_print (yyvsp, yyrule)
! 1947: YYSTYPE *yyvsp;
! 1948: int yyrule;
! 1949: #endif
! 1950: {
! 1951: int yynrhs = yyr2[yyrule];
! 1952: int yyi;
! 1953: unsigned long int yylno = yyrline[yyrule];
! 1954: YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
! 1955: yyrule - 1, yylno);
! 1956: /* The symbols being reduced. */
! 1957: for (yyi = 0; yyi < yynrhs; yyi++)
! 1958: {
! 1959: YYFPRINTF (stderr, " $%d = ", yyi + 1);
! 1960: yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
! 1961: &(yyvsp[(yyi + 1) - (yynrhs)])
! 1962: );
! 1963: YYFPRINTF (stderr, "\n");
! 1964: }
! 1965: }
! 1966:
! 1967: # define YY_REDUCE_PRINT(Rule) \
! 1968: do { \
! 1969: if (yydebug) \
! 1970: yy_reduce_print (yyvsp, Rule); \
! 1971: } while (YYID (0))
! 1972:
! 1973: /* Nonzero means print parse trace. It is left uninitialized so that
! 1974: multiple parsers can coexist. */
! 1975: int yydebug;
! 1976: #else /* !YYDEBUG */
! 1977: # define YYDPRINTF(Args)
! 1978: # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
! 1979: # define YY_STACK_PRINT(Bottom, Top)
! 1980: # define YY_REDUCE_PRINT(Rule)
! 1981: #endif /* !YYDEBUG */
! 1982:
! 1983:
! 1984: /* YYINITDEPTH -- initial size of the parser's stacks. */
! 1985: #ifndef YYINITDEPTH
! 1986: # define YYINITDEPTH 200
! 1987: #endif
! 1988:
! 1989: /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
! 1990: if the built-in stack extension method is used).
! 1991:
! 1992: Do not make this value too large; the results are undefined if
! 1993: YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
! 1994: evaluated with infinite-precision integer arithmetic. */
! 1995:
! 1996: #ifndef YYMAXDEPTH
! 1997: # define YYMAXDEPTH 10000
! 1998: #endif
! 1999:
! 2000:
! 2001:
! 2002: #if YYERROR_VERBOSE
! 2003:
! 2004: # ifndef yystrlen
! 2005: # if defined __GLIBC__ && defined _STRING_H
! 2006: # define yystrlen strlen
! 2007: # else
! 2008: /* Return the length of YYSTR. */
! 2009: #if (defined __STDC__ || defined __C99__FUNC__ \
! 2010: || defined __cplusplus || defined _MSC_VER)
! 2011: static YYSIZE_T
! 2012: yystrlen (const char *yystr)
! 2013: #else
! 2014: static YYSIZE_T
! 2015: yystrlen (yystr)
! 2016: const char *yystr;
! 2017: #endif
! 2018: {
! 2019: YYSIZE_T yylen;
! 2020: for (yylen = 0; yystr[yylen]; yylen++)
! 2021: continue;
! 2022: return yylen;
! 2023: }
! 2024: # endif
! 2025: # endif
! 2026:
! 2027: # ifndef yystpcpy
! 2028: # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
! 2029: # define yystpcpy stpcpy
! 2030: # else
! 2031: /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
! 2032: YYDEST. */
! 2033: #if (defined __STDC__ || defined __C99__FUNC__ \
! 2034: || defined __cplusplus || defined _MSC_VER)
! 2035: static char *
! 2036: yystpcpy (char *yydest, const char *yysrc)
! 2037: #else
! 2038: static char *
! 2039: yystpcpy (yydest, yysrc)
! 2040: char *yydest;
! 2041: const char *yysrc;
! 2042: #endif
! 2043: {
! 2044: char *yyd = yydest;
! 2045: const char *yys = yysrc;
! 2046:
! 2047: while ((*yyd++ = *yys++) != '\0')
! 2048: continue;
! 2049:
! 2050: return yyd - 1;
! 2051: }
! 2052: # endif
! 2053: # endif
! 2054:
! 2055: # ifndef yytnamerr
! 2056: /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
! 2057: quotes and backslashes, so that it's suitable for yyerror. The
! 2058: heuristic is that double-quoting is unnecessary unless the string
! 2059: contains an apostrophe, a comma, or backslash (other than
! 2060: backslash-backslash). YYSTR is taken from yytname. If YYRES is
! 2061: null, do not copy; instead, return the length of what the result
! 2062: would have been. */
! 2063: static YYSIZE_T
! 2064: yytnamerr (char *yyres, const char *yystr)
! 2065: {
! 2066: if (*yystr == '"')
! 2067: {
! 2068: YYSIZE_T yyn = 0;
! 2069: char const *yyp = yystr;
! 2070:
! 2071: for (;;)
! 2072: switch (*++yyp)
! 2073: {
! 2074: case '\'':
! 2075: case ',':
! 2076: goto do_not_strip_quotes;
! 2077:
! 2078: case '\\':
! 2079: if (*++yyp != '\\')
! 2080: goto do_not_strip_quotes;
! 2081: /* Fall through. */
! 2082: default:
! 2083: if (yyres)
! 2084: yyres[yyn] = *yyp;
! 2085: yyn++;
! 2086: break;
! 2087:
! 2088: case '"':
! 2089: if (yyres)
! 2090: yyres[yyn] = '\0';
! 2091: return yyn;
! 2092: }
! 2093: do_not_strip_quotes: ;
! 2094: }
! 2095:
! 2096: if (! yyres)
! 2097: return yystrlen (yystr);
! 2098:
! 2099: return yystpcpy (yyres, yystr) - yyres;
! 2100: }
! 2101: # endif
! 2102:
! 2103: /* Copy into YYRESULT an error message about the unexpected token
! 2104: YYCHAR while in state YYSTATE. Return the number of bytes copied,
! 2105: including the terminating null byte. If YYRESULT is null, do not
! 2106: copy anything; just return the number of bytes that would be
! 2107: copied. As a special case, return 0 if an ordinary "syntax error"
! 2108: message will do. Return YYSIZE_MAXIMUM if overflow occurs during
! 2109: size calculation. */
! 2110: static YYSIZE_T
! 2111: yysyntax_error (char *yyresult, int yystate, int yychar)
! 2112: {
! 2113: int yyn = yypact[yystate];
! 2114:
! 2115: if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
! 2116: return 0;
! 2117: else
! 2118: {
! 2119: int yytype = YYTRANSLATE (yychar);
! 2120: YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
! 2121: YYSIZE_T yysize = yysize0;
! 2122: YYSIZE_T yysize1;
! 2123: int yysize_overflow = 0;
! 2124: enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
! 2125: char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
! 2126: int yyx;
! 2127:
! 2128: # if 0
! 2129: /* This is so xgettext sees the translatable formats that are
! 2130: constructed on the fly. */
! 2131: YY_("syntax error, unexpected %s");
! 2132: YY_("syntax error, unexpected %s, expecting %s");
! 2133: YY_("syntax error, unexpected %s, expecting %s or %s");
! 2134: YY_("syntax error, unexpected %s, expecting %s or %s or %s");
! 2135: YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
! 2136: # endif
! 2137: char *yyfmt;
! 2138: char const *yyf;
! 2139: static char const yyunexpected[] = "syntax error, unexpected %s";
! 2140: static char const yyexpecting[] = ", expecting %s";
! 2141: static char const yyor[] = " or %s";
! 2142: char yyformat[sizeof yyunexpected
! 2143: + sizeof yyexpecting - 1
! 2144: + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
! 2145: * (sizeof yyor - 1))];
! 2146: char const *yyprefix = yyexpecting;
! 2147:
! 2148: /* Start YYX at -YYN if negative to avoid negative indexes in
! 2149: YYCHECK. */
! 2150: int yyxbegin = yyn < 0 ? -yyn : 0;
! 2151:
! 2152: /* Stay within bounds of both yycheck and yytname. */
! 2153: int yychecklim = YYLAST - yyn + 1;
! 2154: int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
! 2155: int yycount = 1;
! 2156:
! 2157: yyarg[0] = yytname[yytype];
! 2158: yyfmt = yystpcpy (yyformat, yyunexpected);
! 2159:
! 2160: for (yyx = yyxbegin; yyx < yyxend; ++yyx)
! 2161: if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
! 2162: {
! 2163: if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
! 2164: {
! 2165: yycount = 1;
! 2166: yysize = yysize0;
! 2167: yyformat[sizeof yyunexpected - 1] = '\0';
! 2168: break;
! 2169: }
! 2170: yyarg[yycount++] = yytname[yyx];
! 2171: yysize1 = yysize + yytnamerr (0, yytname[yyx]);
! 2172: yysize_overflow |= (yysize1 < yysize);
! 2173: yysize = yysize1;
! 2174: yyfmt = yystpcpy (yyfmt, yyprefix);
! 2175: yyprefix = yyor;
! 2176: }
! 2177:
! 2178: yyf = YY_(yyformat);
! 2179: yysize1 = yysize + yystrlen (yyf);
! 2180: yysize_overflow |= (yysize1 < yysize);
! 2181: yysize = yysize1;
! 2182:
! 2183: if (yysize_overflow)
! 2184: return YYSIZE_MAXIMUM;
! 2185:
! 2186: if (yyresult)
! 2187: {
! 2188: /* Avoid sprintf, as that infringes on the user's name space.
! 2189: Don't have undefined behavior even if the translation
! 2190: produced a string with the wrong number of "%s"s. */
! 2191: char *yyp = yyresult;
! 2192: int yyi = 0;
! 2193: while ((*yyp = *yyf) != '\0')
! 2194: {
! 2195: if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
! 2196: {
! 2197: yyp += yytnamerr (yyp, yyarg[yyi++]);
! 2198: yyf += 2;
! 2199: }
! 2200: else
! 2201: {
! 2202: yyp++;
! 2203: yyf++;
! 2204: }
! 2205: }
! 2206: }
! 2207: return yysize;
! 2208: }
! 2209: }
! 2210: #endif /* YYERROR_VERBOSE */
! 2211:
! 2212:
! 2213: /*-----------------------------------------------.
! 2214: | Release the memory associated to this symbol. |
! 2215: `-----------------------------------------------*/
! 2216:
! 2217: /*ARGSUSED*/
! 2218: #if (defined __STDC__ || defined __C99__FUNC__ \
! 2219: || defined __cplusplus || defined _MSC_VER)
! 2220: static void
! 2221: yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
! 2222: #else
! 2223: static void
! 2224: yydestruct (yymsg, yytype, yyvaluep)
! 2225: const char *yymsg;
! 2226: int yytype;
! 2227: YYSTYPE *yyvaluep;
! 2228: #endif
! 2229: {
! 2230: YYUSE (yyvaluep);
! 2231:
! 2232: if (!yymsg)
! 2233: yymsg = "Deleting";
! 2234: YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
! 2235:
! 2236: switch (yytype)
! 2237: {
! 2238:
! 2239: default:
! 2240: break;
! 2241: }
! 2242: }
! 2243:
! 2244: /* Prevent warnings from -Wmissing-prototypes. */
! 2245: #ifdef YYPARSE_PARAM
! 2246: #if defined __STDC__ || defined __cplusplus
! 2247: int yyparse (void *YYPARSE_PARAM);
! 2248: #else
! 2249: int yyparse ();
! 2250: #endif
! 2251: #else /* ! YYPARSE_PARAM */
! 2252: #if defined __STDC__ || defined __cplusplus
! 2253: int yyparse (void);
! 2254: #else
! 2255: int yyparse ();
! 2256: #endif
! 2257: #endif /* ! YYPARSE_PARAM */
! 2258:
! 2259:
! 2260: /* The lookahead symbol. */
! 2261: int yychar;
! 2262:
! 2263: /* The semantic value of the lookahead symbol. */
! 2264: YYSTYPE yylval;
! 2265:
! 2266: /* Number of syntax errors so far. */
! 2267: int yynerrs;
! 2268:
! 2269:
! 2270:
! 2271: /*-------------------------.
! 2272: | yyparse or yypush_parse. |
! 2273: `-------------------------*/
! 2274:
! 2275: #ifdef YYPARSE_PARAM
! 2276: #if (defined __STDC__ || defined __C99__FUNC__ \
! 2277: || defined __cplusplus || defined _MSC_VER)
! 2278: int
! 2279: yyparse (void *YYPARSE_PARAM)
! 2280: #else
! 2281: int
! 2282: yyparse (YYPARSE_PARAM)
! 2283: void *YYPARSE_PARAM;
! 2284: #endif
! 2285: #else /* ! YYPARSE_PARAM */
! 2286: #if (defined __STDC__ || defined __C99__FUNC__ \
! 2287: || defined __cplusplus || defined _MSC_VER)
! 2288: int
! 2289: yyparse (void)
! 2290: #else
! 2291: int
! 2292: yyparse ()
! 2293:
! 2294: #endif
! 2295: #endif
! 2296: {
! 2297:
! 2298:
! 2299: int yystate;
! 2300: /* Number of tokens to shift before error messages enabled. */
! 2301: int yyerrstatus;
! 2302:
! 2303: /* The stacks and their tools:
! 2304: `yyss': related to states.
! 2305: `yyvs': related to semantic values.
! 2306:
! 2307: Refer to the stacks thru separate pointers, to allow yyoverflow
! 2308: to reallocate them elsewhere. */
! 2309:
! 2310: /* The state stack. */
! 2311: yytype_int16 yyssa[YYINITDEPTH];
! 2312: yytype_int16 *yyss;
! 2313: yytype_int16 *yyssp;
! 2314:
! 2315: /* The semantic value stack. */
! 2316: YYSTYPE yyvsa[YYINITDEPTH];
! 2317: YYSTYPE *yyvs;
! 2318: YYSTYPE *yyvsp;
! 2319:
! 2320: YYSIZE_T yystacksize;
! 2321:
! 2322: int yyn;
! 2323: int yyresult;
! 2324: /* Lookahead token as an internal (translated) token number. */
! 2325: int yytoken;
! 2326: /* The variables used to return semantic value and location from the
! 2327: action routines. */
! 2328: YYSTYPE yyval;
! 2329:
! 2330: #if YYERROR_VERBOSE
! 2331: /* Buffer for error messages, and its allocated size. */
! 2332: char yymsgbuf[128];
! 2333: char *yymsg = yymsgbuf;
! 2334: YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
! 2335: #endif
! 2336:
! 2337: #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
! 2338:
! 2339: /* The number of symbols on the RHS of the reduced rule.
! 2340: Keep to zero when no symbol should be popped. */
! 2341: int yylen = 0;
! 2342:
! 2343: yytoken = 0;
! 2344: yyss = yyssa;
! 2345: yyvs = yyvsa;
! 2346: yystacksize = YYINITDEPTH;
! 2347:
! 2348: YYDPRINTF ((stderr, "Starting parse\n"));
! 2349:
! 2350: yystate = 0;
! 2351: yyerrstatus = 0;
! 2352: yynerrs = 0;
! 2353: yychar = YYEMPTY; /* Cause a token to be read. */
! 2354:
! 2355: /* Initialize stack pointers.
! 2356: Waste one element of value and location stack
! 2357: so that they stay on the same level as the state stack.
! 2358: The wasted elements are never initialized. */
! 2359: yyssp = yyss;
! 2360: yyvsp = yyvs;
! 2361:
! 2362: goto yysetstate;
! 2363:
! 2364: /*------------------------------------------------------------.
! 2365: | yynewstate -- Push a new state, which is found in yystate. |
! 2366: `------------------------------------------------------------*/
! 2367: yynewstate:
! 2368: /* In all cases, when you get here, the value and location stacks
! 2369: have just been pushed. So pushing a state here evens the stacks. */
! 2370: yyssp++;
! 2371:
! 2372: yysetstate:
! 2373: *yyssp = yystate;
! 2374:
! 2375: if (yyss + yystacksize - 1 <= yyssp)
! 2376: {
! 2377: /* Get the current used size of the three stacks, in elements. */
! 2378: YYSIZE_T yysize = yyssp - yyss + 1;
! 2379:
! 2380: #ifdef yyoverflow
! 2381: {
! 2382: /* Give user a chance to reallocate the stack. Use copies of
! 2383: these so that the &'s don't force the real ones into
! 2384: memory. */
! 2385: YYSTYPE *yyvs1 = yyvs;
! 2386: yytype_int16 *yyss1 = yyss;
! 2387:
! 2388: /* Each stack pointer address is followed by the size of the
! 2389: data in use in that stack, in bytes. This used to be a
! 2390: conditional around just the two extra args, but that might
! 2391: be undefined if yyoverflow is a macro. */
! 2392: yyoverflow (YY_("memory exhausted"),
! 2393: &yyss1, yysize * sizeof (*yyssp),
! 2394: &yyvs1, yysize * sizeof (*yyvsp),
! 2395: &yystacksize);
! 2396:
! 2397: yyss = yyss1;
! 2398: yyvs = yyvs1;
! 2399: }
! 2400: #else /* no yyoverflow */
! 2401: # ifndef YYSTACK_RELOCATE
! 2402: goto yyexhaustedlab;
! 2403: # else
! 2404: /* Extend the stack our own way. */
! 2405: if (YYMAXDEPTH <= yystacksize)
! 2406: goto yyexhaustedlab;
! 2407: yystacksize *= 2;
! 2408: if (YYMAXDEPTH < yystacksize)
! 2409: yystacksize = YYMAXDEPTH;
! 2410:
! 2411: {
! 2412: yytype_int16 *yyss1 = yyss;
! 2413: union yyalloc *yyptr =
! 2414: (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
! 2415: if (! yyptr)
! 2416: goto yyexhaustedlab;
! 2417: YYSTACK_RELOCATE (yyss_alloc, yyss);
! 2418: YYSTACK_RELOCATE (yyvs_alloc, yyvs);
! 2419: # undef YYSTACK_RELOCATE
! 2420: if (yyss1 != yyssa)
! 2421: YYSTACK_FREE (yyss1);
! 2422: }
! 2423: # endif
! 2424: #endif /* no yyoverflow */
! 2425:
! 2426: yyssp = yyss + yysize - 1;
! 2427: yyvsp = yyvs + yysize - 1;
! 2428:
! 2429: YYDPRINTF ((stderr, "Stack size increased to %lu\n",
! 2430: (unsigned long int) yystacksize));
! 2431:
! 2432: if (yyss + yystacksize - 1 <= yyssp)
! 2433: YYABORT;
! 2434: }
! 2435:
! 2436: YYDPRINTF ((stderr, "Entering state %d\n", yystate));
! 2437:
! 2438: if (yystate == YYFINAL)
! 2439: YYACCEPT;
! 2440:
! 2441: goto yybackup;
! 2442:
! 2443: /*-----------.
! 2444: | yybackup. |
! 2445: `-----------*/
! 2446: yybackup:
! 2447:
! 2448: /* Do appropriate processing given the current state. Read a
! 2449: lookahead token if we need one and don't already have one. */
! 2450:
! 2451: /* First try to decide what to do without reference to lookahead token. */
! 2452: yyn = yypact[yystate];
! 2453: if (yyn == YYPACT_NINF)
! 2454: goto yydefault;
! 2455:
! 2456: /* Not known => get a lookahead token if don't already have one. */
! 2457:
! 2458: /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
! 2459: if (yychar == YYEMPTY)
! 2460: {
! 2461: YYDPRINTF ((stderr, "Reading a token: "));
! 2462: yychar = YYLEX;
! 2463: }
! 2464:
! 2465: if (yychar <= YYEOF)
! 2466: {
! 2467: yychar = yytoken = YYEOF;
! 2468: YYDPRINTF ((stderr, "Now at end of input.\n"));
! 2469: }
! 2470: else
! 2471: {
! 2472: yytoken = YYTRANSLATE (yychar);
! 2473: YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
! 2474: }
! 2475:
! 2476: /* If the proper action on seeing token YYTOKEN is to reduce or to
! 2477: detect an error, take that action. */
! 2478: yyn += yytoken;
! 2479: if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
! 2480: goto yydefault;
! 2481: yyn = yytable[yyn];
! 2482: if (yyn <= 0)
! 2483: {
! 2484: if (yyn == 0 || yyn == YYTABLE_NINF)
! 2485: goto yyerrlab;
! 2486: yyn = -yyn;
! 2487: goto yyreduce;
! 2488: }
! 2489:
! 2490: /* Count tokens shifted since error; after three, turn off error
! 2491: status. */
! 2492: if (yyerrstatus)
! 2493: yyerrstatus--;
! 2494:
! 2495: /* Shift the lookahead token. */
! 2496: YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
! 2497:
! 2498: /* Discard the shifted token. */
! 2499: yychar = YYEMPTY;
! 2500:
! 2501: yystate = yyn;
! 2502: *++yyvsp = yylval;
! 2503:
! 2504: goto yynewstate;
! 2505:
! 2506:
! 2507: /*-----------------------------------------------------------.
! 2508: | yydefault -- do the default action for the current state. |
! 2509: `-----------------------------------------------------------*/
! 2510: yydefault:
! 2511: yyn = yydefact[yystate];
! 2512: if (yyn == 0)
! 2513: goto yyerrlab;
! 2514: goto yyreduce;
! 2515:
! 2516:
! 2517: /*-----------------------------.
! 2518: | yyreduce -- Do a reduction. |
! 2519: `-----------------------------*/
! 2520: yyreduce:
! 2521: /* yyn is the number of a rule to reduce with. */
! 2522: yylen = yyr2[yyn];
! 2523:
! 2524: /* If YYLEN is nonzero, implement the default value of the action:
! 2525: `$$ = $1'.
! 2526:
! 2527: Otherwise, the following line sets YYVAL to garbage.
! 2528: This behavior is undocumented and Bison
! 2529: users should not rely upon it. Assigning to YYVAL
! 2530: unconditionally makes the parser a bit smaller, and it avoids a
! 2531: GCC warning that YYVAL may be used uninitialized. */
! 2532: yyval = yyvsp[1-yylen];
! 2533:
! 2534:
! 2535: YY_REDUCE_PRINT (yyn);
! 2536: switch (yyn)
! 2537: {
! 2538: case 22:
! 2539:
! 2540: /* Line 1455 of yacc.c */
! 2541: #line 298 "cfparse.y"
! 2542: {
! 2543: struct passwd *pw;
! 2544:
! 2545: if ((pw = getpwnam((yyvsp[(2) - (2)].val)->v)) == NULL) {
! 2546: yyerror("unknown user \"%s\"", (yyvsp[(2) - (2)].val)->v);
! 2547: return -1;
! 2548: }
! 2549: lcconf->uid = pw->pw_uid;
! 2550: }
! 2551: break;
! 2552:
! 2553: case 24:
! 2554:
! 2555: /* Line 1455 of yacc.c */
! 2556: #line 308 "cfparse.y"
! 2557: { lcconf->uid = (yyvsp[(2) - (2)].num); }
! 2558: break;
! 2559:
! 2560: case 26:
! 2561:
! 2562: /* Line 1455 of yacc.c */
! 2563: #line 310 "cfparse.y"
! 2564: {
! 2565: struct group *gr;
! 2566:
! 2567: if ((gr = getgrnam((yyvsp[(2) - (2)].val)->v)) == NULL) {
! 2568: yyerror("unknown group \"%s\"", (yyvsp[(2) - (2)].val)->v);
! 2569: return -1;
! 2570: }
! 2571: lcconf->gid = gr->gr_gid;
! 2572: }
! 2573: break;
! 2574:
! 2575: case 28:
! 2576:
! 2577: /* Line 1455 of yacc.c */
! 2578: #line 320 "cfparse.y"
! 2579: { lcconf->gid = (yyvsp[(2) - (2)].num); }
! 2580: break;
! 2581:
! 2582: case 30:
! 2583:
! 2584: /* Line 1455 of yacc.c */
! 2585: #line 321 "cfparse.y"
! 2586: { lcconf->chroot = (yyvsp[(2) - (2)].val)->v; }
! 2587: break;
! 2588:
! 2589: case 32:
! 2590:
! 2591: /* Line 1455 of yacc.c */
! 2592: #line 327 "cfparse.y"
! 2593: {
! 2594: if ((yyvsp[(2) - (3)].num) >= LC_PATHTYPE_MAX) {
! 2595: yyerror("invalid path type %d", (yyvsp[(2) - (3)].num));
! 2596: return -1;
! 2597: }
! 2598:
! 2599: /* free old pathinfo */
! 2600: if (lcconf->pathinfo[(yyvsp[(2) - (3)].num)])
! 2601: racoon_free(lcconf->pathinfo[(yyvsp[(2) - (3)].num)]);
! 2602:
! 2603: /* set new pathinfo */
! 2604: lcconf->pathinfo[(yyvsp[(2) - (3)].num)] = racoon_strdup((yyvsp[(3) - (3)].val)->v);
! 2605: STRDUP_FATAL(lcconf->pathinfo[(yyvsp[(2) - (3)].num)]);
! 2606: vfree((yyvsp[(3) - (3)].val));
! 2607: }
! 2608: break;
! 2609:
! 2610: case 34:
! 2611:
! 2612: /* Line 1455 of yacc.c */
! 2613: #line 347 "cfparse.y"
! 2614: { lcconf->complex_bundle = (yyvsp[(2) - (2)].num); }
! 2615: break;
! 2616:
! 2617: case 36:
! 2618:
! 2619: /* Line 1455 of yacc.c */
! 2620: #line 353 "cfparse.y"
! 2621: {
! 2622: char path[MAXPATHLEN];
! 2623:
! 2624: getpathname(path, sizeof(path),
! 2625: LC_PATHTYPE_INCLUDE, (yyvsp[(2) - (3)].val)->v);
! 2626: vfree((yyvsp[(2) - (3)].val));
! 2627: if (yycf_switch_buffer(path) != 0)
! 2628: return -1;
! 2629: }
! 2630: break;
! 2631:
! 2632: case 37:
! 2633:
! 2634: /* Line 1455 of yacc.c */
! 2635: #line 367 "cfparse.y"
! 2636: {
! 2637: lcconf->pfkey_buffer_size = (yyvsp[(2) - (3)].num);
! 2638: }
! 2639: break;
! 2640:
! 2641: case 38:
! 2642:
! 2643: /* Line 1455 of yacc.c */
! 2644: #line 374 "cfparse.y"
! 2645: {
! 2646: if ((yyvsp[(2) - (3)].num) >= LC_GSSENC_MAX) {
! 2647: yyerror("invalid GSS ID encoding %d", (yyvsp[(2) - (3)].num));
! 2648: return -1;
! 2649: }
! 2650: lcconf->gss_id_enc = (yyvsp[(2) - (3)].num);
! 2651: }
! 2652: break;
! 2653:
! 2654: case 40:
! 2655:
! 2656: /* Line 1455 of yacc.c */
! 2657: #line 389 "cfparse.y"
! 2658: {
! 2659: /*
! 2660: * set the loglevel to the value specified
! 2661: * in the configuration file plus the number
! 2662: * of -d options specified on the command line
! 2663: */
! 2664: loglevel += (yyvsp[(1) - (1)].num) - oldloglevel;
! 2665: oldloglevel = (yyvsp[(1) - (1)].num);
! 2666: }
! 2667: break;
! 2668:
! 2669: case 44:
! 2670:
! 2671: /* Line 1455 of yacc.c */
! 2672: #line 409 "cfparse.y"
! 2673: { lcconf->pad_random = (yyvsp[(2) - (2)].num); }
! 2674: break;
! 2675:
! 2676: case 46:
! 2677:
! 2678: /* Line 1455 of yacc.c */
! 2679: #line 410 "cfparse.y"
! 2680: { lcconf->pad_randomlen = (yyvsp[(2) - (2)].num); }
! 2681: break;
! 2682:
! 2683: case 48:
! 2684:
! 2685: /* Line 1455 of yacc.c */
! 2686: #line 411 "cfparse.y"
! 2687: { lcconf->pad_maxsize = (yyvsp[(2) - (2)].num); }
! 2688: break;
! 2689:
! 2690: case 50:
! 2691:
! 2692: /* Line 1455 of yacc.c */
! 2693: #line 412 "cfparse.y"
! 2694: { lcconf->pad_strict = (yyvsp[(2) - (2)].num); }
! 2695: break;
! 2696:
! 2697: case 52:
! 2698:
! 2699: /* Line 1455 of yacc.c */
! 2700: #line 413 "cfparse.y"
! 2701: { lcconf->pad_excltail = (yyvsp[(2) - (2)].num); }
! 2702: break;
! 2703:
! 2704: case 57:
! 2705:
! 2706: /* Line 1455 of yacc.c */
! 2707: #line 426 "cfparse.y"
! 2708: {
! 2709: myaddr_listen((yyvsp[(2) - (2)].saddr), FALSE);
! 2710: racoon_free((yyvsp[(2) - (2)].saddr));
! 2711: }
! 2712: break;
! 2713:
! 2714: case 59:
! 2715:
! 2716: /* Line 1455 of yacc.c */
! 2717: #line 432 "cfparse.y"
! 2718: {
! 2719: #ifdef ENABLE_NATT
! 2720: myaddr_listen((yyvsp[(2) - (2)].saddr), TRUE);
! 2721: racoon_free((yyvsp[(2) - (2)].saddr));
! 2722: #else
! 2723: racoon_free((yyvsp[(2) - (2)].saddr));
! 2724: yyerror("NAT-T support not compiled in.");
! 2725: #endif
! 2726: }
! 2727: break;
! 2728:
! 2729: case 61:
! 2730:
! 2731: /* Line 1455 of yacc.c */
! 2732: #line 443 "cfparse.y"
! 2733: {
! 2734: #ifdef ENABLE_ADMINPORT
! 2735: adminsock_conf((yyvsp[(2) - (5)].val), (yyvsp[(3) - (5)].val), (yyvsp[(4) - (5)].val), (yyvsp[(5) - (5)].num));
! 2736: #else
! 2737: yywarn("admin port support not compiled in");
! 2738: #endif
! 2739: }
! 2740: break;
! 2741:
! 2742: case 63:
! 2743:
! 2744: /* Line 1455 of yacc.c */
! 2745: #line 452 "cfparse.y"
! 2746: {
! 2747: #ifdef ENABLE_ADMINPORT
! 2748: adminsock_conf((yyvsp[(2) - (2)].val), NULL, NULL, -1);
! 2749: #else
! 2750: yywarn("admin port support not compiled in");
! 2751: #endif
! 2752: }
! 2753: break;
! 2754:
! 2755: case 65:
! 2756:
! 2757: /* Line 1455 of yacc.c */
! 2758: #line 461 "cfparse.y"
! 2759: {
! 2760: #ifdef ENABLE_ADMINPORT
! 2761: adminsock_path = NULL;
! 2762: #else
! 2763: yywarn("admin port support not compiled in");
! 2764: #endif
! 2765: }
! 2766: break;
! 2767:
! 2768: case 67:
! 2769:
! 2770: /* Line 1455 of yacc.c */
! 2771: #line 469 "cfparse.y"
! 2772: { lcconf->strict_address = TRUE; }
! 2773: break;
! 2774:
! 2775: case 69:
! 2776:
! 2777: /* Line 1455 of yacc.c */
! 2778: #line 473 "cfparse.y"
! 2779: {
! 2780: char portbuf[10];
! 2781:
! 2782: snprintf(portbuf, sizeof(portbuf), "%ld", (yyvsp[(2) - (2)].num));
! 2783: (yyval.saddr) = str2saddr((yyvsp[(1) - (2)].val)->v, portbuf);
! 2784: vfree((yyvsp[(1) - (2)].val));
! 2785: if (!(yyval.saddr))
! 2786: return -1;
! 2787: }
! 2788: break;
! 2789:
! 2790: case 70:
! 2791:
! 2792: /* Line 1455 of yacc.c */
! 2793: #line 484 "cfparse.y"
! 2794: { (yyval.num) = PORT_ISAKMP; }
! 2795: break;
! 2796:
! 2797: case 71:
! 2798:
! 2799: /* Line 1455 of yacc.c */
! 2800: #line 485 "cfparse.y"
! 2801: { (yyval.num) = (yyvsp[(1) - (1)].num); }
! 2802: break;
! 2803:
! 2804: case 72:
! 2805:
! 2806: /* Line 1455 of yacc.c */
! 2807: #line 490 "cfparse.y"
! 2808: {
! 2809: #ifndef ENABLE_HYBRID
! 2810: yyerror("racoon not configured with --enable-hybrid");
! 2811: return -1;
! 2812: #endif
! 2813: #ifndef HAVE_LIBRADIUS
! 2814: yyerror("racoon not configured with --with-libradius");
! 2815: return -1;
! 2816: #endif
! 2817: #ifdef ENABLE_HYBRID
! 2818: #ifdef HAVE_LIBRADIUS
! 2819: xauth_rad_config.timeout = 3;
! 2820: xauth_rad_config.retries = 3;
! 2821: #endif
! 2822: #endif
! 2823: }
! 2824: break;
! 2825:
! 2826: case 76:
! 2827:
! 2828: /* Line 1455 of yacc.c */
! 2829: #line 513 "cfparse.y"
! 2830: {
! 2831: #ifdef ENABLE_HYBRID
! 2832: #ifdef HAVE_LIBRADIUS
! 2833: int i = xauth_rad_config.auth_server_count;
! 2834: if (i == RADIUS_MAX_SERVERS) {
! 2835: yyerror("maximum radius auth servers exceeded");
! 2836: return -1;
! 2837: }
! 2838:
! 2839: xauth_rad_config.auth_server_list[i].host = vdup((yyvsp[(2) - (3)].val));
! 2840: xauth_rad_config.auth_server_list[i].secret = vdup((yyvsp[(3) - (3)].val));
! 2841: xauth_rad_config.auth_server_list[i].port = 0; // default port
! 2842: xauth_rad_config.auth_server_count++;
! 2843: #endif
! 2844: #endif
! 2845: }
! 2846: break;
! 2847:
! 2848: case 78:
! 2849:
! 2850: /* Line 1455 of yacc.c */
! 2851: #line 531 "cfparse.y"
! 2852: {
! 2853: #ifdef ENABLE_HYBRID
! 2854: #ifdef HAVE_LIBRADIUS
! 2855: int i = xauth_rad_config.auth_server_count;
! 2856: if (i == RADIUS_MAX_SERVERS) {
! 2857: yyerror("maximum radius auth servers exceeded");
! 2858: return -1;
! 2859: }
! 2860:
! 2861: xauth_rad_config.auth_server_list[i].host = vdup((yyvsp[(2) - (4)].val));
! 2862: xauth_rad_config.auth_server_list[i].secret = vdup((yyvsp[(4) - (4)].val));
! 2863: xauth_rad_config.auth_server_list[i].port = (yyvsp[(3) - (4)].num);
! 2864: xauth_rad_config.auth_server_count++;
! 2865: #endif
! 2866: #endif
! 2867: }
! 2868: break;
! 2869:
! 2870: case 80:
! 2871:
! 2872: /* Line 1455 of yacc.c */
! 2873: #line 549 "cfparse.y"
! 2874: {
! 2875: #ifdef ENABLE_HYBRID
! 2876: #ifdef HAVE_LIBRADIUS
! 2877: int i = xauth_rad_config.acct_server_count;
! 2878: if (i == RADIUS_MAX_SERVERS) {
! 2879: yyerror("maximum radius account servers exceeded");
! 2880: return -1;
! 2881: }
! 2882:
! 2883: xauth_rad_config.acct_server_list[i].host = vdup((yyvsp[(2) - (3)].val));
! 2884: xauth_rad_config.acct_server_list[i].secret = vdup((yyvsp[(3) - (3)].val));
! 2885: xauth_rad_config.acct_server_list[i].port = 0; // default port
! 2886: xauth_rad_config.acct_server_count++;
! 2887: #endif
! 2888: #endif
! 2889: }
! 2890: break;
! 2891:
! 2892: case 82:
! 2893:
! 2894: /* Line 1455 of yacc.c */
! 2895: #line 567 "cfparse.y"
! 2896: {
! 2897: #ifdef ENABLE_HYBRID
! 2898: #ifdef HAVE_LIBRADIUS
! 2899: int i = xauth_rad_config.acct_server_count;
! 2900: if (i == RADIUS_MAX_SERVERS) {
! 2901: yyerror("maximum radius account servers exceeded");
! 2902: return -1;
! 2903: }
! 2904:
! 2905: xauth_rad_config.acct_server_list[i].host = vdup((yyvsp[(2) - (4)].val));
! 2906: xauth_rad_config.acct_server_list[i].secret = vdup((yyvsp[(4) - (4)].val));
! 2907: xauth_rad_config.acct_server_list[i].port = (yyvsp[(3) - (4)].num);
! 2908: xauth_rad_config.acct_server_count++;
! 2909: #endif
! 2910: #endif
! 2911: }
! 2912: break;
! 2913:
! 2914: case 84:
! 2915:
! 2916: /* Line 1455 of yacc.c */
! 2917: #line 585 "cfparse.y"
! 2918: {
! 2919: #ifdef ENABLE_HYBRID
! 2920: #ifdef HAVE_LIBRADIUS
! 2921: xauth_rad_config.timeout = (yyvsp[(2) - (2)].num);
! 2922: #endif
! 2923: #endif
! 2924: }
! 2925: break;
! 2926:
! 2927: case 86:
! 2928:
! 2929: /* Line 1455 of yacc.c */
! 2930: #line 594 "cfparse.y"
! 2931: {
! 2932: #ifdef ENABLE_HYBRID
! 2933: #ifdef HAVE_LIBRADIUS
! 2934: xauth_rad_config.retries = (yyvsp[(2) - (2)].num);
! 2935: #endif
! 2936: #endif
! 2937: }
! 2938: break;
! 2939:
! 2940: case 88:
! 2941:
! 2942: /* Line 1455 of yacc.c */
! 2943: #line 606 "cfparse.y"
! 2944: {
! 2945: #ifndef ENABLE_HYBRID
! 2946: yyerror("racoon not configured with --enable-hybrid");
! 2947: return -1;
! 2948: #endif
! 2949: #ifndef HAVE_LIBLDAP
! 2950: yyerror("racoon not configured with --with-libldap");
! 2951: return -1;
! 2952: #endif
! 2953: }
! 2954: break;
! 2955:
! 2956: case 92:
! 2957:
! 2958: /* Line 1455 of yacc.c */
! 2959: #line 623 "cfparse.y"
! 2960: {
! 2961: #ifdef ENABLE_HYBRID
! 2962: #ifdef HAVE_LIBLDAP
! 2963: if (((yyvsp[(2) - (2)].num)<2)||((yyvsp[(2) - (2)].num)>3))
! 2964: yyerror("invalid ldap protocol version (2|3)");
! 2965: xauth_ldap_config.pver = (yyvsp[(2) - (2)].num);
! 2966: #endif
! 2967: #endif
! 2968: }
! 2969: break;
! 2970:
! 2971: case 94:
! 2972:
! 2973: /* Line 1455 of yacc.c */
! 2974: #line 634 "cfparse.y"
! 2975: {
! 2976: #ifdef ENABLE_HYBRID
! 2977: #ifdef HAVE_LIBLDAP
! 2978: if (xauth_ldap_config.host != NULL)
! 2979: vfree(xauth_ldap_config.host);
! 2980: xauth_ldap_config.host = vdup((yyvsp[(2) - (2)].val));
! 2981: #endif
! 2982: #endif
! 2983: }
! 2984: break;
! 2985:
! 2986: case 96:
! 2987:
! 2988: /* Line 1455 of yacc.c */
! 2989: #line 645 "cfparse.y"
! 2990: {
! 2991: #ifdef ENABLE_HYBRID
! 2992: #ifdef HAVE_LIBLDAP
! 2993: xauth_ldap_config.port = (yyvsp[(2) - (2)].num);
! 2994: #endif
! 2995: #endif
! 2996: }
! 2997: break;
! 2998:
! 2999: case 98:
! 3000:
! 3001: /* Line 1455 of yacc.c */
! 3002: #line 654 "cfparse.y"
! 3003: {
! 3004: #ifdef ENABLE_HYBRID
! 3005: #ifdef HAVE_LIBLDAP
! 3006: if (xauth_ldap_config.base != NULL)
! 3007: vfree(xauth_ldap_config.base);
! 3008: xauth_ldap_config.base = vdup((yyvsp[(2) - (2)].val));
! 3009: #endif
! 3010: #endif
! 3011: }
! 3012: break;
! 3013:
! 3014: case 100:
! 3015:
! 3016: /* Line 1455 of yacc.c */
! 3017: #line 665 "cfparse.y"
! 3018: {
! 3019: #ifdef ENABLE_HYBRID
! 3020: #ifdef HAVE_LIBLDAP
! 3021: xauth_ldap_config.subtree = (yyvsp[(2) - (2)].num);
! 3022: #endif
! 3023: #endif
! 3024: }
! 3025: break;
! 3026:
! 3027: case 102:
! 3028:
! 3029: /* Line 1455 of yacc.c */
! 3030: #line 674 "cfparse.y"
! 3031: {
! 3032: #ifdef ENABLE_HYBRID
! 3033: #ifdef HAVE_LIBLDAP
! 3034: if (xauth_ldap_config.bind_dn != NULL)
! 3035: vfree(xauth_ldap_config.bind_dn);
! 3036: xauth_ldap_config.bind_dn = vdup((yyvsp[(2) - (2)].val));
! 3037: #endif
! 3038: #endif
! 3039: }
! 3040: break;
! 3041:
! 3042: case 104:
! 3043:
! 3044: /* Line 1455 of yacc.c */
! 3045: #line 685 "cfparse.y"
! 3046: {
! 3047: #ifdef ENABLE_HYBRID
! 3048: #ifdef HAVE_LIBLDAP
! 3049: if (xauth_ldap_config.bind_pw != NULL)
! 3050: vfree(xauth_ldap_config.bind_pw);
! 3051: xauth_ldap_config.bind_pw = vdup((yyvsp[(2) - (2)].val));
! 3052: #endif
! 3053: #endif
! 3054: }
! 3055: break;
! 3056:
! 3057: case 106:
! 3058:
! 3059: /* Line 1455 of yacc.c */
! 3060: #line 696 "cfparse.y"
! 3061: {
! 3062: #ifdef ENABLE_HYBRID
! 3063: #ifdef HAVE_LIBLDAP
! 3064: if (xauth_ldap_config.attr_user != NULL)
! 3065: vfree(xauth_ldap_config.attr_user);
! 3066: xauth_ldap_config.attr_user = vdup((yyvsp[(2) - (2)].val));
! 3067: #endif
! 3068: #endif
! 3069: }
! 3070: break;
! 3071:
! 3072: case 108:
! 3073:
! 3074: /* Line 1455 of yacc.c */
! 3075: #line 707 "cfparse.y"
! 3076: {
! 3077: #ifdef ENABLE_HYBRID
! 3078: #ifdef HAVE_LIBLDAP
! 3079: if (xauth_ldap_config.attr_addr != NULL)
! 3080: vfree(xauth_ldap_config.attr_addr);
! 3081: xauth_ldap_config.attr_addr = vdup((yyvsp[(2) - (2)].val));
! 3082: #endif
! 3083: #endif
! 3084: }
! 3085: break;
! 3086:
! 3087: case 110:
! 3088:
! 3089: /* Line 1455 of yacc.c */
! 3090: #line 718 "cfparse.y"
! 3091: {
! 3092: #ifdef ENABLE_HYBRID
! 3093: #ifdef HAVE_LIBLDAP
! 3094: if (xauth_ldap_config.attr_mask != NULL)
! 3095: vfree(xauth_ldap_config.attr_mask);
! 3096: xauth_ldap_config.attr_mask = vdup((yyvsp[(2) - (2)].val));
! 3097: #endif
! 3098: #endif
! 3099: }
! 3100: break;
! 3101:
! 3102: case 112:
! 3103:
! 3104: /* Line 1455 of yacc.c */
! 3105: #line 729 "cfparse.y"
! 3106: {
! 3107: #ifdef ENABLE_HYBRID
! 3108: #ifdef HAVE_LIBLDAP
! 3109: if (xauth_ldap_config.attr_group != NULL)
! 3110: vfree(xauth_ldap_config.attr_group);
! 3111: xauth_ldap_config.attr_group = vdup((yyvsp[(2) - (2)].val));
! 3112: #endif
! 3113: #endif
! 3114: }
! 3115: break;
! 3116:
! 3117: case 114:
! 3118:
! 3119: /* Line 1455 of yacc.c */
! 3120: #line 740 "cfparse.y"
! 3121: {
! 3122: #ifdef ENABLE_HYBRID
! 3123: #ifdef HAVE_LIBLDAP
! 3124: if (xauth_ldap_config.attr_member != NULL)
! 3125: vfree(xauth_ldap_config.attr_member);
! 3126: xauth_ldap_config.attr_member = vdup((yyvsp[(2) - (2)].val));
! 3127: #endif
! 3128: #endif
! 3129: }
! 3130: break;
! 3131:
! 3132: case 119:
! 3133:
! 3134: /* Line 1455 of yacc.c */
! 3135: #line 762 "cfparse.y"
! 3136: {
! 3137: #ifdef ENABLE_HYBRID
! 3138: if (inet_pton(AF_INET, (yyvsp[(2) - (2)].val)->v,
! 3139: &isakmp_cfg_config.network4) != 1)
! 3140: yyerror("bad IPv4 network address.");
! 3141: #else
! 3142: yyerror("racoon not configured with --enable-hybrid");
! 3143: #endif
! 3144: }
! 3145: break;
! 3146:
! 3147: case 121:
! 3148:
! 3149: /* Line 1455 of yacc.c */
! 3150: #line 773 "cfparse.y"
! 3151: {
! 3152: #ifdef ENABLE_HYBRID
! 3153: if (inet_pton(AF_INET, (yyvsp[(2) - (2)].val)->v,
! 3154: &isakmp_cfg_config.netmask4) != 1)
! 3155: yyerror("bad IPv4 netmask address.");
! 3156: #else
! 3157: yyerror("racoon not configured with --enable-hybrid");
! 3158: #endif
! 3159: }
! 3160: break;
! 3161:
! 3162: case 125:
! 3163:
! 3164: /* Line 1455 of yacc.c */
! 3165: #line 788 "cfparse.y"
! 3166: {
! 3167: #ifdef ENABLE_HYBRID
! 3168: isakmp_cfg_config.splitnet_type = UNITY_LOCAL_LAN;
! 3169: #else
! 3170: yyerror("racoon not configured with --enable-hybrid");
! 3171: #endif
! 3172: }
! 3173: break;
! 3174:
! 3175: case 127:
! 3176:
! 3177: /* Line 1455 of yacc.c */
! 3178: #line 797 "cfparse.y"
! 3179: {
! 3180: #ifdef ENABLE_HYBRID
! 3181: isakmp_cfg_config.splitnet_type = UNITY_SPLIT_INCLUDE;
! 3182: #else
! 3183: yyerror("racoon not configured with --enable-hybrid");
! 3184: #endif
! 3185: }
! 3186: break;
! 3187:
! 3188: case 129:
! 3189:
! 3190: /* Line 1455 of yacc.c */
! 3191: #line 806 "cfparse.y"
! 3192: {
! 3193: #ifndef ENABLE_HYBRID
! 3194: yyerror("racoon not configured with --enable-hybrid");
! 3195: #endif
! 3196: }
! 3197: break;
! 3198:
! 3199: case 131:
! 3200:
! 3201: /* Line 1455 of yacc.c */
! 3202: #line 813 "cfparse.y"
! 3203: {
! 3204: #ifdef ENABLE_HYBRID
! 3205: strncpy(&isakmp_cfg_config.default_domain[0],
! 3206: (yyvsp[(2) - (2)].val)->v, MAXPATHLEN);
! 3207: isakmp_cfg_config.default_domain[MAXPATHLEN] = '\0';
! 3208: vfree((yyvsp[(2) - (2)].val));
! 3209: #else
! 3210: yyerror("racoon not configured with --enable-hybrid");
! 3211: #endif
! 3212: }
! 3213: break;
! 3214:
! 3215: case 133:
! 3216:
! 3217: /* Line 1455 of yacc.c */
! 3218: #line 825 "cfparse.y"
! 3219: {
! 3220: #ifdef ENABLE_HYBRID
! 3221: isakmp_cfg_config.authsource = ISAKMP_CFG_AUTH_SYSTEM;
! 3222: #else
! 3223: yyerror("racoon not configured with --enable-hybrid");
! 3224: #endif
! 3225: }
! 3226: break;
! 3227:
! 3228: case 135:
! 3229:
! 3230: /* Line 1455 of yacc.c */
! 3231: #line 834 "cfparse.y"
! 3232: {
! 3233: #ifdef ENABLE_HYBRID
! 3234: #ifdef HAVE_LIBRADIUS
! 3235: isakmp_cfg_config.authsource = ISAKMP_CFG_AUTH_RADIUS;
! 3236: #else /* HAVE_LIBRADIUS */
! 3237: yyerror("racoon not configured with --with-libradius");
! 3238: #endif /* HAVE_LIBRADIUS */
! 3239: #else /* ENABLE_HYBRID */
! 3240: yyerror("racoon not configured with --enable-hybrid");
! 3241: #endif /* ENABLE_HYBRID */
! 3242: }
! 3243: break;
! 3244:
! 3245: case 137:
! 3246:
! 3247: /* Line 1455 of yacc.c */
! 3248: #line 847 "cfparse.y"
! 3249: {
! 3250: #ifdef ENABLE_HYBRID
! 3251: #ifdef HAVE_LIBPAM
! 3252: isakmp_cfg_config.authsource = ISAKMP_CFG_AUTH_PAM;
! 3253: #else /* HAVE_LIBPAM */
! 3254: yyerror("racoon not configured with --with-libpam");
! 3255: #endif /* HAVE_LIBPAM */
! 3256: #else /* ENABLE_HYBRID */
! 3257: yyerror("racoon not configured with --enable-hybrid");
! 3258: #endif /* ENABLE_HYBRID */
! 3259: }
! 3260: break;
! 3261:
! 3262: case 139:
! 3263:
! 3264: /* Line 1455 of yacc.c */
! 3265: #line 860 "cfparse.y"
! 3266: {
! 3267: #ifdef ENABLE_HYBRID
! 3268: #ifdef HAVE_LIBLDAP
! 3269: isakmp_cfg_config.authsource = ISAKMP_CFG_AUTH_LDAP;
! 3270: #else /* HAVE_LIBLDAP */
! 3271: yyerror("racoon not configured with --with-libldap");
! 3272: #endif /* HAVE_LIBLDAP */
! 3273: #else /* ENABLE_HYBRID */
! 3274: yyerror("racoon not configured with --enable-hybrid");
! 3275: #endif /* ENABLE_HYBRID */
! 3276: }
! 3277: break;
! 3278:
! 3279: case 141:
! 3280:
! 3281: /* Line 1455 of yacc.c */
! 3282: #line 873 "cfparse.y"
! 3283: {
! 3284: #ifndef ENABLE_HYBRID
! 3285: yyerror("racoon not configured with --enable-hybrid");
! 3286: #endif
! 3287: }
! 3288: break;
! 3289:
! 3290: case 143:
! 3291:
! 3292: /* Line 1455 of yacc.c */
! 3293: #line 880 "cfparse.y"
! 3294: {
! 3295: #ifdef ENABLE_HYBRID
! 3296: isakmp_cfg_config.groupsource = ISAKMP_CFG_GROUP_SYSTEM;
! 3297: #else
! 3298: yyerror("racoon not configured with --enable-hybrid");
! 3299: #endif
! 3300: }
! 3301: break;
! 3302:
! 3303: case 145:
! 3304:
! 3305: /* Line 1455 of yacc.c */
! 3306: #line 889 "cfparse.y"
! 3307: {
! 3308: #ifdef ENABLE_HYBRID
! 3309: #ifdef HAVE_LIBLDAP
! 3310: isakmp_cfg_config.groupsource = ISAKMP_CFG_GROUP_LDAP;
! 3311: #else /* HAVE_LIBLDAP */
! 3312: yyerror("racoon not configured with --with-libldap");
! 3313: #endif /* HAVE_LIBLDAP */
! 3314: #else /* ENABLE_HYBRID */
! 3315: yyerror("racoon not configured with --enable-hybrid");
! 3316: #endif /* ENABLE_HYBRID */
! 3317: }
! 3318: break;
! 3319:
! 3320: case 147:
! 3321:
! 3322: /* Line 1455 of yacc.c */
! 3323: #line 902 "cfparse.y"
! 3324: {
! 3325: #ifdef ENABLE_HYBRID
! 3326: isakmp_cfg_config.accounting = ISAKMP_CFG_ACCT_NONE;
! 3327: #else
! 3328: yyerror("racoon not configured with --enable-hybrid");
! 3329: #endif
! 3330: }
! 3331: break;
! 3332:
! 3333: case 149:
! 3334:
! 3335: /* Line 1455 of yacc.c */
! 3336: #line 911 "cfparse.y"
! 3337: {
! 3338: #ifdef ENABLE_HYBRID
! 3339: isakmp_cfg_config.accounting = ISAKMP_CFG_ACCT_SYSTEM;
! 3340: #else
! 3341: yyerror("racoon not configured with --enable-hybrid");
! 3342: #endif
! 3343: }
! 3344: break;
! 3345:
! 3346: case 151:
! 3347:
! 3348: /* Line 1455 of yacc.c */
! 3349: #line 920 "cfparse.y"
! 3350: {
! 3351: #ifdef ENABLE_HYBRID
! 3352: #ifdef HAVE_LIBRADIUS
! 3353: isakmp_cfg_config.accounting = ISAKMP_CFG_ACCT_RADIUS;
! 3354: #else /* HAVE_LIBRADIUS */
! 3355: yyerror("racoon not configured with --with-libradius");
! 3356: #endif /* HAVE_LIBRADIUS */
! 3357: #else /* ENABLE_HYBRID */
! 3358: yyerror("racoon not configured with --enable-hybrid");
! 3359: #endif /* ENABLE_HYBRID */
! 3360: }
! 3361: break;
! 3362:
! 3363: case 153:
! 3364:
! 3365: /* Line 1455 of yacc.c */
! 3366: #line 933 "cfparse.y"
! 3367: {
! 3368: #ifdef ENABLE_HYBRID
! 3369: #ifdef HAVE_LIBPAM
! 3370: isakmp_cfg_config.accounting = ISAKMP_CFG_ACCT_PAM;
! 3371: #else /* HAVE_LIBPAM */
! 3372: yyerror("racoon not configured with --with-libpam");
! 3373: #endif /* HAVE_LIBPAM */
! 3374: #else /* ENABLE_HYBRID */
! 3375: yyerror("racoon not configured with --enable-hybrid");
! 3376: #endif /* ENABLE_HYBRID */
! 3377: }
! 3378: break;
! 3379:
! 3380: case 155:
! 3381:
! 3382: /* Line 1455 of yacc.c */
! 3383: #line 946 "cfparse.y"
! 3384: {
! 3385: #ifdef ENABLE_HYBRID
! 3386: if (isakmp_cfg_resize_pool((yyvsp[(2) - (2)].num)) != 0)
! 3387: yyerror("cannot allocate memory for pool");
! 3388: #else /* ENABLE_HYBRID */
! 3389: yyerror("racoon not configured with --enable-hybrid");
! 3390: #endif /* ENABLE_HYBRID */
! 3391: }
! 3392: break;
! 3393:
! 3394: case 157:
! 3395:
! 3396: /* Line 1455 of yacc.c */
! 3397: #line 956 "cfparse.y"
! 3398: {
! 3399: #ifdef ENABLE_HYBRID
! 3400: isakmp_cfg_config.pfs_group = (yyvsp[(2) - (2)].num);
! 3401: #else /* ENABLE_HYBRID */
! 3402: yyerror("racoon not configured with --enable-hybrid");
! 3403: #endif /* ENABLE_HYBRID */
! 3404: }
! 3405: break;
! 3406:
! 3407: case 159:
! 3408:
! 3409: /* Line 1455 of yacc.c */
! 3410: #line 965 "cfparse.y"
! 3411: {
! 3412: #ifdef ENABLE_HYBRID
! 3413: isakmp_cfg_config.save_passwd = (yyvsp[(2) - (2)].num);
! 3414: #else /* ENABLE_HYBRID */
! 3415: yyerror("racoon not configured with --enable-hybrid");
! 3416: #endif /* ENABLE_HYBRID */
! 3417: }
! 3418: break;
! 3419:
! 3420: case 161:
! 3421:
! 3422: /* Line 1455 of yacc.c */
! 3423: #line 974 "cfparse.y"
! 3424: {
! 3425: #ifdef ENABLE_HYBRID
! 3426: isakmp_cfg_config.auth_throttle = (yyvsp[(2) - (2)].num);
! 3427: #else /* ENABLE_HYBRID */
! 3428: yyerror("racoon not configured with --enable-hybrid");
! 3429: #endif /* ENABLE_HYBRID */
! 3430: }
! 3431: break;
! 3432:
! 3433: case 163:
! 3434:
! 3435: /* Line 1455 of yacc.c */
! 3436: #line 983 "cfparse.y"
! 3437: {
! 3438: #ifdef ENABLE_HYBRID
! 3439: isakmp_cfg_config.confsource = ISAKMP_CFG_CONF_LOCAL;
! 3440: #else /* ENABLE_HYBRID */
! 3441: yyerror("racoon not configured with --enable-hybrid");
! 3442: #endif /* ENABLE_HYBRID */
! 3443: }
! 3444: break;
! 3445:
! 3446: case 165:
! 3447:
! 3448: /* Line 1455 of yacc.c */
! 3449: #line 992 "cfparse.y"
! 3450: {
! 3451: #ifdef ENABLE_HYBRID
! 3452: #ifdef HAVE_LIBRADIUS
! 3453: isakmp_cfg_config.confsource = ISAKMP_CFG_CONF_RADIUS;
! 3454: #else /* HAVE_LIBRADIUS */
! 3455: yyerror("racoon not configured with --with-libradius");
! 3456: #endif /* HAVE_LIBRADIUS */
! 3457: #else /* ENABLE_HYBRID */
! 3458: yyerror("racoon not configured with --enable-hybrid");
! 3459: #endif /* ENABLE_HYBRID */
! 3460: }
! 3461: break;
! 3462:
! 3463: case 167:
! 3464:
! 3465: /* Line 1455 of yacc.c */
! 3466: #line 1005 "cfparse.y"
! 3467: {
! 3468: #ifdef ENABLE_HYBRID
! 3469: #ifdef HAVE_LIBLDAP
! 3470: isakmp_cfg_config.confsource = ISAKMP_CFG_CONF_LDAP;
! 3471: #else /* HAVE_LIBLDAP */
! 3472: yyerror("racoon not configured with --with-libldap");
! 3473: #endif /* HAVE_LIBLDAP */
! 3474: #else /* ENABLE_HYBRID */
! 3475: yyerror("racoon not configured with --enable-hybrid");
! 3476: #endif /* ENABLE_HYBRID */
! 3477: }
! 3478: break;
! 3479:
! 3480: case 169:
! 3481:
! 3482: /* Line 1455 of yacc.c */
! 3483: #line 1018 "cfparse.y"
! 3484: {
! 3485: #ifdef ENABLE_HYBRID
! 3486: strncpy(&isakmp_cfg_config.motd[0], (yyvsp[(2) - (2)].val)->v, MAXPATHLEN);
! 3487: isakmp_cfg_config.motd[MAXPATHLEN] = '\0';
! 3488: vfree((yyvsp[(2) - (2)].val));
! 3489: #else
! 3490: yyerror("racoon not configured with --enable-hybrid");
! 3491: #endif
! 3492: }
! 3493: break;
! 3494:
! 3495: case 173:
! 3496:
! 3497: /* Line 1455 of yacc.c */
! 3498: #line 1036 "cfparse.y"
! 3499: {
! 3500: #ifdef ENABLE_HYBRID
! 3501: struct isakmp_cfg_config *icc = &isakmp_cfg_config;
! 3502:
! 3503: if (icc->dns4_index > MAXNS)
! 3504: yyerror("No more than %d DNS", MAXNS);
! 3505: if (inet_pton(AF_INET, (yyvsp[(1) - (1)].val)->v,
! 3506: &icc->dns4[icc->dns4_index++]) != 1)
! 3507: yyerror("bad IPv4 DNS address.");
! 3508: #else
! 3509: yyerror("racoon not configured with --enable-hybrid");
! 3510: #endif
! 3511: }
! 3512: break;
! 3513:
! 3514: case 176:
! 3515:
! 3516: /* Line 1455 of yacc.c */
! 3517: #line 1057 "cfparse.y"
! 3518: {
! 3519: #ifdef ENABLE_HYBRID
! 3520: struct isakmp_cfg_config *icc = &isakmp_cfg_config;
! 3521:
! 3522: if (icc->nbns4_index > MAXWINS)
! 3523: yyerror("No more than %d WINS", MAXWINS);
! 3524: if (inet_pton(AF_INET, (yyvsp[(1) - (1)].val)->v,
! 3525: &icc->nbns4[icc->nbns4_index++]) != 1)
! 3526: yyerror("bad IPv4 WINS address.");
! 3527: #else
! 3528: yyerror("racoon not configured with --enable-hybrid");
! 3529: #endif
! 3530: }
! 3531: break;
! 3532:
! 3533: case 179:
! 3534:
! 3535: /* Line 1455 of yacc.c */
! 3536: #line 1078 "cfparse.y"
! 3537: {
! 3538: #ifdef ENABLE_HYBRID
! 3539: struct isakmp_cfg_config *icc = &isakmp_cfg_config;
! 3540: struct unity_network network;
! 3541: memset(&network,0,sizeof(network));
! 3542:
! 3543: if (inet_pton(AF_INET, (yyvsp[(1) - (2)].val)->v, &network.addr4) != 1)
! 3544: yyerror("bad IPv4 SPLIT address.");
! 3545:
! 3546: /* Turn $2 (the prefix) into a subnet mask */
! 3547: network.mask4.s_addr = ((yyvsp[(2) - (2)].num)) ? htonl(~((1 << (32 - (yyvsp[(2) - (2)].num))) - 1)) : 0;
! 3548:
! 3549: /* add the network to our list */
! 3550: if (splitnet_list_add(&icc->splitnet_list, &network,&icc->splitnet_count))
! 3551: yyerror("Unable to allocate split network");
! 3552: #else
! 3553: yyerror("racoon not configured with --enable-hybrid");
! 3554: #endif
! 3555: }
! 3556: break;
! 3557:
! 3558: case 182:
! 3559:
! 3560: /* Line 1455 of yacc.c */
! 3561: #line 1105 "cfparse.y"
! 3562: {
! 3563: #ifdef ENABLE_HYBRID
! 3564: char * groupname = NULL;
! 3565: char ** grouplist = NULL;
! 3566: struct isakmp_cfg_config *icc = &isakmp_cfg_config;
! 3567:
! 3568: grouplist = racoon_realloc(icc->grouplist,
! 3569: sizeof(char**)*(icc->groupcount+1));
! 3570: if (grouplist == NULL) {
! 3571: yyerror("unable to allocate auth group list");
! 3572: return -1;
! 3573: }
! 3574:
! 3575: groupname = racoon_malloc((yyvsp[(1) - (1)].val)->l+1);
! 3576: if (groupname == NULL) {
! 3577: yyerror("unable to allocate auth group name");
! 3578: return -1;
! 3579: }
! 3580:
! 3581: memcpy(groupname,(yyvsp[(1) - (1)].val)->v,(yyvsp[(1) - (1)].val)->l);
! 3582: groupname[(yyvsp[(1) - (1)].val)->l]=0;
! 3583: grouplist[icc->groupcount]=groupname;
! 3584: icc->grouplist = grouplist;
! 3585: icc->groupcount++;
! 3586:
! 3587: vfree((yyvsp[(1) - (1)].val));
! 3588: #else
! 3589: yyerror("racoon not configured with --enable-hybrid");
! 3590: #endif
! 3591: }
! 3592: break;
! 3593:
! 3594: case 185:
! 3595:
! 3596: /* Line 1455 of yacc.c */
! 3597: #line 1143 "cfparse.y"
! 3598: {
! 3599: #ifdef ENABLE_HYBRID
! 3600: struct isakmp_cfg_config *icc = &isakmp_cfg_config;
! 3601:
! 3602: if (!icc->splitdns_len)
! 3603: {
! 3604: icc->splitdns_list = racoon_malloc((yyvsp[(1) - (1)].val)->l);
! 3605: if(icc->splitdns_list == NULL) {
! 3606: yyerror("error allocating splitdns list buffer");
! 3607: return -1;
! 3608: }
! 3609: memcpy(icc->splitdns_list,(yyvsp[(1) - (1)].val)->v,(yyvsp[(1) - (1)].val)->l);
! 3610: icc->splitdns_len = (yyvsp[(1) - (1)].val)->l;
! 3611: }
! 3612: else
! 3613: {
! 3614: int len = icc->splitdns_len + (yyvsp[(1) - (1)].val)->l + 1;
! 3615: icc->splitdns_list = racoon_realloc(icc->splitdns_list,len);
! 3616: if(icc->splitdns_list == NULL) {
! 3617: yyerror("error allocating splitdns list buffer");
! 3618: return -1;
! 3619: }
! 3620: icc->splitdns_list[icc->splitdns_len] = ',';
! 3621: memcpy(icc->splitdns_list + icc->splitdns_len + 1, (yyvsp[(1) - (1)].val)->v, (yyvsp[(1) - (1)].val)->l);
! 3622: icc->splitdns_len = len;
! 3623: }
! 3624: vfree((yyvsp[(1) - (1)].val));
! 3625: #else
! 3626: yyerror("racoon not configured with --enable-hybrid");
! 3627: #endif
! 3628: }
! 3629: break;
! 3630:
! 3631: case 189:
! 3632:
! 3633: /* Line 1455 of yacc.c */
! 3634: #line 1187 "cfparse.y"
! 3635: {
! 3636: lcconf->retry_counter = (yyvsp[(2) - (2)].num);
! 3637: }
! 3638: break;
! 3639:
! 3640: case 191:
! 3641:
! 3642: /* Line 1455 of yacc.c */
! 3643: #line 1192 "cfparse.y"
! 3644: {
! 3645: lcconf->retry_interval = (yyvsp[(2) - (3)].num) * (yyvsp[(3) - (3)].num);
! 3646: }
! 3647: break;
! 3648:
! 3649: case 193:
! 3650:
! 3651: /* Line 1455 of yacc.c */
! 3652: #line 1197 "cfparse.y"
! 3653: {
! 3654: lcconf->count_persend = (yyvsp[(2) - (2)].num);
! 3655: }
! 3656: break;
! 3657:
! 3658: case 195:
! 3659:
! 3660: /* Line 1455 of yacc.c */
! 3661: #line 1202 "cfparse.y"
! 3662: {
! 3663: lcconf->retry_checkph1 = (yyvsp[(2) - (3)].num) * (yyvsp[(3) - (3)].num);
! 3664: }
! 3665: break;
! 3666:
! 3667: case 197:
! 3668:
! 3669: /* Line 1455 of yacc.c */
! 3670: #line 1207 "cfparse.y"
! 3671: {
! 3672: lcconf->wait_ph2complete = (yyvsp[(2) - (3)].num) * (yyvsp[(3) - (3)].num);
! 3673: }
! 3674: break;
! 3675:
! 3676: case 199:
! 3677:
! 3678: /* Line 1455 of yacc.c */
! 3679: #line 1212 "cfparse.y"
! 3680: {
! 3681: #ifdef ENABLE_NATT
! 3682: if (libipsec_opt & LIBIPSEC_OPT_NATT)
! 3683: lcconf->natt_ka_interval = (yyvsp[(2) - (3)].num) * (yyvsp[(3) - (3)].num);
! 3684: else
! 3685: yyerror("libipsec lacks NAT-T support");
! 3686: #else
! 3687: yyerror("NAT-T support not compiled in.");
! 3688: #endif
! 3689: }
! 3690: break;
! 3691:
! 3692: case 201:
! 3693:
! 3694: /* Line 1455 of yacc.c */
! 3695: #line 1228 "cfparse.y"
! 3696: {
! 3697: cur_sainfo = newsainfo();
! 3698: if (cur_sainfo == NULL) {
! 3699: yyerror("failed to allocate sainfo");
! 3700: return -1;
! 3701: }
! 3702: }
! 3703: break;
! 3704:
! 3705: case 202:
! 3706:
! 3707: /* Line 1455 of yacc.c */
! 3708: #line 1236 "cfparse.y"
! 3709: {
! 3710: struct sainfo *check;
! 3711:
! 3712: /* default */
! 3713: if (cur_sainfo->algs[algclass_ipsec_enc] == 0) {
! 3714: yyerror("no encryption algorithm at %s",
! 3715: sainfo2str(cur_sainfo));
! 3716: return -1;
! 3717: }
! 3718: if (cur_sainfo->algs[algclass_ipsec_auth] == 0) {
! 3719: yyerror("no authentication algorithm at %s",
! 3720: sainfo2str(cur_sainfo));
! 3721: return -1;
! 3722: }
! 3723: if (cur_sainfo->algs[algclass_ipsec_comp] == 0) {
! 3724: yyerror("no compression algorithm at %s",
! 3725: sainfo2str(cur_sainfo));
! 3726: return -1;
! 3727: }
! 3728:
! 3729: /* duplicate check */
! 3730: check = getsainfo(cur_sainfo->idsrc,
! 3731: cur_sainfo->iddst,
! 3732: cur_sainfo->id_i,
! 3733: NULL,
! 3734: cur_sainfo->remoteid);
! 3735:
! 3736: if (check && ((check->idsrc != SAINFO_ANONYMOUS) &&
! 3737: (cur_sainfo->idsrc != SAINFO_ANONYMOUS))) {
! 3738: yyerror("duplicated sainfo: %s",
! 3739: sainfo2str(cur_sainfo));
! 3740: return -1;
! 3741: }
! 3742:
! 3743: inssainfo(cur_sainfo);
! 3744: }
! 3745: break;
! 3746:
! 3747: case 204:
! 3748:
! 3749: /* Line 1455 of yacc.c */
! 3750: #line 1276 "cfparse.y"
! 3751: {
! 3752: cur_sainfo->idsrc = SAINFO_ANONYMOUS;
! 3753: cur_sainfo->iddst = SAINFO_ANONYMOUS;
! 3754: }
! 3755: break;
! 3756:
! 3757: case 205:
! 3758:
! 3759: /* Line 1455 of yacc.c */
! 3760: #line 1281 "cfparse.y"
! 3761: {
! 3762: cur_sainfo->idsrc = SAINFO_ANONYMOUS;
! 3763: cur_sainfo->iddst = SAINFO_CLIENTADDR;
! 3764: }
! 3765: break;
! 3766:
! 3767: case 206:
! 3768:
! 3769: /* Line 1455 of yacc.c */
! 3770: #line 1286 "cfparse.y"
! 3771: {
! 3772: cur_sainfo->idsrc = SAINFO_ANONYMOUS;
! 3773: cur_sainfo->iddst = (yyvsp[(2) - (2)].val);
! 3774: }
! 3775: break;
! 3776:
! 3777: case 207:
! 3778:
! 3779: /* Line 1455 of yacc.c */
! 3780: #line 1291 "cfparse.y"
! 3781: {
! 3782: cur_sainfo->idsrc = (yyvsp[(1) - (2)].val);
! 3783: cur_sainfo->iddst = SAINFO_ANONYMOUS;
! 3784: }
! 3785: break;
! 3786:
! 3787: case 208:
! 3788:
! 3789: /* Line 1455 of yacc.c */
! 3790: #line 1296 "cfparse.y"
! 3791: {
! 3792: cur_sainfo->idsrc = (yyvsp[(1) - (2)].val);
! 3793: cur_sainfo->iddst = SAINFO_CLIENTADDR;
! 3794: }
! 3795: break;
! 3796:
! 3797: case 209:
! 3798:
! 3799: /* Line 1455 of yacc.c */
! 3800: #line 1301 "cfparse.y"
! 3801: {
! 3802: cur_sainfo->idsrc = (yyvsp[(1) - (2)].val);
! 3803: cur_sainfo->iddst = (yyvsp[(2) - (2)].val);
! 3804: }
! 3805: break;
! 3806:
! 3807: case 210:
! 3808:
! 3809: /* Line 1455 of yacc.c */
! 3810: #line 1308 "cfparse.y"
! 3811: {
! 3812: char portbuf[10];
! 3813: struct sockaddr *saddr;
! 3814:
! 3815: if (((yyvsp[(5) - (5)].num) == IPPROTO_ICMP || (yyvsp[(5) - (5)].num) == IPPROTO_ICMPV6)
! 3816: && ((yyvsp[(4) - (5)].num) != IPSEC_PORT_ANY || (yyvsp[(4) - (5)].num) != IPSEC_PORT_ANY)) {
! 3817: yyerror("port number must be \"any\".");
! 3818: return -1;
! 3819: }
! 3820:
! 3821: snprintf(portbuf, sizeof(portbuf), "%lu", (yyvsp[(4) - (5)].num));
! 3822: saddr = str2saddr((yyvsp[(2) - (5)].val)->v, portbuf);
! 3823: vfree((yyvsp[(2) - (5)].val));
! 3824: if (saddr == NULL)
! 3825: return -1;
! 3826:
! 3827: switch (saddr->sa_family) {
! 3828: case AF_INET:
! 3829: if ((yyvsp[(5) - (5)].num) == IPPROTO_ICMPV6) {
! 3830: yyerror("upper layer protocol mismatched.\n");
! 3831: racoon_free(saddr);
! 3832: return -1;
! 3833: }
! 3834: (yyval.val) = ipsecdoi_sockaddr2id(saddr,
! 3835: (yyvsp[(3) - (5)].num) == ~0 ? (sizeof(struct in_addr) << 3): (yyvsp[(3) - (5)].num),
! 3836: (yyvsp[(5) - (5)].num));
! 3837: break;
! 3838: #ifdef INET6
! 3839: case AF_INET6:
! 3840: if ((yyvsp[(5) - (5)].num) == IPPROTO_ICMP) {
! 3841: yyerror("upper layer protocol mismatched.\n");
! 3842: racoon_free(saddr);
! 3843: return -1;
! 3844: }
! 3845: (yyval.val) = ipsecdoi_sockaddr2id(saddr,
! 3846: (yyvsp[(3) - (5)].num) == ~0 ? (sizeof(struct in6_addr) << 3): (yyvsp[(3) - (5)].num),
! 3847: (yyvsp[(5) - (5)].num));
! 3848: break;
! 3849: #endif
! 3850: default:
! 3851: yyerror("invalid family: %d", saddr->sa_family);
! 3852: (yyval.val) = NULL;
! 3853: break;
! 3854: }
! 3855: racoon_free(saddr);
! 3856: if ((yyval.val) == NULL)
! 3857: return -1;
! 3858: }
! 3859: break;
! 3860:
! 3861: case 211:
! 3862:
! 3863: /* Line 1455 of yacc.c */
! 3864: #line 1357 "cfparse.y"
! 3865: {
! 3866: char portbuf[10];
! 3867: struct sockaddr *laddr = NULL, *haddr = NULL;
! 3868: char *cur = NULL;
! 3869:
! 3870: if (((yyvsp[(6) - (6)].num) == IPPROTO_ICMP || (yyvsp[(6) - (6)].num) == IPPROTO_ICMPV6)
! 3871: && ((yyvsp[(5) - (6)].num) != IPSEC_PORT_ANY || (yyvsp[(5) - (6)].num) != IPSEC_PORT_ANY)) {
! 3872: yyerror("port number must be \"any\".");
! 3873: return -1;
! 3874: }
! 3875:
! 3876: snprintf(portbuf, sizeof(portbuf), "%lu", (yyvsp[(5) - (6)].num));
! 3877:
! 3878: laddr = str2saddr((yyvsp[(2) - (6)].val)->v, portbuf);
! 3879: if (laddr == NULL) {
! 3880: return -1;
! 3881: }
! 3882: vfree((yyvsp[(2) - (6)].val));
! 3883: haddr = str2saddr((yyvsp[(3) - (6)].val)->v, portbuf);
! 3884: if (haddr == NULL) {
! 3885: racoon_free(laddr);
! 3886: return -1;
! 3887: }
! 3888: vfree((yyvsp[(3) - (6)].val));
! 3889:
! 3890: switch (laddr->sa_family) {
! 3891: case AF_INET:
! 3892: if ((yyvsp[(6) - (6)].num) == IPPROTO_ICMPV6) {
! 3893: yyerror("upper layer protocol mismatched.\n");
! 3894: if (laddr)
! 3895: racoon_free(laddr);
! 3896: if (haddr)
! 3897: racoon_free(haddr);
! 3898: return -1;
! 3899: }
! 3900: (yyval.val) = ipsecdoi_sockrange2id(laddr, haddr,
! 3901: (yyvsp[(6) - (6)].num));
! 3902: break;
! 3903: #ifdef INET6
! 3904: case AF_INET6:
! 3905: if ((yyvsp[(6) - (6)].num) == IPPROTO_ICMP) {
! 3906: yyerror("upper layer protocol mismatched.\n");
! 3907: if (laddr)
! 3908: racoon_free(laddr);
! 3909: if (haddr)
! 3910: racoon_free(haddr);
! 3911: return -1;
! 3912: }
! 3913: (yyval.val) = ipsecdoi_sockrange2id(laddr, haddr,
! 3914: (yyvsp[(6) - (6)].num));
! 3915: break;
! 3916: #endif
! 3917: default:
! 3918: yyerror("invalid family: %d", laddr->sa_family);
! 3919: (yyval.val) = NULL;
! 3920: break;
! 3921: }
! 3922: if (laddr)
! 3923: racoon_free(laddr);
! 3924: if (haddr)
! 3925: racoon_free(haddr);
! 3926: if ((yyval.val) == NULL)
! 3927: return -1;
! 3928: }
! 3929: break;
! 3930:
! 3931: case 212:
! 3932:
! 3933: /* Line 1455 of yacc.c */
! 3934: #line 1422 "cfparse.y"
! 3935: {
! 3936: struct ipsecdoi_id_b *id_b;
! 3937:
! 3938: if ((yyvsp[(1) - (2)].num) == IDTYPE_ASN1DN) {
! 3939: yyerror("id type forbidden: %d", (yyvsp[(1) - (2)].num));
! 3940: (yyval.val) = NULL;
! 3941: return -1;
! 3942: }
! 3943:
! 3944: (yyvsp[(2) - (2)].val)->l--;
! 3945:
! 3946: (yyval.val) = vmalloc(sizeof(*id_b) + (yyvsp[(2) - (2)].val)->l);
! 3947: if ((yyval.val) == NULL) {
! 3948: yyerror("failed to allocate identifier");
! 3949: return -1;
! 3950: }
! 3951:
! 3952: id_b = (struct ipsecdoi_id_b *)(yyval.val)->v;
! 3953: id_b->type = idtype2doi((yyvsp[(1) - (2)].num));
! 3954:
! 3955: id_b->proto_id = 0;
! 3956: id_b->port = 0;
! 3957:
! 3958: memcpy((yyval.val)->v + sizeof(*id_b), (yyvsp[(2) - (2)].val)->v, (yyvsp[(2) - (2)].val)->l);
! 3959: }
! 3960: break;
! 3961:
! 3962: case 213:
! 3963:
! 3964: /* Line 1455 of yacc.c */
! 3965: #line 1450 "cfparse.y"
! 3966: {
! 3967: cur_sainfo->id_i = NULL;
! 3968: }
! 3969: break;
! 3970:
! 3971: case 214:
! 3972:
! 3973: /* Line 1455 of yacc.c */
! 3974: #line 1454 "cfparse.y"
! 3975: {
! 3976: struct ipsecdoi_id_b *id_b;
! 3977: vchar_t *idv;
! 3978:
! 3979: if (set_identifier(&idv, (yyvsp[(2) - (3)].num), (yyvsp[(3) - (3)].val)) != 0) {
! 3980: yyerror("failed to set identifer.\n");
! 3981: return -1;
! 3982: }
! 3983: cur_sainfo->id_i = vmalloc(sizeof(*id_b) + idv->l);
! 3984: if (cur_sainfo->id_i == NULL) {
! 3985: yyerror("failed to allocate identifier");
! 3986: return -1;
! 3987: }
! 3988:
! 3989: id_b = (struct ipsecdoi_id_b *)cur_sainfo->id_i->v;
! 3990: id_b->type = idtype2doi((yyvsp[(2) - (3)].num));
! 3991:
! 3992: id_b->proto_id = 0;
! 3993: id_b->port = 0;
! 3994:
! 3995: memcpy(cur_sainfo->id_i->v + sizeof(*id_b),
! 3996: idv->v, idv->l);
! 3997: vfree(idv);
! 3998: }
! 3999: break;
! 4000:
! 4001: case 215:
! 4002:
! 4003: /* Line 1455 of yacc.c */
! 4004: #line 1479 "cfparse.y"
! 4005: {
! 4006: #ifdef ENABLE_HYBRID
! 4007: if ((cur_sainfo->group = vdup((yyvsp[(2) - (2)].val))) == NULL) {
! 4008: yyerror("failed to set sainfo xauth group.\n");
! 4009: return -1;
! 4010: }
! 4011: #else
! 4012: yyerror("racoon not configured with --enable-hybrid");
! 4013: return -1;
! 4014: #endif
! 4015: }
! 4016: break;
! 4017:
! 4018: case 218:
! 4019:
! 4020: /* Line 1455 of yacc.c */
! 4021: #line 1497 "cfparse.y"
! 4022: {
! 4023: cur_sainfo->pfs_group = (yyvsp[(2) - (2)].num);
! 4024: }
! 4025: break;
! 4026:
! 4027: case 220:
! 4028:
! 4029: /* Line 1455 of yacc.c */
! 4030: #line 1502 "cfparse.y"
! 4031: {
! 4032: cur_sainfo->remoteid = (yyvsp[(2) - (2)].num);
! 4033: }
! 4034: break;
! 4035:
! 4036: case 222:
! 4037:
! 4038: /* Line 1455 of yacc.c */
! 4039: #line 1507 "cfparse.y"
! 4040: {
! 4041: cur_sainfo->lifetime = (yyvsp[(3) - (4)].num) * (yyvsp[(4) - (4)].num);
! 4042: }
! 4043: break;
! 4044:
! 4045: case 224:
! 4046:
! 4047: /* Line 1455 of yacc.c */
! 4048: #line 1512 "cfparse.y"
! 4049: {
! 4050: #if 1
! 4051: yyerror("byte lifetime support is deprecated");
! 4052: return -1;
! 4053: #else
! 4054: cur_sainfo->lifebyte = fix_lifebyte((yyvsp[(3) - (4)].num) * (yyvsp[(4) - (4)].num));
! 4055: if (cur_sainfo->lifebyte == 0)
! 4056: return -1;
! 4057: #endif
! 4058: }
! 4059: break;
! 4060:
! 4061: case 226:
! 4062:
! 4063: /* Line 1455 of yacc.c */
! 4064: #line 1523 "cfparse.y"
! 4065: {
! 4066: cur_algclass = (yyvsp[(1) - (1)].num);
! 4067: }
! 4068: break;
! 4069:
! 4070: case 228:
! 4071:
! 4072: /* Line 1455 of yacc.c */
! 4073: #line 1531 "cfparse.y"
! 4074: {
! 4075: inssainfoalg(&cur_sainfo->algs[cur_algclass], (yyvsp[(1) - (1)].alg));
! 4076: }
! 4077: break;
! 4078:
! 4079: case 229:
! 4080:
! 4081: /* Line 1455 of yacc.c */
! 4082: #line 1535 "cfparse.y"
! 4083: {
! 4084: inssainfoalg(&cur_sainfo->algs[cur_algclass], (yyvsp[(1) - (1)].alg));
! 4085: }
! 4086: break;
! 4087:
! 4088: case 231:
! 4089:
! 4090: /* Line 1455 of yacc.c */
! 4091: #line 1542 "cfparse.y"
! 4092: {
! 4093: int defklen;
! 4094:
! 4095: (yyval.alg) = newsainfoalg();
! 4096: if ((yyval.alg) == NULL) {
! 4097: yyerror("failed to get algorithm allocation");
! 4098: return -1;
! 4099: }
! 4100:
! 4101: (yyval.alg)->alg = algtype2doi(cur_algclass, (yyvsp[(1) - (2)].num));
! 4102: if ((yyval.alg)->alg == -1) {
! 4103: yyerror("algorithm mismatched");
! 4104: racoon_free((yyval.alg));
! 4105: (yyval.alg) = NULL;
! 4106: return -1;
! 4107: }
! 4108:
! 4109: defklen = default_keylen(cur_algclass, (yyvsp[(1) - (2)].num));
! 4110: if (defklen == 0) {
! 4111: if ((yyvsp[(2) - (2)].num)) {
! 4112: yyerror("keylen not allowed");
! 4113: racoon_free((yyval.alg));
! 4114: (yyval.alg) = NULL;
! 4115: return -1;
! 4116: }
! 4117: } else {
! 4118: if ((yyvsp[(2) - (2)].num) && check_keylen(cur_algclass, (yyvsp[(1) - (2)].num), (yyvsp[(2) - (2)].num)) < 0) {
! 4119: yyerror("invalid keylen %d", (yyvsp[(2) - (2)].num));
! 4120: racoon_free((yyval.alg));
! 4121: (yyval.alg) = NULL;
! 4122: return -1;
! 4123: }
! 4124: }
! 4125:
! 4126: if ((yyvsp[(2) - (2)].num))
! 4127: (yyval.alg)->encklen = (yyvsp[(2) - (2)].num);
! 4128: else
! 4129: (yyval.alg)->encklen = defklen;
! 4130:
! 4131: /* check if it's supported algorithm by kernel */
! 4132: if (!(cur_algclass == algclass_ipsec_auth && (yyvsp[(1) - (2)].num) == algtype_non_auth)
! 4133: && pk_checkalg(cur_algclass, (yyvsp[(1) - (2)].num), (yyval.alg)->encklen)) {
! 4134: int a = algclass2doi(cur_algclass);
! 4135: int b = algtype2doi(cur_algclass, (yyvsp[(1) - (2)].num));
! 4136: if (a == IPSECDOI_ATTR_AUTH)
! 4137: a = IPSECDOI_PROTO_IPSEC_AH;
! 4138: yyerror("algorithm %s not supported by the kernel (missing module?)",
! 4139: s_ipsecdoi_trns(a, b));
! 4140: racoon_free((yyval.alg));
! 4141: (yyval.alg) = NULL;
! 4142: return -1;
! 4143: }
! 4144: }
! 4145: break;
! 4146:
! 4147: case 232:
! 4148:
! 4149: /* Line 1455 of yacc.c */
! 4150: #line 1597 "cfparse.y"
! 4151: { (yyval.num) = ~0; }
! 4152: break;
! 4153:
! 4154: case 233:
! 4155:
! 4156: /* Line 1455 of yacc.c */
! 4157: #line 1598 "cfparse.y"
! 4158: { (yyval.num) = (yyvsp[(1) - (1)].num); }
! 4159: break;
! 4160:
! 4161: case 234:
! 4162:
! 4163: /* Line 1455 of yacc.c */
! 4164: #line 1601 "cfparse.y"
! 4165: { (yyval.num) = IPSEC_PORT_ANY; }
! 4166: break;
! 4167:
! 4168: case 235:
! 4169:
! 4170: /* Line 1455 of yacc.c */
! 4171: #line 1602 "cfparse.y"
! 4172: { (yyval.num) = (yyvsp[(1) - (1)].num); }
! 4173: break;
! 4174:
! 4175: case 236:
! 4176:
! 4177: /* Line 1455 of yacc.c */
! 4178: #line 1603 "cfparse.y"
! 4179: { (yyval.num) = IPSEC_PORT_ANY; }
! 4180: break;
! 4181:
! 4182: case 237:
! 4183:
! 4184: /* Line 1455 of yacc.c */
! 4185: #line 1606 "cfparse.y"
! 4186: { (yyval.num) = (yyvsp[(1) - (1)].num); }
! 4187: break;
! 4188:
! 4189: case 238:
! 4190:
! 4191: /* Line 1455 of yacc.c */
! 4192: #line 1607 "cfparse.y"
! 4193: { (yyval.num) = (yyvsp[(1) - (1)].num); }
! 4194: break;
! 4195:
! 4196: case 239:
! 4197:
! 4198: /* Line 1455 of yacc.c */
! 4199: #line 1608 "cfparse.y"
! 4200: { (yyval.num) = IPSEC_ULPROTO_ANY; }
! 4201: break;
! 4202:
! 4203: case 240:
! 4204:
! 4205: /* Line 1455 of yacc.c */
! 4206: #line 1611 "cfparse.y"
! 4207: { (yyval.num) = 0; }
! 4208: break;
! 4209:
! 4210: case 241:
! 4211:
! 4212: /* Line 1455 of yacc.c */
! 4213: #line 1612 "cfparse.y"
! 4214: { (yyval.num) = (yyvsp[(1) - (1)].num); }
! 4215: break;
! 4216:
! 4217: case 242:
! 4218:
! 4219: /* Line 1455 of yacc.c */
! 4220: #line 1618 "cfparse.y"
! 4221: {
! 4222: struct remoteconf *from, *new;
! 4223:
! 4224: if (getrmconf_by_name((yyvsp[(2) - (4)].val)->v) != NULL) {
! 4225: yyerror("named remoteconf \"%s\" already exists.");
! 4226: return -1;
! 4227: }
! 4228:
! 4229: from = getrmconf_by_name((yyvsp[(4) - (4)].val)->v);
! 4230: if (from == NULL) {
! 4231: yyerror("named parent remoteconf \"%s\" does not exist.",
! 4232: (yyvsp[(4) - (4)].val)->v);
! 4233: return -1;
! 4234: }
! 4235:
! 4236: new = duprmconf_shallow(from);
! 4237: if (new == NULL) {
! 4238: yyerror("failed to duplicate remoteconf from \"%s\".",
! 4239: (yyvsp[(4) - (4)].val)->v);
! 4240: return -1;
! 4241: }
! 4242:
! 4243: new->name = racoon_strdup((yyvsp[(2) - (4)].val)->v);
! 4244: cur_rmconf = new;
! 4245:
! 4246: vfree((yyvsp[(2) - (4)].val));
! 4247: vfree((yyvsp[(4) - (4)].val));
! 4248: }
! 4249: break;
! 4250:
! 4251: case 244:
! 4252:
! 4253: /* Line 1455 of yacc.c */
! 4254: #line 1648 "cfparse.y"
! 4255: {
! 4256: struct remoteconf *new;
! 4257:
! 4258: if (getrmconf_by_name((yyvsp[(2) - (2)].val)->v) != NULL) {
! 4259: yyerror("Named remoteconf \"%s\" already exists.");
! 4260: return -1;
! 4261: }
! 4262:
! 4263: new = newrmconf();
! 4264: if (new == NULL) {
! 4265: yyerror("failed to get new remoteconf.");
! 4266: return -1;
! 4267: }
! 4268: new->name = racoon_strdup((yyvsp[(2) - (2)].val)->v);
! 4269: cur_rmconf = new;
! 4270:
! 4271: vfree((yyvsp[(2) - (2)].val));
! 4272: }
! 4273: break;
! 4274:
! 4275: case 246:
! 4276:
! 4277: /* Line 1455 of yacc.c */
! 4278: #line 1668 "cfparse.y"
! 4279: {
! 4280: struct remoteconf *from, *new;
! 4281:
! 4282: from = getrmconf((yyvsp[(4) - (4)].saddr), GETRMCONF_F_NO_ANONYMOUS);
! 4283: if (from == NULL) {
! 4284: yyerror("failed to get remoteconf for %s.",
! 4285: saddr2str((yyvsp[(4) - (4)].saddr)));
! 4286: return -1;
! 4287: }
! 4288:
! 4289: new = duprmconf_shallow(from);
! 4290: if (new == NULL) {
! 4291: yyerror("failed to duplicate remoteconf from %s.",
! 4292: saddr2str((yyvsp[(4) - (4)].saddr)));
! 4293: return -1;
! 4294: }
! 4295:
! 4296: racoon_free((yyvsp[(4) - (4)].saddr));
! 4297: new->remote = (yyvsp[(2) - (4)].saddr);
! 4298: cur_rmconf = new;
! 4299: }
! 4300: break;
! 4301:
! 4302: case 248:
! 4303:
! 4304: /* Line 1455 of yacc.c */
! 4305: #line 1691 "cfparse.y"
! 4306: {
! 4307: struct remoteconf *new;
! 4308:
! 4309: new = newrmconf();
! 4310: if (new == NULL) {
! 4311: yyerror("failed to get new remoteconf.");
! 4312: return -1;
! 4313: }
! 4314:
! 4315: new->remote = (yyvsp[(2) - (2)].saddr);
! 4316: cur_rmconf = new;
! 4317: }
! 4318: break;
! 4319:
! 4320: case 250:
! 4321:
! 4322: /* Line 1455 of yacc.c */
! 4323: #line 1708 "cfparse.y"
! 4324: {
! 4325: /* check a exchange mode */
! 4326: if (cur_rmconf->etypes == NULL) {
! 4327: yyerror("no exchange mode specified.\n");
! 4328: return -1;
! 4329: }
! 4330:
! 4331: if (cur_rmconf->idvtype == IDTYPE_UNDEFINED)
! 4332: cur_rmconf->idvtype = IDTYPE_ADDRESS;
! 4333:
! 4334: if (cur_rmconf->idvtype == IDTYPE_ASN1DN) {
! 4335: if (cur_rmconf->mycertfile) {
! 4336: if (cur_rmconf->idv)
! 4337: yywarn("Both CERT and ASN1 ID "
! 4338: "are set. Hope this is OK.\n");
! 4339: /* TODO: Preparse the DN here */
! 4340: } else if (cur_rmconf->idv) {
! 4341: /* OK, using asn1dn without X.509. */
! 4342: } else {
! 4343: yyerror("ASN1 ID not specified "
! 4344: "and no CERT defined!\n");
! 4345: return -1;
! 4346: }
! 4347: }
! 4348:
! 4349: if (duprmconf_finish(cur_rmconf))
! 4350: return -1;
! 4351:
! 4352: #if 0
! 4353: /* this pointer copy will never happen, because duprmconf_shallow
! 4354: * already copied all pointers.
! 4355: */
! 4356: if (cur_rmconf->spspec == NULL &&
! 4357: cur_rmconf->inherited_from != NULL) {
! 4358: cur_rmconf->spspec = cur_rmconf->inherited_from->spspec;
! 4359: }
! 4360: #endif
! 4361: if (set_isakmp_proposal(cur_rmconf) != 0)
! 4362: return -1;
! 4363:
! 4364: /* DH group settting if aggressive mode is there. */
! 4365: if (check_etypeok(cur_rmconf, (void*) ISAKMP_ETYPE_AGG)) {
! 4366: struct isakmpsa *p;
! 4367: int b = 0;
! 4368:
! 4369: /* DH group */
! 4370: for (p = cur_rmconf->proposal; p; p = p->next) {
! 4371: if (b == 0 || (b && b == p->dh_group)) {
! 4372: b = p->dh_group;
! 4373: continue;
! 4374: }
! 4375: yyerror("DH group must be equal "
! 4376: "in all proposals "
! 4377: "when aggressive mode is "
! 4378: "used.\n");
! 4379: return -1;
! 4380: }
! 4381: cur_rmconf->dh_group = b;
! 4382:
! 4383: if (cur_rmconf->dh_group == 0) {
! 4384: yyerror("DH group must be set in the proposal.\n");
! 4385: return -1;
! 4386: }
! 4387:
! 4388: /* DH group settting if PFS is required. */
! 4389: if (oakley_setdhgroup(cur_rmconf->dh_group,
! 4390: &cur_rmconf->dhgrp) < 0) {
! 4391: yyerror("failed to set DH value.\n");
! 4392: return -1;
! 4393: }
! 4394: }
! 4395:
! 4396: insrmconf(cur_rmconf);
! 4397: }
! 4398: break;
! 4399:
! 4400: case 251:
! 4401:
! 4402: /* Line 1455 of yacc.c */
! 4403: #line 1785 "cfparse.y"
! 4404: {
! 4405: (yyval.saddr) = newsaddr(sizeof(struct sockaddr));
! 4406: (yyval.saddr)->sa_family = AF_UNSPEC;
! 4407: ((struct sockaddr_in *)(yyval.saddr))->sin_port = htons((yyvsp[(2) - (2)].num));
! 4408: }
! 4409: break;
! 4410:
! 4411: case 252:
! 4412:
! 4413: /* Line 1455 of yacc.c */
! 4414: #line 1791 "cfparse.y"
! 4415: {
! 4416: (yyval.saddr) = (yyvsp[(1) - (1)].saddr);
! 4417: if ((yyval.saddr) == NULL) {
! 4418: yyerror("failed to allocate sockaddr");
! 4419: return -1;
! 4420: }
! 4421: }
! 4422: break;
! 4423:
! 4424: case 255:
! 4425:
! 4426: /* Line 1455 of yacc.c */
! 4427: #line 1805 "cfparse.y"
! 4428: {
! 4429: if (cur_rmconf->remote != NULL) {
! 4430: yyerror("remote_address already specified");
! 4431: return -1;
! 4432: }
! 4433: cur_rmconf->remote = (yyvsp[(2) - (2)].saddr);
! 4434: }
! 4435: break;
! 4436:
! 4437: case 257:
! 4438:
! 4439: /* Line 1455 of yacc.c */
! 4440: #line 1814 "cfparse.y"
! 4441: {
! 4442: cur_rmconf->etypes = NULL;
! 4443: }
! 4444: break;
! 4445:
! 4446: case 259:
! 4447:
! 4448: /* Line 1455 of yacc.c */
! 4449: #line 1818 "cfparse.y"
! 4450: { cur_rmconf->doitype = (yyvsp[(2) - (2)].num); }
! 4451: break;
! 4452:
! 4453: case 261:
! 4454:
! 4455: /* Line 1455 of yacc.c */
! 4456: #line 1819 "cfparse.y"
! 4457: { cur_rmconf->sittype = (yyvsp[(2) - (2)].num); }
! 4458: break;
! 4459:
! 4460: case 264:
! 4461:
! 4462: /* Line 1455 of yacc.c */
! 4463: #line 1822 "cfparse.y"
! 4464: {
! 4465: yywarn("This directive without certtype will be removed!\n");
! 4466: yywarn("Please use 'peers_certfile x509 \"%s\";' instead\n", (yyvsp[(2) - (2)].val)->v);
! 4467:
! 4468: if (cur_rmconf->peerscert != NULL) {
! 4469: yyerror("peers_certfile already defined\n");
! 4470: return -1;
! 4471: }
! 4472:
! 4473: if (load_x509((yyvsp[(2) - (2)].val)->v, &cur_rmconf->peerscertfile,
! 4474: &cur_rmconf->peerscert)) {
! 4475: yyerror("failed to load certificate \"%s\"\n",
! 4476: (yyvsp[(2) - (2)].val)->v);
! 4477: return -1;
! 4478: }
! 4479:
! 4480: vfree((yyvsp[(2) - (2)].val));
! 4481: }
! 4482: break;
! 4483:
! 4484: case 266:
! 4485:
! 4486: /* Line 1455 of yacc.c */
! 4487: #line 1842 "cfparse.y"
! 4488: {
! 4489: if (cur_rmconf->peerscert != NULL) {
! 4490: yyerror("peers_certfile already defined\n");
! 4491: return -1;
! 4492: }
! 4493:
! 4494: if (load_x509((yyvsp[(3) - (3)].val)->v, &cur_rmconf->peerscertfile,
! 4495: &cur_rmconf->peerscert)) {
! 4496: yyerror("failed to load certificate \"%s\"\n",
! 4497: (yyvsp[(3) - (3)].val)->v);
! 4498: return -1;
! 4499: }
! 4500:
! 4501: vfree((yyvsp[(3) - (3)].val));
! 4502: }
! 4503: break;
! 4504:
! 4505: case 268:
! 4506:
! 4507: /* Line 1455 of yacc.c */
! 4508: #line 1859 "cfparse.y"
! 4509: {
! 4510: char path[MAXPATHLEN];
! 4511: int ret = 0;
! 4512:
! 4513: if (cur_rmconf->peerscert != NULL) {
! 4514: yyerror("peers_certfile already defined\n");
! 4515: return -1;
! 4516: }
! 4517:
! 4518: cur_rmconf->peerscert = vmalloc(1);
! 4519: if (cur_rmconf->peerscert == NULL) {
! 4520: yyerror("failed to allocate peerscert");
! 4521: return -1;
! 4522: }
! 4523: cur_rmconf->peerscert->v[0] = ISAKMP_CERT_PLAINRSA;
! 4524:
! 4525: getpathname(path, sizeof(path),
! 4526: LC_PATHTYPE_CERT, (yyvsp[(3) - (3)].val)->v);
! 4527: if (rsa_parse_file(cur_rmconf->rsa_public, path,
! 4528: RSA_TYPE_PUBLIC)) {
! 4529: yyerror("Couldn't parse keyfile.\n", path);
! 4530: return -1;
! 4531: }
! 4532: plog(LLV_DEBUG, LOCATION, NULL,
! 4533: "Public PlainRSA keyfile parsed: %s\n", path);
! 4534:
! 4535: vfree((yyvsp[(3) - (3)].val));
! 4536: }
! 4537: break;
! 4538:
! 4539: case 270:
! 4540:
! 4541: /* Line 1455 of yacc.c */
! 4542: #line 1889 "cfparse.y"
! 4543: {
! 4544: if (cur_rmconf->peerscert != NULL) {
! 4545: yyerror("peers_certfile already defined\n");
! 4546: return -1;
! 4547: }
! 4548: cur_rmconf->peerscert = vmalloc(1);
! 4549: if (cur_rmconf->peerscert == NULL) {
! 4550: yyerror("failed to allocate peerscert");
! 4551: return -1;
! 4552: }
! 4553: cur_rmconf->peerscert->v[0] = ISAKMP_CERT_DNS;
! 4554: }
! 4555: break;
! 4556:
! 4557: case 272:
! 4558:
! 4559: /* Line 1455 of yacc.c */
! 4560: #line 1903 "cfparse.y"
! 4561: {
! 4562: if (cur_rmconf->cacert != NULL) {
! 4563: yyerror("ca_type already defined\n");
! 4564: return -1;
! 4565: }
! 4566:
! 4567: if (load_x509((yyvsp[(3) - (3)].val)->v, &cur_rmconf->cacertfile,
! 4568: &cur_rmconf->cacert)) {
! 4569: yyerror("failed to load certificate \"%s\"\n",
! 4570: (yyvsp[(3) - (3)].val)->v);
! 4571: return -1;
! 4572: }
! 4573:
! 4574: vfree((yyvsp[(3) - (3)].val));
! 4575: }
! 4576: break;
! 4577:
! 4578: case 274:
! 4579:
! 4580: /* Line 1455 of yacc.c */
! 4581: #line 1919 "cfparse.y"
! 4582: { cur_rmconf->verify_cert = (yyvsp[(2) - (2)].num); }
! 4583: break;
! 4584:
! 4585: case 276:
! 4586:
! 4587: /* Line 1455 of yacc.c */
! 4588: #line 1920 "cfparse.y"
! 4589: { cur_rmconf->send_cert = (yyvsp[(2) - (2)].num); }
! 4590: break;
! 4591:
! 4592: case 278:
! 4593:
! 4594: /* Line 1455 of yacc.c */
! 4595: #line 1921 "cfparse.y"
! 4596: { cur_rmconf->send_cr = (yyvsp[(2) - (2)].num); }
! 4597: break;
! 4598:
! 4599: case 280:
! 4600:
! 4601: /* Line 1455 of yacc.c */
! 4602: #line 1922 "cfparse.y"
! 4603: { cur_rmconf->match_empty_cr = (yyvsp[(2) - (2)].num); }
! 4604: break;
! 4605:
! 4606: case 282:
! 4607:
! 4608: /* Line 1455 of yacc.c */
! 4609: #line 1924 "cfparse.y"
! 4610: {
! 4611: if (set_identifier(&cur_rmconf->idv, (yyvsp[(2) - (3)].num), (yyvsp[(3) - (3)].val)) != 0) {
! 4612: yyerror("failed to set identifer.\n");
! 4613: return -1;
! 4614: }
! 4615: cur_rmconf->idvtype = (yyvsp[(2) - (3)].num);
! 4616: }
! 4617: break;
! 4618:
! 4619: case 284:
! 4620:
! 4621: /* Line 1455 of yacc.c */
! 4622: #line 1933 "cfparse.y"
! 4623: {
! 4624: if (set_identifier_qual(&cur_rmconf->idv, (yyvsp[(2) - (4)].num), (yyvsp[(4) - (4)].val), (yyvsp[(3) - (4)].num)) != 0) {
! 4625: yyerror("failed to set identifer.\n");
! 4626: return -1;
! 4627: }
! 4628: cur_rmconf->idvtype = (yyvsp[(2) - (4)].num);
! 4629: }
! 4630: break;
! 4631:
! 4632: case 286:
! 4633:
! 4634: /* Line 1455 of yacc.c */
! 4635: #line 1942 "cfparse.y"
! 4636: {
! 4637: #ifdef ENABLE_HYBRID
! 4638: /* formerly identifier type login */
! 4639: if (xauth_rmconf_used(&cur_rmconf->xauth) == -1) {
! 4640: yyerror("failed to allocate xauth state\n");
! 4641: return -1;
! 4642: }
! 4643: if ((cur_rmconf->xauth->login = vdup((yyvsp[(2) - (2)].val))) == NULL) {
! 4644: yyerror("failed to set identifer.\n");
! 4645: return -1;
! 4646: }
! 4647: #else
! 4648: yyerror("racoon not configured with --enable-hybrid");
! 4649: #endif
! 4650: }
! 4651: break;
! 4652:
! 4653: case 288:
! 4654:
! 4655: /* Line 1455 of yacc.c */
! 4656: #line 1959 "cfparse.y"
! 4657: {
! 4658: struct idspec *id;
! 4659: id = newidspec();
! 4660: if (id == NULL) {
! 4661: yyerror("failed to allocate idspec");
! 4662: return -1;
! 4663: }
! 4664: if (set_identifier(&id->id, (yyvsp[(2) - (3)].num), (yyvsp[(3) - (3)].val)) != 0) {
! 4665: yyerror("failed to set identifer.\n");
! 4666: racoon_free(id);
! 4667: return -1;
! 4668: }
! 4669: id->idtype = (yyvsp[(2) - (3)].num);
! 4670: genlist_append (cur_rmconf->idvl_p, id);
! 4671: }
! 4672: break;
! 4673:
! 4674: case 290:
! 4675:
! 4676: /* Line 1455 of yacc.c */
! 4677: #line 1976 "cfparse.y"
! 4678: {
! 4679: struct idspec *id;
! 4680: id = newidspec();
! 4681: if (id == NULL) {
! 4682: yyerror("failed to allocate idspec");
! 4683: return -1;
! 4684: }
! 4685: if (set_identifier_qual(&id->id, (yyvsp[(2) - (4)].num), (yyvsp[(4) - (4)].val), (yyvsp[(3) - (4)].num)) != 0) {
! 4686: yyerror("failed to set identifer.\n");
! 4687: racoon_free(id);
! 4688: return -1;
! 4689: }
! 4690: id->idtype = (yyvsp[(2) - (4)].num);
! 4691: genlist_append (cur_rmconf->idvl_p, id);
! 4692: }
! 4693: break;
! 4694:
! 4695: case 292:
! 4696:
! 4697: /* Line 1455 of yacc.c */
! 4698: #line 1992 "cfparse.y"
! 4699: { cur_rmconf->verify_identifier = (yyvsp[(2) - (2)].num); }
! 4700: break;
! 4701:
! 4702: case 294:
! 4703:
! 4704: /* Line 1455 of yacc.c */
! 4705: #line 1993 "cfparse.y"
! 4706: { cur_rmconf->nonce_size = (yyvsp[(2) - (2)].num); }
! 4707: break;
! 4708:
! 4709: case 296:
! 4710:
! 4711: /* Line 1455 of yacc.c */
! 4712: #line 1995 "cfparse.y"
! 4713: {
! 4714: yyerror("dh_group cannot be defined here.");
! 4715: return -1;
! 4716: }
! 4717: break;
! 4718:
! 4719: case 298:
! 4720:
! 4721: /* Line 1455 of yacc.c */
! 4722: #line 2000 "cfparse.y"
! 4723: { cur_rmconf->passive = (yyvsp[(2) - (2)].num); }
! 4724: break;
! 4725:
! 4726: case 300:
! 4727:
! 4728: /* Line 1455 of yacc.c */
! 4729: #line 2001 "cfparse.y"
! 4730: { cur_rmconf->ike_frag = (yyvsp[(2) - (2)].num); }
! 4731: break;
! 4732:
! 4733: case 302:
! 4734:
! 4735: /* Line 1455 of yacc.c */
! 4736: #line 2002 "cfparse.y"
! 4737: { cur_rmconf->ike_frag = ISAKMP_FRAG_FORCE; }
! 4738: break;
! 4739:
! 4740: case 304:
! 4741:
! 4742: /* Line 1455 of yacc.c */
! 4743: #line 2003 "cfparse.y"
! 4744: {
! 4745: #ifdef SADB_X_EXT_NAT_T_FRAG
! 4746: if (libipsec_opt & LIBIPSEC_OPT_FRAG)
! 4747: cur_rmconf->esp_frag = (yyvsp[(2) - (2)].num);
! 4748: else
! 4749: yywarn("libipsec lacks IKE frag support");
! 4750: #else
! 4751: yywarn("Your kernel does not support esp_frag");
! 4752: #endif
! 4753: }
! 4754: break;
! 4755:
! 4756: case 306:
! 4757:
! 4758: /* Line 1455 of yacc.c */
! 4759: #line 2013 "cfparse.y"
! 4760: {
! 4761: if (cur_rmconf->script[SCRIPT_PHASE1_UP] != NULL)
! 4762: vfree(cur_rmconf->script[SCRIPT_PHASE1_UP]);
! 4763:
! 4764: cur_rmconf->script[SCRIPT_PHASE1_UP] =
! 4765: script_path_add(vdup((yyvsp[(2) - (3)].val)));
! 4766: }
! 4767: break;
! 4768:
! 4769: case 308:
! 4770:
! 4771: /* Line 1455 of yacc.c */
! 4772: #line 2020 "cfparse.y"
! 4773: {
! 4774: if (cur_rmconf->script[SCRIPT_PHASE1_DOWN] != NULL)
! 4775: vfree(cur_rmconf->script[SCRIPT_PHASE1_DOWN]);
! 4776:
! 4777: cur_rmconf->script[SCRIPT_PHASE1_DOWN] =
! 4778: script_path_add(vdup((yyvsp[(2) - (3)].val)));
! 4779: }
! 4780: break;
! 4781:
! 4782: case 310:
! 4783:
! 4784: /* Line 1455 of yacc.c */
! 4785: #line 2027 "cfparse.y"
! 4786: {
! 4787: if (cur_rmconf->script[SCRIPT_PHASE1_DEAD] != NULL)
! 4788: vfree(cur_rmconf->script[SCRIPT_PHASE1_DEAD]);
! 4789:
! 4790: cur_rmconf->script[SCRIPT_PHASE1_DEAD] =
! 4791: script_path_add(vdup((yyvsp[(2) - (3)].val)));
! 4792: }
! 4793: break;
! 4794:
! 4795: case 312:
! 4796:
! 4797: /* Line 1455 of yacc.c */
! 4798: #line 2034 "cfparse.y"
! 4799: { cur_rmconf->mode_cfg = (yyvsp[(2) - (2)].num); }
! 4800: break;
! 4801:
! 4802: case 314:
! 4803:
! 4804: /* Line 1455 of yacc.c */
! 4805: #line 2035 "cfparse.y"
! 4806: {
! 4807: cur_rmconf->weak_phase1_check = (yyvsp[(2) - (2)].num);
! 4808: }
! 4809: break;
! 4810:
! 4811: case 316:
! 4812:
! 4813: /* Line 1455 of yacc.c */
! 4814: #line 2038 "cfparse.y"
! 4815: { cur_rmconf->gen_policy = (yyvsp[(2) - (2)].num); }
! 4816: break;
! 4817:
! 4818: case 318:
! 4819:
! 4820: /* Line 1455 of yacc.c */
! 4821: #line 2039 "cfparse.y"
! 4822: { cur_rmconf->gen_policy = (yyvsp[(2) - (2)].num); }
! 4823: break;
! 4824:
! 4825: case 320:
! 4826:
! 4827: /* Line 1455 of yacc.c */
! 4828: #line 2040 "cfparse.y"
! 4829: { cur_rmconf->support_proxy = (yyvsp[(2) - (2)].num); }
! 4830: break;
! 4831:
! 4832: case 322:
! 4833:
! 4834: /* Line 1455 of yacc.c */
! 4835: #line 2041 "cfparse.y"
! 4836: { cur_rmconf->ini_contact = (yyvsp[(2) - (2)].num); }
! 4837: break;
! 4838:
! 4839: case 324:
! 4840:
! 4841: /* Line 1455 of yacc.c */
! 4842: #line 2043 "cfparse.y"
! 4843: {
! 4844: #ifdef ENABLE_NATT
! 4845: if (libipsec_opt & LIBIPSEC_OPT_NATT)
! 4846: cur_rmconf->nat_traversal = (yyvsp[(2) - (2)].num);
! 4847: else
! 4848: yyerror("libipsec lacks NAT-T support");
! 4849: #else
! 4850: yyerror("NAT-T support not compiled in.");
! 4851: #endif
! 4852: }
! 4853: break;
! 4854:
! 4855: case 326:
! 4856:
! 4857: /* Line 1455 of yacc.c */
! 4858: #line 2054 "cfparse.y"
! 4859: {
! 4860: #ifdef ENABLE_NATT
! 4861: if (libipsec_opt & LIBIPSEC_OPT_NATT)
! 4862: cur_rmconf->nat_traversal = NATT_FORCE;
! 4863: else
! 4864: yyerror("libipsec lacks NAT-T support");
! 4865: #else
! 4866: yyerror("NAT-T support not compiled in.");
! 4867: #endif
! 4868: }
! 4869: break;
! 4870:
! 4871: case 328:
! 4872:
! 4873: /* Line 1455 of yacc.c */
! 4874: #line 2065 "cfparse.y"
! 4875: {
! 4876: #ifdef ENABLE_DPD
! 4877: cur_rmconf->dpd = (yyvsp[(2) - (2)].num);
! 4878: #else
! 4879: yyerror("DPD support not compiled in.");
! 4880: #endif
! 4881: }
! 4882: break;
! 4883:
! 4884: case 330:
! 4885:
! 4886: /* Line 1455 of yacc.c */
! 4887: #line 2073 "cfparse.y"
! 4888: {
! 4889: #ifdef ENABLE_DPD
! 4890: cur_rmconf->dpd_interval = (yyvsp[(2) - (2)].num);
! 4891: #else
! 4892: yyerror("DPD support not compiled in.");
! 4893: #endif
! 4894: }
! 4895: break;
! 4896:
! 4897: case 332:
! 4898:
! 4899: /* Line 1455 of yacc.c */
! 4900: #line 2082 "cfparse.y"
! 4901: {
! 4902: #ifdef ENABLE_DPD
! 4903: cur_rmconf->dpd_retry = (yyvsp[(2) - (2)].num);
! 4904: #else
! 4905: yyerror("DPD support not compiled in.");
! 4906: #endif
! 4907: }
! 4908: break;
! 4909:
! 4910: case 334:
! 4911:
! 4912: /* Line 1455 of yacc.c */
! 4913: #line 2091 "cfparse.y"
! 4914: {
! 4915: #ifdef ENABLE_DPD
! 4916: cur_rmconf->dpd_maxfails = (yyvsp[(2) - (2)].num);
! 4917: #else
! 4918: yyerror("DPD support not compiled in.");
! 4919: #endif
! 4920: }
! 4921: break;
! 4922:
! 4923: case 336:
! 4924:
! 4925: /* Line 1455 of yacc.c */
! 4926: #line 2099 "cfparse.y"
! 4927: { cur_rmconf->rekey = (yyvsp[(2) - (2)].num); }
! 4928: break;
! 4929:
! 4930: case 338:
! 4931:
! 4932: /* Line 1455 of yacc.c */
! 4933: #line 2100 "cfparse.y"
! 4934: { cur_rmconf->rekey = REKEY_FORCE; }
! 4935: break;
! 4936:
! 4937: case 340:
! 4938:
! 4939: /* Line 1455 of yacc.c */
! 4940: #line 2102 "cfparse.y"
! 4941: {
! 4942: cur_rmconf->ph1id = (yyvsp[(2) - (2)].num);
! 4943: }
! 4944: break;
! 4945:
! 4946: case 342:
! 4947:
! 4948: /* Line 1455 of yacc.c */
! 4949: #line 2107 "cfparse.y"
! 4950: {
! 4951: cur_rmconf->lifetime = (yyvsp[(3) - (4)].num) * (yyvsp[(4) - (4)].num);
! 4952: }
! 4953: break;
! 4954:
! 4955: case 344:
! 4956:
! 4957: /* Line 1455 of yacc.c */
! 4958: #line 2111 "cfparse.y"
! 4959: { cur_rmconf->pcheck_level = (yyvsp[(2) - (2)].num); }
! 4960: break;
! 4961:
! 4962: case 346:
! 4963:
! 4964: /* Line 1455 of yacc.c */
! 4965: #line 2113 "cfparse.y"
! 4966: {
! 4967: #if 1
! 4968: yyerror("byte lifetime support is deprecated in Phase1");
! 4969: return -1;
! 4970: #else
! 4971: yywarn("the lifetime of bytes in phase 1 "
! 4972: "will be ignored at the moment.");
! 4973: cur_rmconf->lifebyte = fix_lifebyte((yyvsp[(3) - (4)].num) * (yyvsp[(4) - (4)].num));
! 4974: if (cur_rmconf->lifebyte == 0)
! 4975: return -1;
! 4976: #endif
! 4977: }
! 4978: break;
! 4979:
! 4980: case 348:
! 4981:
! 4982: /* Line 1455 of yacc.c */
! 4983: #line 2127 "cfparse.y"
! 4984: {
! 4985: struct secprotospec *spspec;
! 4986:
! 4987: spspec = newspspec();
! 4988: if (spspec == NULL)
! 4989: return -1;
! 4990: insspspec(cur_rmconf, spspec);
! 4991: }
! 4992: break;
! 4993:
! 4994: case 351:
! 4995:
! 4996: /* Line 1455 of yacc.c */
! 4997: #line 2140 "cfparse.y"
! 4998: {
! 4999: struct etypes *new;
! 5000: new = racoon_malloc(sizeof(struct etypes));
! 5001: if (new == NULL) {
! 5002: yyerror("failed to allocate etypes");
! 5003: return -1;
! 5004: }
! 5005: new->type = (yyvsp[(2) - (2)].num);
! 5006: new->next = NULL;
! 5007: if (cur_rmconf->etypes == NULL)
! 5008: cur_rmconf->etypes = new;
! 5009: else {
! 5010: struct etypes *p;
! 5011: for (p = cur_rmconf->etypes;
! 5012: p->next != NULL;
! 5013: p = p->next)
! 5014: ;
! 5015: p->next = new;
! 5016: }
! 5017: }
! 5018: break;
! 5019:
! 5020: case 352:
! 5021:
! 5022: /* Line 1455 of yacc.c */
! 5023: #line 2163 "cfparse.y"
! 5024: {
! 5025: if (cur_rmconf->mycert != NULL) {
! 5026: yyerror("certificate_type already defined\n");
! 5027: return -1;
! 5028: }
! 5029:
! 5030: if (load_x509((yyvsp[(2) - (3)].val)->v, &cur_rmconf->mycertfile,
! 5031: &cur_rmconf->mycert)) {
! 5032: yyerror("failed to load certificate \"%s\"\n",
! 5033: (yyvsp[(2) - (3)].val)->v);
! 5034: return -1;
! 5035: }
! 5036:
! 5037: cur_rmconf->myprivfile = racoon_strdup((yyvsp[(3) - (3)].val)->v);
! 5038: STRDUP_FATAL(cur_rmconf->myprivfile);
! 5039:
! 5040: vfree((yyvsp[(2) - (3)].val));
! 5041: vfree((yyvsp[(3) - (3)].val));
! 5042: }
! 5043: break;
! 5044:
! 5045: case 354:
! 5046:
! 5047: /* Line 1455 of yacc.c */
! 5048: #line 2184 "cfparse.y"
! 5049: {
! 5050: char path[MAXPATHLEN];
! 5051: int ret = 0;
! 5052:
! 5053: if (cur_rmconf->mycert != NULL) {
! 5054: yyerror("certificate_type already defined\n");
! 5055: return -1;
! 5056: }
! 5057:
! 5058: cur_rmconf->mycert = vmalloc(1);
! 5059: if (cur_rmconf->mycert == NULL) {
! 5060: yyerror("failed to allocate mycert");
! 5061: return -1;
! 5062: }
! 5063: cur_rmconf->mycert->v[0] = ISAKMP_CERT_PLAINRSA;
! 5064:
! 5065: getpathname(path, sizeof(path),
! 5066: LC_PATHTYPE_CERT, (yyvsp[(2) - (2)].val)->v);
! 5067: cur_rmconf->send_cr = FALSE;
! 5068: cur_rmconf->send_cert = FALSE;
! 5069: cur_rmconf->verify_cert = FALSE;
! 5070: if (rsa_parse_file(cur_rmconf->rsa_private, path,
! 5071: RSA_TYPE_PRIVATE)) {
! 5072: yyerror("Couldn't parse keyfile.\n", path);
! 5073: return -1;
! 5074: }
! 5075: plog(LLV_DEBUG, LOCATION, NULL,
! 5076: "Private PlainRSA keyfile parsed: %s\n", path);
! 5077: vfree((yyvsp[(2) - (2)].val));
! 5078: }
! 5079: break;
! 5080:
! 5081: case 356:
! 5082:
! 5083: /* Line 1455 of yacc.c */
! 5084: #line 2218 "cfparse.y"
! 5085: {
! 5086: (yyval.num) = algtype2doi(algclass_isakmp_dh, (yyvsp[(1) - (1)].num));
! 5087: if ((yyval.num) == -1) {
! 5088: yyerror("must be DH group");
! 5089: return -1;
! 5090: }
! 5091: }
! 5092: break;
! 5093:
! 5094: case 357:
! 5095:
! 5096: /* Line 1455 of yacc.c */
! 5097: #line 2226 "cfparse.y"
! 5098: {
! 5099: if (ARRAYLEN(num2dhgroup) > (yyvsp[(1) - (1)].num) && num2dhgroup[(yyvsp[(1) - (1)].num)] != 0) {
! 5100: (yyval.num) = num2dhgroup[(yyvsp[(1) - (1)].num)];
! 5101: } else {
! 5102: yyerror("must be DH group");
! 5103: (yyval.num) = 0;
! 5104: return -1;
! 5105: }
! 5106: }
! 5107: break;
! 5108:
! 5109: case 358:
! 5110:
! 5111: /* Line 1455 of yacc.c */
! 5112: #line 2237 "cfparse.y"
! 5113: { (yyval.val) = NULL; }
! 5114: break;
! 5115:
! 5116: case 359:
! 5117:
! 5118: /* Line 1455 of yacc.c */
! 5119: #line 2238 "cfparse.y"
! 5120: { (yyval.val) = (yyvsp[(1) - (1)].val); }
! 5121: break;
! 5122:
! 5123: case 360:
! 5124:
! 5125: /* Line 1455 of yacc.c */
! 5126: #line 2239 "cfparse.y"
! 5127: { (yyval.val) = (yyvsp[(1) - (1)].val); }
! 5128: break;
! 5129:
! 5130: case 363:
! 5131:
! 5132: /* Line 1455 of yacc.c */
! 5133: #line 2247 "cfparse.y"
! 5134: {
! 5135: cur_rmconf->spspec->lifetime = (yyvsp[(3) - (4)].num) * (yyvsp[(4) - (4)].num);
! 5136: }
! 5137: break;
! 5138:
! 5139: case 365:
! 5140:
! 5141: /* Line 1455 of yacc.c */
! 5142: #line 2252 "cfparse.y"
! 5143: {
! 5144: #if 1
! 5145: yyerror("byte lifetime support is deprecated");
! 5146: return -1;
! 5147: #else
! 5148: cur_rmconf->spspec->lifebyte = fix_lifebyte((yyvsp[(3) - (4)].num) * (yyvsp[(4) - (4)].num));
! 5149: if (cur_rmconf->spspec->lifebyte == 0)
! 5150: return -1;
! 5151: #endif
! 5152: }
! 5153: break;
! 5154:
! 5155: case 367:
! 5156:
! 5157: /* Line 1455 of yacc.c */
! 5158: #line 2264 "cfparse.y"
! 5159: {
! 5160: cur_rmconf->spspec->algclass[algclass_isakmp_dh] = (yyvsp[(2) - (2)].num);
! 5161: }
! 5162: break;
! 5163:
! 5164: case 369:
! 5165:
! 5166: /* Line 1455 of yacc.c */
! 5167: #line 2269 "cfparse.y"
! 5168: {
! 5169: if (cur_rmconf->spspec->vendorid != VENDORID_GSSAPI) {
! 5170: yyerror("wrong Vendor ID for gssapi_id");
! 5171: return -1;
! 5172: }
! 5173: if (cur_rmconf->spspec->gssid != NULL)
! 5174: racoon_free(cur_rmconf->spspec->gssid);
! 5175: cur_rmconf->spspec->gssid =
! 5176: racoon_strdup((yyvsp[(2) - (2)].val)->v);
! 5177: STRDUP_FATAL(cur_rmconf->spspec->gssid);
! 5178: }
! 5179: break;
! 5180:
! 5181: case 371:
! 5182:
! 5183: /* Line 1455 of yacc.c */
! 5184: #line 2282 "cfparse.y"
! 5185: {
! 5186: int doi;
! 5187: int defklen;
! 5188:
! 5189: doi = algtype2doi((yyvsp[(1) - (3)].num), (yyvsp[(2) - (3)].num));
! 5190: if (doi == -1) {
! 5191: yyerror("algorithm mismatched 1");
! 5192: return -1;
! 5193: }
! 5194:
! 5195: switch ((yyvsp[(1) - (3)].num)) {
! 5196: case algclass_isakmp_enc:
! 5197: /* reject suppressed algorithms */
! 5198: #ifndef HAVE_OPENSSL_RC5_H
! 5199: if ((yyvsp[(2) - (3)].num) == algtype_rc5) {
! 5200: yyerror("algorithm %s not supported",
! 5201: s_attr_isakmp_enc(doi));
! 5202: return -1;
! 5203: }
! 5204: #endif
! 5205: #ifndef HAVE_OPENSSL_IDEA_H
! 5206: if ((yyvsp[(2) - (3)].num) == algtype_idea) {
! 5207: yyerror("algorithm %s not supported",
! 5208: s_attr_isakmp_enc(doi));
! 5209: return -1;
! 5210: }
! 5211: #endif
! 5212:
! 5213: cur_rmconf->spspec->algclass[algclass_isakmp_enc] = doi;
! 5214: defklen = default_keylen((yyvsp[(1) - (3)].num), (yyvsp[(2) - (3)].num));
! 5215: if (defklen == 0) {
! 5216: if ((yyvsp[(3) - (3)].num)) {
! 5217: yyerror("keylen not allowed");
! 5218: return -1;
! 5219: }
! 5220: } else {
! 5221: if ((yyvsp[(3) - (3)].num) && check_keylen((yyvsp[(1) - (3)].num), (yyvsp[(2) - (3)].num), (yyvsp[(3) - (3)].num)) < 0) {
! 5222: yyerror("invalid keylen %d", (yyvsp[(3) - (3)].num));
! 5223: return -1;
! 5224: }
! 5225: }
! 5226: if ((yyvsp[(3) - (3)].num))
! 5227: cur_rmconf->spspec->encklen = (yyvsp[(3) - (3)].num);
! 5228: else
! 5229: cur_rmconf->spspec->encklen = defklen;
! 5230: break;
! 5231: case algclass_isakmp_hash:
! 5232: cur_rmconf->spspec->algclass[algclass_isakmp_hash] = doi;
! 5233: break;
! 5234: case algclass_isakmp_ameth:
! 5235: cur_rmconf->spspec->algclass[algclass_isakmp_ameth] = doi;
! 5236: /*
! 5237: * We may have to set the Vendor ID for the
! 5238: * authentication method we're using.
! 5239: */
! 5240: switch ((yyvsp[(2) - (3)].num)) {
! 5241: case algtype_gssapikrb:
! 5242: if (cur_rmconf->spspec->vendorid !=
! 5243: VENDORID_UNKNOWN) {
! 5244: yyerror("Vendor ID mismatch "
! 5245: "for auth method");
! 5246: return -1;
! 5247: }
! 5248: /*
! 5249: * For interoperability with Win2k,
! 5250: * we set the Vendor ID to "GSSAPI".
! 5251: */
! 5252: cur_rmconf->spspec->vendorid =
! 5253: VENDORID_GSSAPI;
! 5254: break;
! 5255: case algtype_rsasig:
! 5256: if (oakley_get_certtype(cur_rmconf->peerscert) == ISAKMP_CERT_PLAINRSA) {
! 5257: if (rsa_list_count(cur_rmconf->rsa_private) == 0) {
! 5258: yyerror ("Private PlainRSA key not set. "
! 5259: "Use directive 'certificate_type plainrsa ...'\n");
! 5260: return -1;
! 5261: }
! 5262: if (rsa_list_count(cur_rmconf->rsa_public) == 0) {
! 5263: yyerror ("Public PlainRSA keys not set. "
! 5264: "Use directive 'peers_certfile plainrsa ...'\n");
! 5265: return -1;
! 5266: }
! 5267: }
! 5268: break;
! 5269: default:
! 5270: break;
! 5271: }
! 5272: break;
! 5273: default:
! 5274: yyerror("algorithm mismatched 2");
! 5275: return -1;
! 5276: }
! 5277: }
! 5278: break;
! 5279:
! 5280: case 373:
! 5281:
! 5282: /* Line 1455 of yacc.c */
! 5283: #line 2379 "cfparse.y"
! 5284: { (yyval.num) = 1; }
! 5285: break;
! 5286:
! 5287: case 374:
! 5288:
! 5289: /* Line 1455 of yacc.c */
! 5290: #line 2380 "cfparse.y"
! 5291: { (yyval.num) = 60; }
! 5292: break;
! 5293:
! 5294: case 375:
! 5295:
! 5296: /* Line 1455 of yacc.c */
! 5297: #line 2381 "cfparse.y"
! 5298: { (yyval.num) = (60 * 60); }
! 5299: break;
! 5300:
! 5301: case 376:
! 5302:
! 5303: /* Line 1455 of yacc.c */
! 5304: #line 2384 "cfparse.y"
! 5305: { (yyval.num) = 1; }
! 5306: break;
! 5307:
! 5308: case 377:
! 5309:
! 5310: /* Line 1455 of yacc.c */
! 5311: #line 2385 "cfparse.y"
! 5312: { (yyval.num) = 1024; }
! 5313: break;
! 5314:
! 5315: case 378:
! 5316:
! 5317: /* Line 1455 of yacc.c */
! 5318: #line 2386 "cfparse.y"
! 5319: { (yyval.num) = (1024 * 1024); }
! 5320: break;
! 5321:
! 5322: case 379:
! 5323:
! 5324: /* Line 1455 of yacc.c */
! 5325: #line 2387 "cfparse.y"
! 5326: { (yyval.num) = (1024 * 1024 * 1024); }
! 5327: break;
! 5328:
! 5329:
! 5330:
! 5331: /* Line 1455 of yacc.c */
! 5332: #line 5333 "cfparse.c"
! 5333: default: break;
! 5334: }
! 5335: YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
! 5336:
! 5337: YYPOPSTACK (yylen);
! 5338: yylen = 0;
! 5339: YY_STACK_PRINT (yyss, yyssp);
! 5340:
! 5341: *++yyvsp = yyval;
! 5342:
! 5343: /* Now `shift' the result of the reduction. Determine what state
! 5344: that goes to, based on the state we popped back to and the rule
! 5345: number reduced by. */
! 5346:
! 5347: yyn = yyr1[yyn];
! 5348:
! 5349: yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
! 5350: if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
! 5351: yystate = yytable[yystate];
! 5352: else
! 5353: yystate = yydefgoto[yyn - YYNTOKENS];
! 5354:
! 5355: goto yynewstate;
! 5356:
! 5357:
! 5358: /*------------------------------------.
! 5359: | yyerrlab -- here on detecting error |
! 5360: `------------------------------------*/
! 5361: yyerrlab:
! 5362: /* If not already recovering from an error, report this error. */
! 5363: if (!yyerrstatus)
! 5364: {
! 5365: ++yynerrs;
! 5366: #if ! YYERROR_VERBOSE
! 5367: yyerror (YY_("syntax error"));
! 5368: #else
! 5369: {
! 5370: YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
! 5371: if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
! 5372: {
! 5373: YYSIZE_T yyalloc = 2 * yysize;
! 5374: if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
! 5375: yyalloc = YYSTACK_ALLOC_MAXIMUM;
! 5376: if (yymsg != yymsgbuf)
! 5377: YYSTACK_FREE (yymsg);
! 5378: yymsg = (char *) YYSTACK_ALLOC (yyalloc);
! 5379: if (yymsg)
! 5380: yymsg_alloc = yyalloc;
! 5381: else
! 5382: {
! 5383: yymsg = yymsgbuf;
! 5384: yymsg_alloc = sizeof yymsgbuf;
! 5385: }
! 5386: }
! 5387:
! 5388: if (0 < yysize && yysize <= yymsg_alloc)
! 5389: {
! 5390: (void) yysyntax_error (yymsg, yystate, yychar);
! 5391: yyerror (yymsg);
! 5392: }
! 5393: else
! 5394: {
! 5395: yyerror (YY_("syntax error"));
! 5396: if (yysize != 0)
! 5397: goto yyexhaustedlab;
! 5398: }
! 5399: }
! 5400: #endif
! 5401: }
! 5402:
! 5403:
! 5404:
! 5405: if (yyerrstatus == 3)
! 5406: {
! 5407: /* If just tried and failed to reuse lookahead token after an
! 5408: error, discard it. */
! 5409:
! 5410: if (yychar <= YYEOF)
! 5411: {
! 5412: /* Return failure if at end of input. */
! 5413: if (yychar == YYEOF)
! 5414: YYABORT;
! 5415: }
! 5416: else
! 5417: {
! 5418: yydestruct ("Error: discarding",
! 5419: yytoken, &yylval);
! 5420: yychar = YYEMPTY;
! 5421: }
! 5422: }
! 5423:
! 5424: /* Else will try to reuse lookahead token after shifting the error
! 5425: token. */
! 5426: goto yyerrlab1;
! 5427:
! 5428:
! 5429: /*---------------------------------------------------.
! 5430: | yyerrorlab -- error raised explicitly by YYERROR. |
! 5431: `---------------------------------------------------*/
! 5432: yyerrorlab:
! 5433:
! 5434: /* Pacify compilers like GCC when the user code never invokes
! 5435: YYERROR and the label yyerrorlab therefore never appears in user
! 5436: code. */
! 5437: if (/*CONSTCOND*/ 0)
! 5438: goto yyerrorlab;
! 5439:
! 5440: /* Do not reclaim the symbols of the rule which action triggered
! 5441: this YYERROR. */
! 5442: YYPOPSTACK (yylen);
! 5443: yylen = 0;
! 5444: YY_STACK_PRINT (yyss, yyssp);
! 5445: yystate = *yyssp;
! 5446: goto yyerrlab1;
! 5447:
! 5448:
! 5449: /*-------------------------------------------------------------.
! 5450: | yyerrlab1 -- common code for both syntax error and YYERROR. |
! 5451: `-------------------------------------------------------------*/
! 5452: yyerrlab1:
! 5453: yyerrstatus = 3; /* Each real token shifted decrements this. */
! 5454:
! 5455: for (;;)
! 5456: {
! 5457: yyn = yypact[yystate];
! 5458: if (yyn != YYPACT_NINF)
! 5459: {
! 5460: yyn += YYTERROR;
! 5461: if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
! 5462: {
! 5463: yyn = yytable[yyn];
! 5464: if (0 < yyn)
! 5465: break;
! 5466: }
! 5467: }
! 5468:
! 5469: /* Pop the current state because it cannot handle the error token. */
! 5470: if (yyssp == yyss)
! 5471: YYABORT;
! 5472:
! 5473:
! 5474: yydestruct ("Error: popping",
! 5475: yystos[yystate], yyvsp);
! 5476: YYPOPSTACK (1);
! 5477: yystate = *yyssp;
! 5478: YY_STACK_PRINT (yyss, yyssp);
! 5479: }
! 5480:
! 5481: *++yyvsp = yylval;
! 5482:
! 5483:
! 5484: /* Shift the error token. */
! 5485: YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
! 5486:
! 5487: yystate = yyn;
! 5488: goto yynewstate;
! 5489:
! 5490:
! 5491: /*-------------------------------------.
! 5492: | yyacceptlab -- YYACCEPT comes here. |
! 5493: `-------------------------------------*/
! 5494: yyacceptlab:
! 5495: yyresult = 0;
! 5496: goto yyreturn;
! 5497:
! 5498: /*-----------------------------------.
! 5499: | yyabortlab -- YYABORT comes here. |
! 5500: `-----------------------------------*/
! 5501: yyabortlab:
! 5502: yyresult = 1;
! 5503: goto yyreturn;
! 5504:
! 5505: #if !defined(yyoverflow) || YYERROR_VERBOSE
! 5506: /*-------------------------------------------------.
! 5507: | yyexhaustedlab -- memory exhaustion comes here. |
! 5508: `-------------------------------------------------*/
! 5509: yyexhaustedlab:
! 5510: yyerror (YY_("memory exhausted"));
! 5511: yyresult = 2;
! 5512: /* Fall through. */
! 5513: #endif
! 5514:
! 5515: yyreturn:
! 5516: if (yychar != YYEMPTY)
! 5517: yydestruct ("Cleanup: discarding lookahead",
! 5518: yytoken, &yylval);
! 5519: /* Do not reclaim the symbols of the rule which action triggered
! 5520: this YYABORT or YYACCEPT. */
! 5521: YYPOPSTACK (yylen);
! 5522: YY_STACK_PRINT (yyss, yyssp);
! 5523: while (yyssp != yyss)
! 5524: {
! 5525: yydestruct ("Cleanup: popping",
! 5526: yystos[*yyssp], yyvsp);
! 5527: YYPOPSTACK (1);
! 5528: }
! 5529: #ifndef yyoverflow
! 5530: if (yyss != yyssa)
! 5531: YYSTACK_FREE (yyss);
! 5532: #endif
! 5533: #if YYERROR_VERBOSE
! 5534: if (yymsg != yymsgbuf)
! 5535: YYSTACK_FREE (yymsg);
! 5536: #endif
! 5537: /* Make sure YYID is used. */
! 5538: return YYID (yyresult);
! 5539: }
! 5540:
! 5541:
! 5542:
! 5543: /* Line 1675 of yacc.c */
! 5544: #line 2389 "cfparse.y"
! 5545:
! 5546:
! 5547: static struct secprotospec *
! 5548: newspspec()
! 5549: {
! 5550: struct secprotospec *new;
! 5551:
! 5552: new = racoon_calloc(1, sizeof(*new));
! 5553: if (new == NULL) {
! 5554: yyerror("failed to allocate spproto");
! 5555: return NULL;
! 5556: }
! 5557:
! 5558: new->encklen = 0; /*XXX*/
! 5559:
! 5560: /*
! 5561: * Default to "uknown" vendor -- we will override this
! 5562: * as necessary. When we send a Vendor ID payload, an
! 5563: * "unknown" will be translated to a KAME/racoon ID.
! 5564: */
! 5565: new->vendorid = VENDORID_UNKNOWN;
! 5566:
! 5567: return new;
! 5568: }
! 5569:
! 5570: /*
! 5571: * insert into head of list.
! 5572: */
! 5573: static void
! 5574: insspspec(rmconf, spspec)
! 5575: struct remoteconf *rmconf;
! 5576: struct secprotospec *spspec;
! 5577: {
! 5578: if (rmconf->spspec != NULL)
! 5579: rmconf->spspec->prev = spspec;
! 5580: spspec->next = rmconf->spspec;
! 5581: rmconf->spspec = spspec;
! 5582: }
! 5583:
! 5584: static struct secprotospec *
! 5585: dupspspec(spspec)
! 5586: struct secprotospec *spspec;
! 5587: {
! 5588: struct secprotospec *new;
! 5589:
! 5590: new = newspspec();
! 5591: if (new == NULL) {
! 5592: plog(LLV_ERROR, LOCATION, NULL,
! 5593: "dupspspec: malloc failed\n");
! 5594: return NULL;
! 5595: }
! 5596: memcpy(new, spspec, sizeof(*new));
! 5597:
! 5598: if (spspec->gssid) {
! 5599: new->gssid = racoon_strdup(spspec->gssid);
! 5600: STRDUP_FATAL(new->gssid);
! 5601: }
! 5602: if (spspec->remote) {
! 5603: new->remote = racoon_malloc(sizeof(*new->remote));
! 5604: if (new->remote == NULL) {
! 5605: plog(LLV_ERROR, LOCATION, NULL,
! 5606: "dupspspec: malloc failed (remote)\n");
! 5607: return NULL;
! 5608: }
! 5609: memcpy(new->remote, spspec->remote, sizeof(*new->remote));
! 5610: }
! 5611:
! 5612: return new;
! 5613: }
! 5614:
! 5615: /*
! 5616: * copy the whole list
! 5617: */
! 5618: void
! 5619: dupspspec_list(dst, src)
! 5620: struct remoteconf *dst, *src;
! 5621: {
! 5622: struct secprotospec *p, *new, *last;
! 5623:
! 5624: for(p = src->spspec, last = NULL; p; p = p->next, last = new) {
! 5625: new = dupspspec(p);
! 5626: if (new == NULL)
! 5627: exit(1);
! 5628:
! 5629: new->prev = last;
! 5630: new->next = NULL; /* not necessary but clean */
! 5631:
! 5632: if (last)
! 5633: last->next = new;
! 5634: else /* first element */
! 5635: dst->spspec = new;
! 5636:
! 5637: }
! 5638: }
! 5639:
! 5640: /*
! 5641: * delete the whole list
! 5642: */
! 5643: void
! 5644: flushspspec(rmconf)
! 5645: struct remoteconf *rmconf;
! 5646: {
! 5647: struct secprotospec *p;
! 5648:
! 5649: while(rmconf->spspec != NULL) {
! 5650: p = rmconf->spspec;
! 5651: rmconf->spspec = p->next;
! 5652: if (p->next != NULL)
! 5653: p->next->prev = NULL; /* not necessary but clean */
! 5654:
! 5655: if (p->gssid)
! 5656: racoon_free(p->gssid);
! 5657: if (p->remote)
! 5658: racoon_free(p->remote);
! 5659: racoon_free(p);
! 5660: }
! 5661: rmconf->spspec = NULL;
! 5662: }
! 5663:
! 5664: /* set final acceptable proposal */
! 5665: static int
! 5666: set_isakmp_proposal(rmconf)
! 5667: struct remoteconf *rmconf;
! 5668: {
! 5669: struct secprotospec *s;
! 5670: int prop_no = 1;
! 5671: int trns_no = 1;
! 5672: int32_t types[MAXALGCLASS];
! 5673:
! 5674: /* mandatory check */
! 5675: if (rmconf->spspec == NULL) {
! 5676: yyerror("no remote specification found: %s.\n",
! 5677: saddr2str(rmconf->remote));
! 5678: return -1;
! 5679: }
! 5680: for (s = rmconf->spspec; s != NULL; s = s->next) {
! 5681: /* XXX need more to check */
! 5682: if (s->algclass[algclass_isakmp_enc] == 0) {
! 5683: yyerror("encryption algorithm required.");
! 5684: return -1;
! 5685: }
! 5686: if (s->algclass[algclass_isakmp_hash] == 0) {
! 5687: yyerror("hash algorithm required.");
! 5688: return -1;
! 5689: }
! 5690: if (s->algclass[algclass_isakmp_dh] == 0) {
! 5691: yyerror("DH group required.");
! 5692: return -1;
! 5693: }
! 5694: if (s->algclass[algclass_isakmp_ameth] == 0) {
! 5695: yyerror("authentication method required.");
! 5696: return -1;
! 5697: }
! 5698: }
! 5699:
! 5700: /* skip to last part */
! 5701: for (s = rmconf->spspec; s->next != NULL; s = s->next)
! 5702: ;
! 5703:
! 5704: while (s != NULL) {
! 5705: plog(LLV_DEBUG2, LOCATION, NULL,
! 5706: "lifetime = %ld\n", (long)
! 5707: (s->lifetime ? s->lifetime : rmconf->lifetime));
! 5708: plog(LLV_DEBUG2, LOCATION, NULL,
! 5709: "lifebyte = %d\n",
! 5710: s->lifebyte ? s->lifebyte : rmconf->lifebyte);
! 5711: plog(LLV_DEBUG2, LOCATION, NULL,
! 5712: "encklen=%d\n", s->encklen);
! 5713:
! 5714: memset(types, 0, ARRAYLEN(types));
! 5715: types[algclass_isakmp_enc] = s->algclass[algclass_isakmp_enc];
! 5716: types[algclass_isakmp_hash] = s->algclass[algclass_isakmp_hash];
! 5717: types[algclass_isakmp_dh] = s->algclass[algclass_isakmp_dh];
! 5718: types[algclass_isakmp_ameth] =
! 5719: s->algclass[algclass_isakmp_ameth];
! 5720:
! 5721: /* expanding spspec */
! 5722: clean_tmpalgtype();
! 5723: trns_no = expand_isakmpspec(prop_no, trns_no, types,
! 5724: algclass_isakmp_enc, algclass_isakmp_ameth + 1,
! 5725: s->lifetime ? s->lifetime : rmconf->lifetime,
! 5726: s->lifebyte ? s->lifebyte : rmconf->lifebyte,
! 5727: s->encklen, s->vendorid, s->gssid,
! 5728: rmconf);
! 5729: if (trns_no == -1) {
! 5730: plog(LLV_ERROR, LOCATION, NULL,
! 5731: "failed to expand isakmp proposal.\n");
! 5732: return -1;
! 5733: }
! 5734:
! 5735: s = s->prev;
! 5736: }
! 5737:
! 5738: if (rmconf->proposal == NULL) {
! 5739: plog(LLV_ERROR, LOCATION, NULL,
! 5740: "no proposal found.\n");
! 5741: return -1;
! 5742: }
! 5743:
! 5744: return 0;
! 5745: }
! 5746:
! 5747: static void
! 5748: clean_tmpalgtype()
! 5749: {
! 5750: int i;
! 5751: for (i = 0; i < MAXALGCLASS; i++)
! 5752: tmpalgtype[i] = 0; /* means algorithm undefined. */
! 5753: }
! 5754:
! 5755: static int
! 5756: expand_isakmpspec(prop_no, trns_no, types,
! 5757: class, last, lifetime, lifebyte, encklen, vendorid, gssid,
! 5758: rmconf)
! 5759: int prop_no, trns_no;
! 5760: int *types, class, last;
! 5761: time_t lifetime;
! 5762: int lifebyte;
! 5763: int encklen;
! 5764: int vendorid;
! 5765: char *gssid;
! 5766: struct remoteconf *rmconf;
! 5767: {
! 5768: struct isakmpsa *new;
! 5769:
! 5770: /* debugging */
! 5771: {
! 5772: int j;
! 5773: char tb[10];
! 5774: plog(LLV_DEBUG2, LOCATION, NULL,
! 5775: "p:%d t:%d\n", prop_no, trns_no);
! 5776: for (j = class; j < MAXALGCLASS; j++) {
! 5777: snprintf(tb, sizeof(tb), "%d", types[j]);
! 5778: plog(LLV_DEBUG2, LOCATION, NULL,
! 5779: "%s%s%s%s\n",
! 5780: s_algtype(j, types[j]),
! 5781: types[j] ? "(" : "",
! 5782: tb[0] == '0' ? "" : tb,
! 5783: types[j] ? ")" : "");
! 5784: }
! 5785: plog(LLV_DEBUG2, LOCATION, NULL, "\n");
! 5786: }
! 5787:
! 5788: #define TMPALGTYPE2STR(n) \
! 5789: s_algtype(algclass_isakmp_##n, types[algclass_isakmp_##n])
! 5790: /* check mandatory values */
! 5791: if (types[algclass_isakmp_enc] == 0
! 5792: || types[algclass_isakmp_ameth] == 0
! 5793: || types[algclass_isakmp_hash] == 0
! 5794: || types[algclass_isakmp_dh] == 0) {
! 5795: yyerror("few definition of algorithm "
! 5796: "enc=%s ameth=%s hash=%s dhgroup=%s.\n",
! 5797: TMPALGTYPE2STR(enc),
! 5798: TMPALGTYPE2STR(ameth),
! 5799: TMPALGTYPE2STR(hash),
! 5800: TMPALGTYPE2STR(dh));
! 5801: return -1;
! 5802: }
! 5803: #undef TMPALGTYPE2STR
! 5804:
! 5805: /* set new sa */
! 5806: new = newisakmpsa();
! 5807: if (new == NULL) {
! 5808: yyerror("failed to allocate isakmp sa");
! 5809: return -1;
! 5810: }
! 5811: new->prop_no = prop_no;
! 5812: new->trns_no = trns_no++;
! 5813: new->lifetime = lifetime;
! 5814: new->lifebyte = lifebyte;
! 5815: new->enctype = types[algclass_isakmp_enc];
! 5816: new->encklen = encklen;
! 5817: new->authmethod = types[algclass_isakmp_ameth];
! 5818: new->hashtype = types[algclass_isakmp_hash];
! 5819: new->dh_group = types[algclass_isakmp_dh];
! 5820: new->vendorid = vendorid;
! 5821: #ifdef HAVE_GSSAPI
! 5822: if (new->authmethod == OAKLEY_ATTR_AUTH_METHOD_GSSAPI_KRB) {
! 5823: if (gssid != NULL) {
! 5824: if ((new->gssid = vmalloc(strlen(gssid))) == NULL) {
! 5825: racoon_free(new);
! 5826: yyerror("failed to allocate gssid");
! 5827: return -1;
! 5828: }
! 5829: memcpy(new->gssid->v, gssid, new->gssid->l);
! 5830: racoon_free(gssid);
! 5831: } else {
! 5832: /*
! 5833: * Allocate the default ID so that it gets put
! 5834: * into a GSS ID attribute during the Phase 1
! 5835: * exchange.
! 5836: */
! 5837: new->gssid = gssapi_get_default_gss_id();
! 5838: }
! 5839: }
! 5840: #endif
! 5841: insisakmpsa(new, rmconf);
! 5842:
! 5843: return trns_no;
! 5844: }
! 5845:
! 5846: #if 0
! 5847: /*
! 5848: * fix lifebyte.
! 5849: * Must be more than 1024B because its unit is kilobytes.
! 5850: * That is defined RFC2407.
! 5851: */
! 5852: static int
! 5853: fix_lifebyte(t)
! 5854: unsigned long t;
! 5855: {
! 5856: if (t < 1024) {
! 5857: yyerror("byte size should be more than 1024B.");
! 5858: return 0;
! 5859: }
! 5860:
! 5861: return(t / 1024);
! 5862: }
! 5863: #endif
! 5864:
! 5865: int
! 5866: cfparse()
! 5867: {
! 5868: int error;
! 5869:
! 5870: yyerrorcount = 0;
! 5871: yycf_init_buffer();
! 5872:
! 5873: if (yycf_switch_buffer(lcconf->racoon_conf) != 0) {
! 5874: plog(LLV_ERROR, LOCATION, NULL,
! 5875: "could not read configuration file \"%s\"\n",
! 5876: lcconf->racoon_conf);
! 5877: return -1;
! 5878: }
! 5879:
! 5880: error = yyparse();
! 5881: if (error != 0) {
! 5882: if (yyerrorcount) {
! 5883: plog(LLV_ERROR, LOCATION, NULL,
! 5884: "fatal parse failure (%d errors)\n",
! 5885: yyerrorcount);
! 5886: } else {
! 5887: plog(LLV_ERROR, LOCATION, NULL,
! 5888: "fatal parse failure.\n");
! 5889: }
! 5890: return -1;
! 5891: }
! 5892:
! 5893: if (error == 0 && yyerrorcount) {
! 5894: plog(LLV_ERROR, LOCATION, NULL,
! 5895: "parse error is nothing, but yyerrorcount is %d.\n",
! 5896: yyerrorcount);
! 5897: exit(1);
! 5898: }
! 5899:
! 5900: yycf_clean_buffer();
! 5901:
! 5902: plog(LLV_DEBUG2, LOCATION, NULL, "parse successed.\n");
! 5903:
! 5904: return 0;
! 5905: }
! 5906:
! 5907: int
! 5908: cfreparse()
! 5909: {
! 5910: flushph2();
! 5911: flushph1();
! 5912: flushrmconf();
! 5913: flushsainfo();
! 5914: clean_tmpalgtype();
! 5915: return(cfparse());
! 5916: }
! 5917:
! 5918: #ifdef ENABLE_ADMINPORT
! 5919: static void
! 5920: adminsock_conf(path, owner, group, mode_dec)
! 5921: vchar_t *path;
! 5922: vchar_t *owner;
! 5923: vchar_t *group;
! 5924: int mode_dec;
! 5925: {
! 5926: struct passwd *pw = NULL;
! 5927: struct group *gr = NULL;
! 5928: mode_t mode = 0;
! 5929: uid_t uid;
! 5930: gid_t gid;
! 5931: int isnum;
! 5932:
! 5933: adminsock_path = path->v;
! 5934:
! 5935: if (owner == NULL)
! 5936: return;
! 5937:
! 5938: errno = 0;
! 5939: uid = atoi(owner->v);
! 5940: isnum = !errno;
! 5941: if (((pw = getpwnam(owner->v)) == NULL) && !isnum)
! 5942: yyerror("User \"%s\" does not exist", owner->v);
! 5943:
! 5944: if (pw)
! 5945: adminsock_owner = pw->pw_uid;
! 5946: else
! 5947: adminsock_owner = uid;
! 5948:
! 5949: if (group == NULL)
! 5950: return;
! 5951:
! 5952: errno = 0;
! 5953: gid = atoi(group->v);
! 5954: isnum = !errno;
! 5955: if (((gr = getgrnam(group->v)) == NULL) && !isnum)
! 5956: yyerror("Group \"%s\" does not exist", group->v);
! 5957:
! 5958: if (gr)
! 5959: adminsock_group = gr->gr_gid;
! 5960: else
! 5961: adminsock_group = gid;
! 5962:
! 5963: if (mode_dec == -1)
! 5964: return;
! 5965:
! 5966: if (mode_dec > 777)
! 5967: yyerror("Mode 0%03o is invalid", mode_dec);
! 5968: if (mode_dec >= 400) { mode += 0400; mode_dec -= 400; }
! 5969: if (mode_dec >= 200) { mode += 0200; mode_dec -= 200; }
! 5970: if (mode_dec >= 100) { mode += 0200; mode_dec -= 100; }
! 5971:
! 5972: if (mode_dec > 77)
! 5973: yyerror("Mode 0%03o is invalid", mode_dec);
! 5974: if (mode_dec >= 40) { mode += 040; mode_dec -= 40; }
! 5975: if (mode_dec >= 20) { mode += 020; mode_dec -= 20; }
! 5976: if (mode_dec >= 10) { mode += 020; mode_dec -= 10; }
! 5977:
! 5978: if (mode_dec > 7)
! 5979: yyerror("Mode 0%03o is invalid", mode_dec);
! 5980: if (mode_dec >= 4) { mode += 04; mode_dec -= 4; }
! 5981: if (mode_dec >= 2) { mode += 02; mode_dec -= 2; }
! 5982: if (mode_dec >= 1) { mode += 02; mode_dec -= 1; }
! 5983:
! 5984: adminsock_mode = mode;
! 5985:
! 5986: return;
! 5987: }
! 5988: #endif
! 5989:
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>