summaryrefslogtreecommitdiffstats
path: root/contrib/bind/bin/named
diff options
context:
space:
mode:
authornectar <nectar@FreeBSD.org>2002-05-13 19:31:58 +0000
committernectar <nectar@FreeBSD.org>2002-05-13 19:31:58 +0000
commite044c1fb924b46fc1bd38b298ebea9ff73ea93a8 (patch)
treead4e7f0a2c657d90248bf0c8bd8fac9e5f66a622 /contrib/bind/bin/named
parentebeabb1ba32f14e308ae9aff9a2a7151265259cf (diff)
downloadFreeBSD-src-e044c1fb924b46fc1bd38b298ebea9ff73ea93a8.zip
FreeBSD-src-e044c1fb924b46fc1bd38b298ebea9ff73ea93a8.tar.gz
Import of ISC BIND 8.3.2-T1B.
Diffstat (limited to 'contrib/bind/bin/named')
-rw-r--r--contrib/bind/bin/named/named.conf4
-rw-r--r--contrib/bind/bin/named/named.h3
-rw-r--r--contrib/bind/bin/named/ns_config.c17
-rw-r--r--contrib/bind/bin/named/ns_defs.h20
-rw-r--r--contrib/bind/bin/named/ns_forw.c20
-rw-r--r--contrib/bind/bin/named/ns_func.h5
-rw-r--r--contrib/bind/bin/named/ns_lexer.c8
-rw-r--r--contrib/bind/bin/named/ns_main.c77
-rw-r--r--contrib/bind/bin/named/ns_maint.c28
-rw-r--r--contrib/bind/bin/named/ns_notify.c61
-rw-r--r--contrib/bind/bin/named/ns_parser.c2305
-rw-r--r--contrib/bind/bin/named/ns_parser.h231
-rw-r--r--contrib/bind/bin/named/ns_parser.y23
-rw-r--r--contrib/bind/bin/named/ns_req.c95
-rw-r--r--contrib/bind/bin/named/ns_resp.c19
-rw-r--r--contrib/bind/bin/named/ns_xfr.c15
16 files changed, 1588 insertions, 1343 deletions
diff --git a/contrib/bind/bin/named/named.conf b/contrib/bind/bin/named/named.conf
index 08ef27d..d0d2996 100644
--- a/contrib/bind/bin/named/named.conf
+++ b/contrib/bind/bin/named/named.conf
@@ -52,6 +52,8 @@ options {
// notify on a zone-by-zone
// basis in the "zone" statement
// see (below)
+ // notify explicit; // only sent the notifies to the
+ // also-notify list
serial-queries 4; // number of parallel SOA queries
// we can have outstanding for master
// zone change testing purposes
@@ -193,6 +195,8 @@ zone "master.demo.zone" {
// zone? The global option is used
// if "notify" is not specified
// here.
+ // notify explicit; // only sent the notifies to the
+ // also-notify list
also-notify { }; // don't notify any nameservers other
// than those on the NS list for this
// zone
diff --git a/contrib/bind/bin/named/named.h b/contrib/bind/bin/named/named.h
index 023767c..a9d6088 100644
--- a/contrib/bind/bin/named/named.h
+++ b/contrib/bind/bin/named/named.h
@@ -16,10 +16,11 @@
*/
/*
- * $Id: named.h,v 8.31 2002/02/01 00:05:38 marka Exp $
+ * $Id: named.h,v 8.32 2002/03/15 00:58:16 vixie Exp $
*/
/* Options. Change them at your peril. */
+#undef NXDOMAIN_ON_DENIAL
#define DEBUG
#define ADDAUTH
#define STUBS
diff --git a/contrib/bind/bin/named/ns_config.c b/contrib/bind/bin/named/ns_config.c
index 2d59a62..1680d91 100644
--- a/contrib/bind/bin/named/ns_config.c
+++ b/contrib/bind/bin/named/ns_config.c
@@ -1,5 +1,5 @@
#if !defined(lint) && !defined(SABER)
-static const char rcsid[] = "$Id: ns_config.c,v 8.133 2002/02/01 00:05:39 marka Exp $";
+static const char rcsid[] = "$Id: ns_config.c,v 8.134 2002/04/25 05:27:04 marka Exp $";
#endif /* not lint */
/*
@@ -317,7 +317,7 @@ validate_zone(struct zoneinfo *zp) {
#ifdef BIND_NOTIFY
/* Check notify */
- if (zp->z_notify != znotify_use_default) {
+ if (zp->z_notify != notify_use_default) {
if (zp->z_type != z_master && zp->z_type != z_slave) {
ns_error(ns_log_config,
"'notify' given for non-master, non-slave zone '%s'",
@@ -872,7 +872,7 @@ set_zone_dialup(zone_config zh, int value) {
if (value) {
zp->z_dialup = zdialup_yes;
#ifdef BIND_NOTIFY
- zp->z_notify = znotify_yes;
+ zp->z_notify = notify_yes;
#endif
} else
zp->z_dialup = zdialup_no;
@@ -881,17 +881,14 @@ set_zone_dialup(zone_config zh, int value) {
}
int
-set_zone_notify(zone_config zh, int value) {
+set_zone_notify(zone_config zh, enum notify value) {
#ifdef BIND_NOTIFY
struct zoneinfo *zp;
zp = zh.opaque;
INSIST(zp != NULL);
- if (value)
- zp->z_notify = znotify_yes;
- else
- zp->z_notify = znotify_no;
+ zp->z_notify = value;
#endif
return (1);
}
@@ -1150,6 +1147,9 @@ new_options() {
op->max_log_size_ixfr = 0;
op->minroots = MINROOTS;
op->preferred_glue = 0;
+#ifdef BIND_NOTIFY
+ op->notify = notify_yes;
+#endif
return (op);
}
@@ -1210,7 +1210,6 @@ set_boolean_option(u_int *op_flags, int bool_opt, int value) {
case OPTION_NOFETCHGLUE:
case OPTION_FORWARD_ONLY:
case OPTION_FAKE_IQUERY:
- case OPTION_NONOTIFY:
case OPTION_SUPNOTIFY_INITIAL:
case OPTION_NONAUTH_NXDOMAIN:
case OPTION_MULTIPLE_CNAMES:
diff --git a/contrib/bind/bin/named/ns_defs.h b/contrib/bind/bin/named/ns_defs.h
index 86a81b6..3474550 100644
--- a/contrib/bind/bin/named/ns_defs.h
+++ b/contrib/bind/bin/named/ns_defs.h
@@ -1,6 +1,6 @@
/*
* from ns.h 4.33 (Berkeley) 8/23/90
- * $Id: ns_defs.h,v 8.115 2002/01/29 03:59:35 marka Exp $
+ * $Id: ns_defs.h,v 8.118 2002/04/25 05:27:06 marka Exp $
*/
/*
@@ -170,10 +170,11 @@ typedef enum need {
main_need_qrylog, /* toggle_qrylog() needed. */
main_need_debug, /* use_desired_debug() needed. */
main_need_restart, /* exec() needed. */
- main_need_reap, /* need to reap dead children */
- main_need_noexpired, /* ns_reconfig() needed w/ noexpired set */
+ main_need_reap, /* need to reap dead children. */
+ main_need_noexpired, /* ns_reconfig() needed w/ noexpired set. */
main_need_num, /* number of needs, used for array bound. */
- main_need_tick /* tick every second to poll for cleanup (NT)*/
+ main_need_tick, /* tick every second to poll for cleanup (NT) */
+ main_need_tryxfer /* attemt to start a zone transfer. */
} main_need;
/* What global options are set? */
@@ -182,7 +183,7 @@ typedef enum need {
#define OPTION_FORWARD_ONLY 0x00000004 /* Don't use NS RR's, just forward. */
#define OPTION_FAKE_IQUERY 0x00000008 /* Fake up bogus response to IQUERY. */
#ifdef BIND_NOTIFY
-#define OPTION_NONOTIFY 0x00000010 /* Turn off notify */
+/* #define OPTION_NONOTIFY 0x00000010 */ /* Turn off notify */
#define OPTION_SUPNOTIFY_INITIAL 0x00000020 /* Supress initial notify */
#endif
#define OPTION_NONAUTH_NXDOMAIN 0x00000040 /* Generate non-auth NXDOMAINs? */
@@ -272,7 +273,7 @@ typedef enum need {
enum severity { ignore, warn, fail, not_set };
#ifdef BIND_NOTIFY
-enum znotify { znotify_use_default=0, znotify_yes, znotify_no };
+enum notify { notify_use_default=0, notify_yes, notify_no, notify_explicit };
#endif
enum zdialup { zdialup_use_default=0, zdialup_yes, zdialup_no };
@@ -368,7 +369,7 @@ struct zoneinfo {
from us */
long z_max_transfer_time_in; /* max num seconds for AXFR */
#ifdef BIND_NOTIFY
- enum znotify z_notify; /* Notify mode */
+ enum notify z_notify; /* Notify mode */
struct in_addr *z_also_notify; /* More nameservers to notify */
int z_notify_count;
#endif
@@ -496,7 +497,7 @@ struct qinfo {
u_int16_t q_class; /* class of query */
u_int16_t q_type; /* type of query */
#ifdef BIND_NOTIFY
- int q_notifyzone; /* zone which needs another znotify()
+ int q_notifyzone; /* zone which needs another notify()
* when the reply to this comes in.
*/
#endif
@@ -610,6 +611,8 @@ struct qstream {
ns_tcp_tsig_state *tsig_state; /* used by ns_sign_tcp */
int tsig_skip; /* skip calling ns_sign_tcp
* during the next flush */
+ int tsig_size; /* need to reserve this space
+ * for the tsig. */
struct qs_x_lev { /* decompose the recursion. */
enum {sxl_ns, sxl_all, sxl_sub}
state; /* what's this level doing? */
@@ -790,6 +793,7 @@ typedef struct options {
u_int lame_ttl;
int minroots;
u_int16_t preferred_glue;
+ enum notify notify;
} *options;
typedef struct key_list_element {
diff --git a/contrib/bind/bin/named/ns_forw.c b/contrib/bind/bin/named/ns_forw.c
index f62ba20..494a96a 100644
--- a/contrib/bind/bin/named/ns_forw.c
+++ b/contrib/bind/bin/named/ns_forw.c
@@ -1,6 +1,6 @@
#if !defined(lint) && !defined(SABER)
static const char sccsid[] = "@(#)ns_forw.c 4.32 (Berkeley) 3/3/91";
-static const char rcsid[] = "$Id: ns_forw.c,v 8.89 2002/01/29 03:59:36 marka Exp $";
+static const char rcsid[] = "$Id: ns_forw.c,v 8.90 2002/02/22 05:12:35 marka Exp $";
#endif /* not lint */
/*
@@ -467,6 +467,7 @@ nslookup(struct databuf *nsp[], struct qinfo *qp,
const char *fname;
int oldn, naddr, class, found_arr, potential_ns, lame_ns;
time_t curtime;
+ int found_auth6;
ns_debug(ns_log_default, 3, "nslookup(nsp=%p, qp=%p, \"%s\", d=%d)",
nsp, qp, syslogdname, qp->q_distance);
@@ -503,19 +504,17 @@ nslookup(struct databuf *nsp[], struct qinfo *qp,
}
}
+ found_arr = 0;
+ found_auth6 = 0;
tmphtp = ((nsdp->d_flags & DB_F_HINT) ?fcachetab :hashtab);
np = nlookup(dname, &tmphtp, &fname, 0);
if (np == NULL) {
ns_debug(ns_log_default, 3, "%s: not found %s %p",
dname, fname, np);
- found_arr = 0;
goto need_sysquery;
}
- if (fname != dname) {
- found_arr = 0;
+ if (fname != dname)
goto need_sysquery;
- }
- found_arr = 0;
oldn = n;
/* look for name server addresses */
@@ -534,6 +533,13 @@ nslookup(struct databuf *nsp[], struct qinfo *qp,
}
if (dp->d_rcode == NXDOMAIN && dp->d_class == class)
goto skipserver;
+ if (dp->d_class == class &&
+ (dp->d_type == T_AAAA || dp->d_type == ns_t_a6) &&
+ (zones[dp->d_zone].z_type == z_master ||
+ zones[dp->d_zone].z_type == z_slave)) {
+ found_auth6++;
+ continue;
+ }
if (dp->d_type != T_A || dp->d_class != class)
continue;
if (dp->d_rcode) {
@@ -683,7 +689,7 @@ nslookup(struct databuf *nsp[], struct qinfo *qp,
}
ns_debug(ns_log_default, 8, "nslookup: %d ns addrs", n);
need_sysquery:
- if (found_arr == 0) {
+ if (found_arr == 0 && found_auth6 == 0) {
potential_ns++;
if (qp->q_distance < NS_MAX_DISTANCE)
(void) sysquery(dname, class, T_A, NULL, NULL,
diff --git a/contrib/bind/bin/named/ns_func.h b/contrib/bind/bin/named/ns_func.h
index 501aa01..e035d93 100644
--- a/contrib/bind/bin/named/ns_func.h
+++ b/contrib/bind/bin/named/ns_func.h
@@ -90,7 +90,7 @@
/* ns_func.h - declarations for ns_*.c's externally visible functions
*
- * $Id: ns_func.h,v 8.115 2002/01/29 03:59:38 marka Exp $
+ * $Id: ns_func.h,v 8.117 2002/04/25 05:27:07 marka Exp $
*/
/* ++from ns_glue.c++ */
@@ -313,6 +313,7 @@ void qserial_answer(struct qinfo *);
void printzoneinfo(int, int, int);
#endif
void endxfer(void);
+void tryxfer(void);
void addxfer(struct zoneinfo *);
void ns_zreload(void);
void ns_reload(void);
@@ -421,7 +422,7 @@ int set_zone_type(zone_config, int);
int set_zone_filename(zone_config, char *);
int set_zone_checknames(zone_config, enum severity);
#ifdef BIND_NOTIFY
-int set_zone_notify(zone_config, int value);
+int set_zone_notify(zone_config, enum notify value);
#endif
int set_zone_maintain_ixfr_base(zone_config, int value);
int set_zone_update_acl(zone_config, ip_match_list);
diff --git a/contrib/bind/bin/named/ns_lexer.c b/contrib/bind/bin/named/ns_lexer.c
index 4a6f820..b10219a 100644
--- a/contrib/bind/bin/named/ns_lexer.c
+++ b/contrib/bind/bin/named/ns_lexer.c
@@ -1,5 +1,5 @@
#if !defined(lint) && !defined(SABER)
-static const char rcsid[] = "$Id: ns_lexer.c,v 8.28 2001/12/28 04:07:47 marka Exp $";
+static const char rcsid[] = "$Id: ns_lexer.c,v 8.30 2002/04/25 05:27:08 marka Exp $";
#endif /* not lint */
/*
@@ -57,7 +57,7 @@ typedef enum lexer_state {
#define LEXER_MAX_PUSHBACK 2
typedef struct lexer_file_context {
- const char * name;
+ char * name;
FILE * stream;
int line_number;
LexerState state;
@@ -251,6 +251,7 @@ static struct keyword keywords[] = {
{"directory", T_DIRECTORY},
{"dump-file", T_DUMP_FILE},
{"dynamic", T_DYNAMIC},
+ {"explicit", T_EXPLICIT},
{"fail", T_FAIL},
{"fake-iquery", T_FAKE_IQUERY},
{"false", T_FALSE},
@@ -400,7 +401,7 @@ lexer_begin_file(const char *filename, FILE *stream) {
panic("memget failed in lexer_begin_file", NULL);
INSIST(stream != NULL);
lf->stream = stream;
- lf->name = filename; /* note copy by reference */
+ lf->name = savestr(filename, 1);
lf->line_number = 1;
lf->state = scan;
lf->flags = 0;
@@ -419,6 +420,7 @@ lexer_end_file(void) {
lf = current_file;
current_file = lf->next;
fclose(lf->stream);
+ freestr(lf->name);
memput(lf, sizeof *lf);
}
diff --git a/contrib/bind/bin/named/ns_main.c b/contrib/bind/bin/named/ns_main.c
index 23cf249..d839387 100644
--- a/contrib/bind/bin/named/ns_main.c
+++ b/contrib/bind/bin/named/ns_main.c
@@ -1,6 +1,6 @@
#if !defined(lint) && !defined(SABER)
static const char sccsid[] = "@(#)ns_main.c 4.55 (Berkeley) 7/1/91";
-static const char rcsid[] = "$Id: ns_main.c,v 8.155 2001/11/16 05:37:27 marka Exp $";
+static const char rcsid[] = "$Id: ns_main.c,v 8.157 2002/04/13 23:26:16 marka Exp $";
#endif /* not lint */
/*
@@ -570,18 +570,46 @@ main(int argc, char *argv[]) {
}
static int
+sq_closeone(void) {
+ struct qstream *sp, *nextsp;
+ struct qstream *candidate = NULL;
+ time_t lasttime, maxctime = 0;
+ int result = 0;
+
+ gettime(&tt);
+
+ for (sp = streamq; sp; sp = nextsp) {
+ nextsp = sp->s_next;
+ if (sp->s_refcnt)
+ continue;
+ lasttime = tt.tv_sec - sp->s_time;
+ if (lasttime >= VQEXPIRY) {
+ sq_remove(sp);
+ result = 1;
+ } else if (lasttime > maxctime) {
+ candidate = sp;
+ maxctime = lasttime;
+ }
+ }
+ if (candidate) {
+ sq_remove(candidate);
+ result = 1;
+ }
+ return (result);
+}
+
+static int
ns_socket(int domain, int type, int protocol) {
- int fd;
+ int fd, tmp;
+ again:
fd = socket(domain, type, protocol);
- if (fd == -1)
- return (-1);
#ifdef F_DUPFD /* XXX */
/*
* Leave a space for stdio to work in.
*/
if (fd >= 0 && fd <= 20) {
- int new, tmp;
+ int new;
if ((new = fcntl(fd, F_DUPFD, 20)) == -1)
ns_notice(ns_log_default, "fcntl(fd, F_DUPFD, 20): %s",
strerror(errno));
@@ -591,6 +619,11 @@ ns_socket(int domain, int type, int protocol) {
fd = new;
}
#endif
+ tmp = errno;
+ if (errno == EMFILE)
+ if (sq_closeone())
+ goto again;
+ errno = tmp;
return (fd);
}
@@ -680,25 +713,7 @@ stream_accept(evContext lev, void *uap, int rfd,
* eventlib which will call us right back.
*/
if (streamq) {
- struct qstream *nextsp;
- struct qstream *candidate = NULL;
- time_t lasttime, maxctime = 0;
-
- for (sp = streamq; sp; sp = nextsp) {
- nextsp = sp->s_next;
- if (sp->s_refcnt)
- continue;
- gettime(&tt);
- lasttime = tt.tv_sec - sp->s_time;
- if (lasttime >= VQEXPIRY)
- sq_remove(sp);
- else if (lasttime > maxctime) {
- candidate = sp;
- maxctime = lasttime;
- }
- }
- if (candidate)
- sq_remove(candidate);
+ (void)sq_closeone();
return;
}
/* fall through */
@@ -808,19 +823,20 @@ tcp_send(struct qinfo *qp) {
struct qstream *sp;
struct sockaddr_in src;
int on = 1, n;
+ int fd;
ns_debug(ns_log_default, 1, "tcp_send");
- if ((sp = sq_add()) == NULL) {
+ if ((fd = ns_socket(AF_INET, SOCK_STREAM, PF_UNSPEC)) == -1)
return (SERVFAIL);
- }
- if ((sp->s_rfd = ns_socket(AF_INET, SOCK_STREAM, PF_UNSPEC)) == -1) {
- sq_remove(sp);
+ if (fd > evHighestFD(ev)) {
+ close(fd);
return (SERVFAIL);
}
- if (sp->s_rfd > evHighestFD(ev)) {
- sq_remove(sp);
+ if ((sp = sq_add()) == NULL) {
+ close(fd);
return (SERVFAIL);
}
+ sp->s_rfd = fd;
if (setsockopt(sp->s_rfd, SOL_SOCKET, SO_REUSEADDR,
(char*)&on, sizeof(on)) < 0)
ns_info(ns_log_default,
@@ -2837,6 +2853,7 @@ init_needs(void) {
handlers[main_need_restart] = ns_restart;
handlers[main_need_reap] = reapchild;
handlers[main_need_noexpired] = ns_noexpired;
+ handlers[main_need_tryxfer] = tryxfer;
}
static void
diff --git a/contrib/bind/bin/named/ns_maint.c b/contrib/bind/bin/named/ns_maint.c
index 0408936..82df685 100644
--- a/contrib/bind/bin/named/ns_maint.c
+++ b/contrib/bind/bin/named/ns_maint.c
@@ -1,6 +1,6 @@
#if !defined(lint) && !defined(SABER)
static const char sccsid[] = "@(#)ns_maint.c 4.39 (Berkeley) 3/2/91";
-static const char rcsid[] = "$Id: ns_maint.c,v 8.131 2001/11/12 04:49:32 marka Exp $";
+static const char rcsid[] = "$Id: ns_maint.c,v 8.135 2002/04/25 05:27:10 marka Exp $";
#endif /* not lint */
/*
@@ -132,7 +132,6 @@ static int nxfers(struct zoneinfo *),
static void startxfer(struct zoneinfo *),
abortxfer(struct zoneinfo *),
- tryxfer(void),
purge_z_2(struct hashbuf *, int);
static int purge_nonglue_2(const char *, struct hashbuf *,
int, int, int);
@@ -453,9 +452,10 @@ ns_heartbeat(evContext ctx, void *uap, struct timespec due,
* Trigger a refresh query while the link is up by
* sending a notify.
*/
- if (((zp->z_notify == znotify_yes) ||
- ((zp->z_notify == znotify_use_default) &&
- !NS_OPTION_P(OPTION_NONOTIFY))) &&
+ if (((zp->z_notify == notify_yes) ||
+ (zp->z_notify == notify_explicit) ||
+ ((zp->z_notify == notify_use_default) &&
+ server_options->notify != notify_no)) &&
(zt == z_master || zt == z_slave) && !loading &&
((zp->z_flags & Z_AUTH) != 0))
ns_notify(zp->z_origin, zp->z_class, ns_t_soa);
@@ -1199,6 +1199,22 @@ remove_zone(struct zoneinfo *zp, const char *verb) {
xfers_deferred--;
}
ns_stopxfrs(zp);
+ if ((zp->z_flags & Z_XFER_RUNNING) != 0) {
+ int i;
+ /* Kill and abandon the current transfer. */
+ for (i = 0; i < MAX_XFERS_RUNNING; i++) {
+ if (xferstatus[i].xfer_pid == zp->z_xferpid) {
+ xferstatus[i].xfer_pid = 0;
+ xferstatus[i].xfer_state = XFER_IDLE;
+ xfers_running--;
+ break;
+ }
+ }
+ (void)kill(zp->z_xferpid, SIGTERM);
+ zp->z_flags &= ~(Z_XFER_RUNNING|Z_XFER_ABORTED|Z_XFER_GONE);
+ zp->z_xferpid = 0;
+ ns_need(main_need_tryxfer);
+ }
do_reload(zp->z_origin, zp->z_type, zp->z_class, 1);
ns_notice(ns_log_config, "%s zone \"%s\" (%s) %s",
zoneTypeString(zp->z_type), zp->z_origin,
@@ -1692,7 +1708,7 @@ endxfer() {
/*
* Try to start some xfers - new "fair scheduler" by Bob Halley @DEC (1995)
*/
-static void
+void
tryxfer() {
static struct zoneinfo *zp = NULL;
static struct zoneinfo *lastzones = NULL;
diff --git a/contrib/bind/bin/named/ns_notify.c b/contrib/bind/bin/named/ns_notify.c
index cde636a..286b3eb 100644
--- a/contrib/bind/bin/named/ns_notify.c
+++ b/contrib/bind/bin/named/ns_notify.c
@@ -1,5 +1,5 @@
#if !defined(lint) && !defined(SABER)
-static const char rcsid[] = "$Id: ns_notify.c,v 8.18 2001/11/12 04:49:33 marka Exp $";
+static const char rcsid[] = "$Id: ns_notify.c,v 8.20 2002/04/25 05:27:12 marka Exp $";
#endif /* not lint */
/*
@@ -56,12 +56,12 @@ static const char rcsid[] = "$Id: ns_notify.c,v 8.18 2001/11/12 04:49:33 marka E
/* Types. */
-struct notify {
+struct pnotify {
char * name;
ns_class class;
ns_type type;
evTimerID timer;
- LINK(struct notify) link;
+ LINK(struct pnotify) link;
};
/* Forward. */
@@ -71,14 +71,14 @@ static void sysnotify_slaves(const char *, const char *,
ns_class, ns_type, int, int *, int *);
static void sysnotify_ns(const char *, const char *,
ns_class, ns_type, int, int *, int *);
-static void free_notify(struct notify *);
+static void free_notify(struct pnotify *);
static void notify_timer(evContext, void *,
struct timespec, struct timespec);
/* Local. */
-static LIST(struct notify) pending_notifies;
-static LIST(struct notify) loading_notifies;
+static LIST(struct pnotify) pending_notifies;
+static LIST(struct pnotify) loading_notifies;
/* Public. */
@@ -91,7 +91,7 @@ ns_notify(const char *dname, ns_class class, ns_type type) {
static const char no_room[] = "%s failed, cannot notify for zone %s";
int delay, max_delay;
struct zoneinfo *zp;
- struct notify *ni;
+ struct pnotify *ni;
zp = find_auth_zone(dname, class);
if (zp == NULL) {
@@ -162,7 +162,7 @@ ns_notify(const char *dname, ns_class class, ns_type type) {
void
notify_afterload() {
- struct notify *ni;
+ struct pnotify *ni;
INSIST(loading == 0);
while ((ni = HEAD(loading_notifies)) != NULL) {
@@ -180,7 +180,7 @@ notify_afterload() {
void
ns_unnotify(void) {
while (!EMPTY(pending_notifies)) {
- struct notify *ni = HEAD(pending_notifies);
+ struct pnotify *ni = HEAD(pending_notifies);
INSIST(LINKED(ni, link));
UNLINK(pending_notifies, ni, link);
@@ -194,7 +194,7 @@ ns_unnotify(void) {
*/
void
ns_stopnotify(const char *dname, ns_class class) {
- struct notify *ni;
+ struct pnotify *ni;
ni = HEAD(pending_notifies);
while (ni != NULL &&
@@ -235,9 +235,9 @@ sysnotify(const char *dname, ns_class class, ns_type type) {
dname);
return;
}
- if (zp->z_notify == znotify_no ||
- (zp->z_notify == znotify_use_default &&
- NS_OPTION_P(OPTION_NONOTIFY)))
+ if (zp->z_notify == notify_no ||
+ (zp->z_notify == notify_use_default &&
+ server_options->notify == notify_no))
return;
if (zp->z_type != z_master && zp->z_type != z_slave) {
ns_warning(ns_log_notify, "sysnotify: %s not master or slave",
@@ -247,7 +247,11 @@ sysnotify(const char *dname, ns_class class, ns_type type) {
zname = zp->z_origin;
zserial = zp->z_serial;
nns = na = 0;
- sysnotify_slaves(dname, zname, class, type, zp - zones, &nns, &na);
+ if (zp->z_notify == notify_yes ||
+ (zp->z_notify == notify_use_default &&
+ server_options->notify == notify_yes))
+ sysnotify_slaves(dname, zname, class, type,
+ zp - zones, &nns, &na);
/*
* Handle any global or zone-specific also-notify clauses
@@ -351,18 +355,26 @@ sysnotify_ns(const char *dname, const char *aname,
const char *fname;
struct in_addr nss[NSMAX];
struct hashbuf *htp;
- int is_us, nsc;
+ int is_us, nsc, auth6, neg;
int cname = 0;
htp = hashtab;
anp = nlookup(aname, &htp, &fname, 0);
nsc = 0;
is_us = 0;
+ auth6 = 0;
+ neg = 0;
if (anp != NULL)
for (adp = anp->n_data; adp; adp = adp->d_next) {
struct in_addr ina;
- if (match(adp, class, T_CNAME)) {
+ if (adp->d_class != class)
+ continue;
+ if (adp->d_rcode == NXDOMAIN) {
+ neg = 1;
+ break;
+ }
+ if (adp->d_type == T_CNAME && adp->d_rcode == 0) {
cname = 1;
ns_error(ns_log_notify,
"NS '%s' for '%s/%s' is a CNAME",
@@ -371,8 +383,18 @@ sysnotify_ns(const char *dname, const char *aname,
p_class(class));
break;
}
+ if ((adp->d_type == T_AAAA || adp->d_type == ns_t_a6) &&
+ (zones[adp->d_class].z_type == z_master ||
+ zones[adp->d_class].z_type == z_slave)) {
+ auth6 = 1;
+ continue;
+ }
if (!match(adp, class, T_A))
continue;
+ if (adp->d_rcode) {
+ neg = 1;
+ continue;
+ }
if (adp->d_type == ns_t_sig)
continue;
ina = ina_get(adp->d_data);
@@ -384,7 +406,8 @@ sysnotify_ns(const char *dname, const char *aname,
nss[nsc++] = ina;
} /*next A*/
if (nsc == 0) {
- if (!is_us && !cname && !NS_OPTION_P(OPTION_NOFETCHGLUE)) {
+ if (!is_us && !cname && !auth6 && !neg &&
+ !NS_OPTION_P(OPTION_NOFETCHGLUE)) {
struct qinfo *qp;
qp = sysquery(aname, class, ns_t_a, NULL, NULL, 0,
@@ -400,7 +423,7 @@ sysnotify_ns(const char *dname, const char *aname,
}
static void
-free_notify(struct notify *ni) {
+free_notify(struct pnotify *ni) {
struct zoneinfo *zp;
INSIST(!LINKED(ni, link));
@@ -422,7 +445,7 @@ notify_timer(evContext ctx, void *uap,
struct timespec due,
struct timespec inter)
{
- struct notify *ni = uap;
+ struct pnotify *ni = uap;
UNUSED(ctx);
UNUSED(due);
diff --git a/contrib/bind/bin/named/ns_parser.c b/contrib/bind/bin/named/ns_parser.c
index 03d0a84..28f5f70 100644
--- a/contrib/bind/bin/named/ns_parser.c
+++ b/contrib/bind/bin/named/ns_parser.c
@@ -1,23 +1,30 @@
#ifndef lint
-static char yysccsid[] = "@(#)yaccpar 1.9 (Berkeley) 02/21/93 (BSDI)";
+static char const yysccsid[] = "@(#)yaccpar 1.9 (Berkeley) 02/21/93";
#endif
#include <stdlib.h>
#define YYBYACC 1
#define YYMAJOR 1
#define YYMINOR 9
-#define YYEMPTY (-1)
#define YYLEX yylex()
-#define yyclearin (yychar=YYEMPTY)
+#define YYEMPTY -1
+#define yyclearin (yychar=(YYEMPTY))
#define yyerrok (yyerrflag=0)
#define YYRECOVERING (yyerrflag!=0)
+#if defined(c_plusplus) || defined(__cplusplus)
+#include <stdlib.h>
+#else
+extern char *getenv();
+extern void *realloc();
+#endif
+static int yygrowstack();
#define YYPREFIX "yy"
#line 2 "ns_parser.y"
#if !defined(lint) && !defined(SABER)
-static char rcsid[] = "$Id: ns_parser.y,v 8.51 1999/11/12 05:29:18 vixie Exp $";
+static char rcsid[] = "$Id: ns_parser.y,v 8.79 2002/04/25 05:27:13 marka Exp $";
#endif /* not lint */
/*
- * Copyright (c) 1996-1999 by Internet Software Consortium.
+ * Copyright (c) 1996-2000 by Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -38,6 +45,7 @@ static char rcsid[] = "$Id: ns_parser.y,v 8.51 1999/11/12 05:29:18 vixie Exp $";
#include "port_before.h"
#include <sys/types.h>
+#include <sys/stat.h>
#include <sys/socket.h>
#include <sys/un.h>
@@ -77,16 +85,17 @@ static symbol_table symtab;
#define AUTH_TABLE_SIZE 397 /* should always be prime */
static symbol_table authtab = NULL;
+static symbol_table channeltab = NULL;
static zone_config current_zone;
static int should_install;
static options current_options;
static int seen_options;
+static int logged_options_error;
static controls current_controls;
-static topology_config current_topology;
static int seen_topology;
static server_config current_server;
@@ -106,12 +115,12 @@ static int chan_versions;
static u_long chan_max_size;
static log_channel lookup_channel(char *);
-static void define_channel(char *, log_channel);
+static void define_channel(const char *, log_channel);
static char *canonical_name(char *);
int yyparse();
-#line 103 "ns_parser.y"
+#line 105 "ns_parser.y"
typedef union {
char * cp;
int s_int;
@@ -126,7 +135,7 @@ typedef union {
struct dst_key * keyi;
enum axfr_format axfr_fmt;
} YYSTYPE;
-#line 130 "y.tab.c"
+#line 139 "y.tab.c"
#define L_EOS 257
#define L_IPADDR 258
#define L_NUMBER 259
@@ -144,320 +153,338 @@ typedef union {
#define T_FAKE_IQUERY 271
#define T_RECURSION 272
#define T_FETCH_GLUE 273
-#define T_QUERY_SOURCE 274
-#define T_LISTEN_ON 275
-#define T_PORT 276
-#define T_ADDRESS 277
-#define T_RRSET_ORDER 278
-#define T_ORDER 279
-#define T_NAME 280
-#define T_CLASS 281
-#define T_CONTROLS 282
-#define T_INET 283
-#define T_UNIX 284
-#define T_PERM 285
-#define T_OWNER 286
-#define T_GROUP 287
-#define T_ALLOW 288
-#define T_DATASIZE 289
-#define T_STACKSIZE 290
-#define T_CORESIZE 291
-#define T_DEFAULT 292
-#define T_UNLIMITED 293
-#define T_FILES 294
-#define T_VERSION 295
-#define T_HOSTSTATS 296
-#define T_DEALLOC_ON_EXIT 297
-#define T_TRANSFERS_IN 298
-#define T_TRANSFERS_OUT 299
-#define T_TRANSFERS_PER_NS 300
-#define T_TRANSFER_FORMAT 301
-#define T_MAX_TRANSFER_TIME_IN 302
-#define T_SERIAL_QUERIES 303
-#define T_ONE_ANSWER 304
-#define T_MANY_ANSWERS 305
-#define T_NOTIFY 306
-#define T_AUTH_NXDOMAIN 307
-#define T_MULTIPLE_CNAMES 308
-#define T_USE_IXFR 309
-#define T_MAINTAIN_IXFR_BASE 310
-#define T_CLEAN_INTERVAL 311
-#define T_INTERFACE_INTERVAL 312
-#define T_STATS_INTERVAL 313
-#define T_MAX_LOG_SIZE_IXFR 314
-#define T_HEARTBEAT 315
-#define T_USE_ID_POOL 316
-#define T_MAX_NCACHE_TTL 317
-#define T_HAS_OLD_CLIENTS 318
-#define T_RFC2308_TYPE1 319
-#define T_LAME_TTL 320
-#define T_MIN_ROOTS 321
-#define T_TREAT_CR_AS_SPACE 322
-#define T_LOGGING 323
-#define T_CATEGORY 324
-#define T_CHANNEL 325
-#define T_SEVERITY 326
-#define T_DYNAMIC 327
-#define T_FILE 328
-#define T_VERSIONS 329
-#define T_SIZE 330
-#define T_SYSLOG 331
-#define T_DEBUG 332
-#define T_NULL_OUTPUT 333
-#define T_PRINT_TIME 334
-#define T_PRINT_CATEGORY 335
-#define T_PRINT_SEVERITY 336
-#define T_SORTLIST 337
-#define T_TOPOLOGY 338
-#define T_SERVER 339
-#define T_LONG_AXFR 340
-#define T_BOGUS 341
-#define T_TRANSFERS 342
-#define T_KEYS 343
-#define T_SUPPORT_IXFR 344
-#define T_ZONE 345
-#define T_IN 346
-#define T_CHAOS 347
-#define T_HESIOD 348
-#define T_TYPE 349
-#define T_MASTER 350
-#define T_SLAVE 351
-#define T_STUB 352
-#define T_RESPONSE 353
-#define T_HINT 354
-#define T_MASTERS 355
-#define T_TRANSFER_SOURCE 356
-#define T_PUBKEY 357
-#define T_ALSO_NOTIFY 358
-#define T_DIALUP 359
-#define T_FILE_IXFR 360
-#define T_IXFR_TMP 361
-#define T_TRUSTED_KEYS 362
-#define T_ACL 363
-#define T_ALLOW_UPDATE 364
-#define T_ALLOW_QUERY 365
-#define T_ALLOW_TRANSFER 366
-#define T_ALLOW_RECURSION 367
-#define T_BLACKHOLE 368
-#define T_SEC_KEY 369
-#define T_ALGID 370
-#define T_SECRET 371
-#define T_CHECK_NAMES 372
-#define T_WARN 373
-#define T_FAIL 374
-#define T_IGNORE 375
-#define T_FORWARD 376
-#define T_FORWARDERS 377
-#define T_ONLY 378
-#define T_FIRST 379
-#define T_IF_NO_ANSWER 380
-#define T_IF_NO_DOMAIN 381
-#define T_YES 382
-#define T_TRUE 383
-#define T_NO 384
-#define T_FALSE 385
+#define T_HITCOUNT 274
+#define T_PREFERRED_GLUE 275
+#define T_QUERY_SOURCE 276
+#define T_LISTEN_ON 277
+#define T_PORT 278
+#define T_ADDRESS 279
+#define T_RRSET_ORDER 280
+#define T_ORDER 281
+#define T_NAME 282
+#define T_CLASS 283
+#define T_CONTROLS 284
+#define T_INET 285
+#define T_UNIX 286
+#define T_PERM 287
+#define T_OWNER 288
+#define T_GROUP 289
+#define T_ALLOW 290
+#define T_DATASIZE 291
+#define T_STACKSIZE 292
+#define T_CORESIZE 293
+#define T_DEFAULT 294
+#define T_UNLIMITED 295
+#define T_FILES 296
+#define T_VERSION 297
+#define T_HOSTNAME 298
+#define T_HOSTSTATS 299
+#define T_HOSTSTATSMAX 300
+#define T_DEALLOC_ON_EXIT 301
+#define T_TRANSFERS_IN 302
+#define T_TRANSFERS_OUT 303
+#define T_TRANSFERS_PER_NS 304
+#define T_TRANSFER_FORMAT 305
+#define T_MAX_TRANSFER_TIME_IN 306
+#define T_SERIAL_QUERIES 307
+#define T_ONE_ANSWER 308
+#define T_MANY_ANSWERS 309
+#define T_NOTIFY 310
+#define T_EXPLICIT 311
+#define T_NOTIFY_INITIAL 312
+#define T_AUTH_NXDOMAIN 313
+#define T_MULTIPLE_CNAMES 314
+#define T_USE_IXFR 315
+#define T_MAINTAIN_IXFR_BASE 316
+#define T_CLEAN_INTERVAL 317
+#define T_INTERFACE_INTERVAL 318
+#define T_STATS_INTERVAL 319
+#define T_MAX_LOG_SIZE_IXFR 320
+#define T_HEARTBEAT 321
+#define T_USE_ID_POOL 322
+#define T_MAX_NCACHE_TTL 323
+#define T_HAS_OLD_CLIENTS 324
+#define T_RFC2308_TYPE1 325
+#define T_LAME_TTL 326
+#define T_MIN_ROOTS 327
+#define T_TREAT_CR_AS_SPACE 328
+#define T_LOGGING 329
+#define T_CATEGORY 330
+#define T_CHANNEL 331
+#define T_SEVERITY 332
+#define T_DYNAMIC 333
+#define T_FILE 334
+#define T_VERSIONS 335
+#define T_SIZE 336
+#define T_SYSLOG 337
+#define T_DEBUG 338
+#define T_NULL_OUTPUT 339
+#define T_PRINT_TIME 340
+#define T_PRINT_CATEGORY 341
+#define T_PRINT_SEVERITY 342
+#define T_SORTLIST 343
+#define T_TOPOLOGY 344
+#define T_SERVER 345
+#define T_LONG_AXFR 346
+#define T_BOGUS 347
+#define T_TRANSFERS 348
+#define T_KEYS 349
+#define T_SUPPORT_IXFR 350
+#define T_ZONE 351
+#define T_IN 352
+#define T_CHAOS 353
+#define T_HESIOD 354
+#define T_TYPE 355
+#define T_MASTER 356
+#define T_SLAVE 357
+#define T_STUB 358
+#define T_RESPONSE 359
+#define T_HINT 360
+#define T_MASTERS 361
+#define T_TRANSFER_SOURCE 362
+#define T_PUBKEY 363
+#define T_ALSO_NOTIFY 364
+#define T_DIALUP 365
+#define T_FILE_IXFR 366
+#define T_IXFR_TMP 367
+#define T_TRUSTED_KEYS 368
+#define T_ACL 369
+#define T_ALLOW_UPDATE 370
+#define T_ALLOW_QUERY 371
+#define T_ALLOW_TRANSFER 372
+#define T_ALLOW_RECURSION 373
+#define T_BLACKHOLE 374
+#define T_SEC_KEY 375
+#define T_ALGID 376
+#define T_SECRET 377
+#define T_CHECK_NAMES 378
+#define T_WARN 379
+#define T_FAIL 380
+#define T_IGNORE 381
+#define T_FORWARD 382
+#define T_FORWARDERS 383
+#define T_ONLY 384
+#define T_FIRST 385
+#define T_IF_NO_ANSWER 386
+#define T_IF_NO_DOMAIN 387
+#define T_YES 388
+#define T_TRUE 389
+#define T_NO 390
+#define T_FALSE 391
#define YYERRCODE 256
-short yylhs[] = { -1,
+const short yylhs[] = { -1,
0, 31, 31, 32, 32, 32, 32, 32, 32, 32,
32, 32, 32, 32, 32, 33, 42, 34, 43, 43,
44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
- 44, 44, 44, 44, 46, 44, 44, 44, 44, 44,
- 44, 44, 49, 44, 44, 44, 44, 44, 44, 44,
+ 44, 44, 44, 44, 44, 44, 44, 44, 44, 46,
+ 44, 44, 44, 44, 44, 44, 44, 49, 44, 44,
44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
- 44, 44, 44, 35, 53, 53, 54, 54, 54, 54,
- 15, 15, 12, 12, 13, 13, 14, 14, 16, 6,
- 6, 5, 5, 4, 4, 55, 56, 48, 48, 48,
- 48, 2, 2, 3, 3, 29, 29, 29, 29, 29,
- 27, 27, 27, 28, 28, 28, 45, 45, 45, 45,
- 51, 51, 51, 51, 26, 26, 26, 26, 52, 52,
- 52, 47, 47, 57, 57, 58, 50, 50, 59, 59,
- 60, 61, 36, 62, 62, 62, 64, 63, 66, 63,
- 68, 68, 68, 68, 69, 69, 70, 71, 71, 71,
- 71, 71, 72, 10, 10, 11, 11, 73, 74, 74,
- 74, 74, 74, 74, 74, 67, 67, 67, 9, 9,
- 75, 65, 65, 65, 8, 8, 8, 7, 76, 37,
- 77, 77, 78, 78, 78, 78, 78, 78, 20, 20,
- 18, 18, 18, 17, 17, 17, 17, 17, 19, 23,
- 80, 79, 79, 79, 81, 41, 82, 82, 82, 24,
- 25, 40, 84, 38, 83, 83, 21, 21, 22, 22,
- 22, 22, 22, 85, 85, 86, 86, 86, 86, 86,
- 86, 86, 86, 86, 86, 86, 89, 86, 86, 86,
- 86, 86, 86, 86, 86, 86, 86, 87, 87, 92,
- 91, 91, 93, 93, 94, 88, 88, 90, 90, 95,
- 95, 96, 39, 97, 97, 98, 98, 1, 30, 30,
+ 44, 44, 44, 44, 44, 44, 44, 44, 44, 35,
+ 53, 53, 54, 54, 54, 54, 54, 54, 15, 15,
+ 12, 12, 13, 13, 14, 14, 16, 6, 6, 5,
+ 5, 4, 4, 56, 57, 48, 48, 48, 48, 2,
+ 2, 3, 3, 29, 29, 29, 29, 29, 27, 27,
+ 27, 28, 28, 28, 45, 45, 45, 45, 51, 51,
+ 51, 51, 26, 26, 26, 26, 52, 52, 52, 47,
+ 47, 58, 58, 59, 50, 50, 60, 60, 61, 62,
+ 36, 63, 63, 63, 65, 64, 67, 64, 69, 69,
+ 69, 69, 70, 70, 71, 72, 72, 72, 72, 72,
+ 73, 10, 10, 11, 11, 74, 75, 75, 75, 75,
+ 75, 75, 75, 68, 68, 68, 9, 9, 76, 66,
+ 66, 66, 8, 8, 8, 7, 77, 37, 78, 78,
+ 79, 79, 79, 79, 79, 79, 20, 20, 18, 18,
+ 18, 17, 17, 17, 17, 17, 19, 23, 81, 80,
+ 80, 80, 82, 55, 55, 55, 83, 41, 84, 84,
+ 84, 24, 25, 40, 86, 38, 85, 85, 21, 21,
+ 22, 22, 22, 22, 22, 87, 87, 88, 88, 88,
+ 88, 88, 88, 88, 88, 88, 88, 88, 91, 88,
+ 88, 88, 88, 88, 88, 88, 88, 88, 88, 88,
+ 89, 89, 94, 94, 93, 93, 95, 95, 96, 90,
+ 90, 92, 92, 97, 97, 98, 39, 99, 99, 100,
+ 100, 1, 30, 30,
};
-short yylen[] = { 2,
+const short yylen[] = { 2,
1, 1, 2, 1, 2, 2, 2, 2, 2, 2,
2, 2, 1, 2, 2, 3, 0, 5, 2, 3,
0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 3,
- 2, 2, 5, 2, 0, 5, 2, 2, 4, 4,
- 4, 4, 0, 5, 4, 4, 1, 1, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 4,
- 2, 2, 1, 4, 2, 3, 0, 8, 8, 1,
- 2, 3, 0, 2, 0, 2, 0, 2, 5, 1,
- 1, 1, 1, 1, 1, 2, 2, 1, 1, 2,
- 2, 0, 2, 0, 2, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 2, 2, 2, 2, 1, 1, 1, 1, 2, 2,
- 2, 0, 1, 2, 3, 1, 0, 1, 2, 3,
- 1, 0, 5, 2, 3, 1, 0, 6, 0, 6,
- 1, 1, 2, 1, 2, 2, 2, 0, 1, 1,
- 2, 2, 3, 1, 1, 0, 1, 2, 1, 1,
- 1, 2, 2, 2, 2, 2, 3, 1, 1, 1,
- 1, 2, 3, 1, 1, 1, 1, 1, 0, 6,
- 2, 3, 2, 2, 2, 2, 4, 1, 2, 3,
- 1, 2, 2, 1, 3, 3, 1, 3, 1, 1,
- 1, 2, 3, 1, 0, 6, 2, 2, 1, 3,
- 3, 5, 0, 5, 0, 3, 0, 1, 1, 1,
- 1, 1, 1, 2, 3, 2, 2, 2, 2, 5,
- 2, 2, 4, 4, 4, 2, 0, 5, 2, 2,
- 2, 2, 5, 5, 4, 2, 1, 2, 3, 1,
- 0, 1, 2, 3, 1, 1, 1, 0, 1, 2,
- 3, 1, 4, 2, 3, 5, 5, 1, 1, 1,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 3, 2, 2, 5, 2, 0,
+ 5, 2, 2, 4, 4, 4, 4, 0, 5, 4,
+ 4, 1, 1, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 4, 2, 2, 1, 4,
+ 2, 3, 0, 8, 10, 12, 8, 1, 2, 3,
+ 0, 2, 0, 2, 0, 2, 5, 1, 1, 1,
+ 1, 1, 1, 2, 2, 1, 1, 2, 2, 0,
+ 2, 0, 2, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 2, 2,
+ 2, 2, 1, 1, 1, 1, 2, 2, 2, 0,
+ 1, 2, 3, 1, 0, 1, 2, 3, 1, 0,
+ 5, 2, 3, 1, 0, 6, 0, 6, 1, 1,
+ 2, 1, 2, 2, 2, 0, 1, 1, 2, 2,
+ 3, 1, 1, 0, 1, 2, 1, 1, 1, 2,
+ 2, 2, 2, 2, 3, 1, 1, 1, 1, 2,
+ 3, 1, 1, 1, 1, 1, 0, 6, 2, 3,
+ 2, 2, 2, 2, 4, 1, 2, 3, 1, 2,
+ 2, 1, 3, 3, 1, 3, 1, 1, 1, 2,
+ 3, 1, 1, 2, 3, 1, 0, 6, 2, 2,
+ 1, 3, 3, 5, 0, 5, 0, 3, 0, 1,
+ 1, 1, 1, 1, 1, 2, 3, 2, 2, 2,
+ 2, 5, 2, 2, 4, 4, 4, 2, 0, 5,
+ 2, 2, 2, 2, 2, 5, 5, 4, 2, 1,
+ 2, 3, 1, 3, 0, 1, 2, 3, 1, 1,
+ 1, 0, 1, 2, 3, 1, 4, 2, 3, 5,
+ 5, 1, 1, 1,
};
-short yydefred[] = { 0,
- 0, 13, 0, 17, 0, 142, 0, 0, 0, 0,
- 215, 0, 0, 2, 4, 0, 0, 0, 0, 0,
- 0, 0, 0, 14, 15, 0, 0, 0, 0, 189,
- 0, 0, 279, 280, 0, 0, 3, 5, 6, 7,
- 8, 9, 10, 11, 12, 16, 0, 80, 0, 0,
- 0, 0, 0, 0, 223, 228, 0, 0, 0, 0,
- 0, 73, 0, 0, 0, 0, 0, 0, 0, 0,
+const short yydefred[] = { 0,
+ 0, 13, 0, 17, 0, 150, 0, 0, 0, 0,
+ 227, 0, 0, 2, 4, 0, 0, 0, 0, 0,
+ 0, 0, 0, 14, 15, 0, 0, 0, 0, 197,
+ 0, 0, 293, 294, 0, 0, 3, 5, 6, 7,
+ 8, 9, 10, 11, 12, 16, 0, 88, 0, 0,
+ 0, 0, 0, 0, 235, 240, 0, 0, 0, 0,
+ 0, 79, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 53, 0, 0,
- 0, 0, 0, 0, 0, 45, 0, 0, 57, 58,
- 92, 93, 0, 0, 74, 0, 75, 146, 0, 0,
- 0, 0, 0, 0, 0, 0, 273, 0, 274, 0,
- 0, 0, 0, 0, 201, 0, 207, 0, 209, 0,
- 23, 25, 24, 28, 26, 27, 110, 106, 107, 108,
- 109, 29, 30, 31, 0, 0, 47, 0, 0, 0,
- 0, 0, 126, 127, 128, 121, 125, 122, 123, 124,
- 22, 33, 34, 129, 130, 131, 90, 91, 59, 60,
- 61, 32, 38, 39, 35, 36, 62, 63, 64, 65,
- 68, 41, 66, 37, 42, 67, 72, 71, 0, 0,
- 48, 0, 69, 0, 0, 0, 0, 111, 112, 113,
- 0, 117, 118, 119, 120, 44, 0, 18, 0, 19,
- 0, 0, 76, 186, 187, 147, 188, 185, 180, 149,
- 179, 143, 0, 144, 198, 0, 0, 0, 0, 0,
- 0, 0, 0, 224, 0, 0, 275, 0, 0, 203,
- 0, 202, 199, 222, 0, 219, 0, 0, 0, 0,
- 0, 278, 95, 94, 97, 96, 100, 101, 103, 0,
+ 0, 0, 58, 0, 0, 0, 0, 0, 0, 0,
+ 50, 0, 0, 62, 63, 100, 101, 0, 0, 80,
+ 0, 81, 154, 0, 0, 0, 0, 0, 0, 0,
+ 0, 287, 0, 288, 0, 0, 0, 0, 0, 209,
+ 0, 215, 0, 217, 0, 24, 26, 25, 29, 27,
+ 28, 118, 114, 115, 116, 117, 31, 32, 33, 34,
+ 30, 0, 0, 52, 0, 0, 0, 0, 0, 134,
+ 135, 136, 129, 133, 130, 131, 132, 23, 22, 38,
+ 70, 39, 137, 138, 139, 98, 99, 64, 65, 66,
+ 35, 36, 37, 43, 44, 40, 41, 67, 68, 69,
+ 71, 74, 46, 72, 42, 47, 73, 78, 77, 0,
+ 0, 53, 0, 75, 0, 0, 0, 0, 119, 120,
+ 121, 0, 125, 126, 127, 128, 49, 0, 18, 0,
+ 19, 0, 0, 0, 82, 194, 195, 155, 196, 193,
+ 188, 157, 187, 151, 0, 152, 206, 0, 0, 0,
+ 0, 0, 0, 0, 0, 236, 0, 0, 289, 0,
+ 0, 211, 0, 210, 207, 234, 0, 231, 0, 0,
+ 0, 0, 0, 292, 103, 102, 105, 104, 108, 109,
+ 111, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 122, 123, 124, 45, 0, 20, 0,
+ 0, 0, 0, 0, 153, 204, 201, 203, 0, 202,
+ 198, 0, 199, 270, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 114, 115, 116, 40, 0, 20, 0, 0, 0,
- 0, 145, 196, 193, 195, 0, 194, 190, 0, 191,
- 257, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 247,
- 0, 0, 0, 0, 205, 206, 208, 200, 0, 0,
- 217, 218, 216, 0, 84, 0, 0, 70, 0, 81,
- 52, 56, 141, 0, 0, 0, 49, 51, 50, 55,
- 136, 0, 0, 0, 0, 0, 0, 0, 214, 211,
- 210, 0, 0, 192, 249, 251, 252, 250, 237, 229,
- 230, 232, 231, 233, 236, 0, 0, 241, 0, 0,
- 0, 256, 238, 239, 0, 0, 0, 242, 266, 267,
- 246, 0, 226, 0, 234, 276, 277, 220, 221, 43,
- 86, 0, 0, 82, 54, 0, 139, 46, 0, 134,
- 0, 0, 184, 181, 0, 0, 178, 0, 0, 0,
- 171, 0, 0, 0, 0, 169, 170, 0, 197, 0,
- 212, 105, 0, 0, 0, 265, 0, 0, 0, 0,
- 0, 0, 0, 235, 88, 0, 140, 135, 0, 0,
- 148, 0, 182, 154, 0, 151, 172, 0, 165, 167,
- 168, 164, 173, 174, 175, 150, 0, 176, 213, 260,
- 0, 0, 0, 0, 255, 0, 263, 243, 244, 245,
- 272, 0, 0, 0, 89, 78, 79, 183, 153, 0,
- 0, 0, 0, 163, 177, 240, 0, 258, 253, 254,
- 264, 248, 0, 270, 155, 156, 157, 161, 162, 259,
- 271,
+ 0, 0, 259, 0, 0, 0, 0, 213, 214, 216,
+ 208, 0, 0, 229, 230, 228, 0, 92, 0, 0,
+ 76, 0, 89, 57, 61, 149, 0, 0, 0, 54,
+ 56, 55, 60, 144, 0, 0, 0, 0, 0, 0,
+ 0, 0, 222, 219, 218, 0, 0, 200, 261, 263,
+ 264, 265, 262, 249, 241, 242, 244, 243, 245, 248,
+ 0, 0, 253, 0, 0, 0, 269, 250, 251, 0,
+ 0, 0, 254, 280, 281, 258, 0, 238, 0, 246,
+ 290, 291, 232, 233, 48, 94, 0, 0, 90, 59,
+ 0, 147, 51, 0, 142, 0, 0, 0, 192, 189,
+ 0, 0, 186, 0, 0, 0, 179, 0, 0, 0,
+ 0, 177, 178, 0, 205, 0, 220, 113, 0, 0,
+ 0, 279, 0, 0, 0, 0, 0, 0, 0, 247,
+ 96, 0, 148, 143, 0, 0, 0, 156, 0, 190,
+ 162, 0, 159, 180, 0, 173, 175, 176, 172, 181,
+ 182, 183, 158, 0, 184, 221, 0, 0, 0, 0,
+ 0, 268, 0, 277, 255, 256, 257, 286, 0, 0,
+ 0, 97, 0, 0, 87, 191, 161, 0, 0, 0,
+ 0, 171, 185, 0, 252, 0, 271, 266, 267, 278,
+ 260, 0, 284, 0, 226, 223, 0, 0, 163, 164,
+ 165, 169, 170, 274, 272, 285, 0, 85, 0, 224,
+ 0, 225, 86,
};
-short yydgoto[] = { 12,
- 274, 171, 387, 275, 123, 189, 236, 237, 424, 470,
- 471, 282, 347, 413, 283, 284, 145, 146, 147, 148,
- 55, 385, 370, 269, 270, 176, 221, 295, 162, 149,
+const short yydgoto[] = { 12,
+ 286, 178, 402, 287, 128, 198, 248, 249, 440, 487,
+ 488, 294, 360, 428, 295, 296, 150, 151, 152, 153,
+ 55, 400, 536, 281, 282, 183, 232, 307, 167, 154,
13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
- 23, 27, 117, 118, 226, 227, 362, 167, 212, 354,
- 119, 120, 51, 52, 168, 169, 363, 364, 355, 356,
- 29, 131, 132, 300, 425, 301, 435, 467, 502, 503,
- 504, 436, 437, 438, 426, 54, 251, 252, 372, 373,
- 36, 271, 254, 134, 331, 332, 481, 401, 402, 492,
- 447, 482, 448, 449, 493, 494, 58, 59,
+ 23, 27, 122, 123, 237, 238, 375, 174, 223, 367,
+ 124, 125, 51, 52, 537, 175, 176, 376, 377, 368,
+ 369, 29, 136, 137, 313, 441, 314, 451, 484, 520,
+ 521, 522, 452, 453, 454, 442, 54, 263, 264, 386,
+ 387, 538, 36, 283, 266, 139, 344, 345, 498, 416,
+ 417, 509, 463, 499, 464, 465, 510, 511, 58, 59,
};
-short yysindex[] = { 419,
- -172, 0, -236, 0, -91, 0, -224, -211, -71, -178,
- 0, 0, 419, 0, 0, -166, -160, -158, -156, -154,
- -144, -139, -128, 0, 0, -126, -49, -195, 10, 0,
- -178, -198, 0, 0, 12, -178, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 349, 0, -7, -123,
- -112, -115, -238, 23, 0, 0, -189, -110, -105, 43,
- 31, 0, -98, -96, -94, -85, -76, -73, -190, -190,
- -190, -86, -106, 33, -81, -81, -81, -81, -58, -190,
- -190, -59, -50, -45, -121, -34, -32, -190, -190, -190,
- -190, -190, 51, 56, 63, 64, 66, -190, 68, -190,
- -190, 69, 71, -190, 123, 136, -7, 0, -190, 212,
- 219, 220, 222, -258, -182, 0, 168, 89, 0, 0,
- 0, 0, 73, 62, 0, 93, 0, 0, -181, -216,
- -69, 94, -220, 230, 95, 96, 0, 99, 0, 312,
- 313, 104, 43, -100, 0, 108, 0, -29, 0, -196,
+const short yysindex[] = { 148,
+ -173, 0, -245, 0, -82, 0, -202, -214, -65, -180,
+ 0, 0, 148, 0, 0, -193, -183, -179, -170, -159,
+ -154, -150, -143, 0, 0, -120, 18, -151, 20, 0,
+ -180, -108, 0, 0, 41, -180, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 414, 0, -25, -93,
+ -102, -85, -218, 51, 0, 0, -139, -90, -71, 66,
+ 55, 0, -47, -42, -34, 10, 33, 53, -123, -123,
+ -123, -123, -62, -67, -17, 196, 56, 56, 56, 56,
+ 73, 82, -123, 88, -123, 89, 99, 100, -92, 102,
+ 103, -182, -123, -123, -123, -123, -123, 104, 105, 107,
+ 56, 118, -123, 119, -123, -123, 121, 122, -123, 259,
+ 260, -25, 0, -123, 261, 265, 266, 268, -162, -56,
+ 0, 295, 136, 0, 0, 0, 0, -181, 108, 0,
+ 139, 0, 0, -134, -200, -72, 140, -217, 275, 141,
+ 143, 0, 142, 0, 356, 359, 149, 66, -79, 0,
+ 150, 0, -29, 0, -219, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, -31, -7, 0, 100, 92, 111,
- 254, 98, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, -31, -25, 0, 130, 137, 159, 299, 145, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 43, 43,
- 0, 257, 0, 43, 43, 43, 43, 0, 0, 0,
- -68, 0, 0, 0, 0, 0, 258, 0, 127, 0,
- 111, 126, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 129, 0, 0, -121, -190, 130, 265, -190,
- -120, 133, 374, 0, 134, 135, 0, 137, 138, 0,
- -25, 0, 0, 0, 141, 0, -178, -178, 21, 32,
- 275, 0, 0, 0, 0, 0, 0, 0, 0, 43,
- -178, 52, -108, 146, -21, -17, 147, -11, 5, 9,
- 14, 0, 0, 0, 0, 148, 0, 116, 121, 286,
- 287, 0, 0, 0, 0, -151, 0, 0, 154, 0,
- 0, 155, -190, -190, 157, 152, -13, 143, -7, 35,
- 294, -190, 160, 161, 300, 302, 304, -68, -70, 0,
- 236, 171, 169, 170, 0, 0, 0, 0, 172, 175,
- 0, 0, 0, 18, 0, -178, 164, 0, 188, 0,
- 0, 0, 0, 322, 147, 191, 0, 0, 0, 0,
- 0, 324, 148, 193, 328, 194, -207, -2, 0, 0,
- 0, -92, 195, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 111, 331, 0, 196, 197,
- 202, 0, 0, 0, 43, 43, 43, 0, 0, 0,
- 0, 338, 0, 215, 0, 0, 0, 0, 0, 0,
- 0, 232, 216, 0, 0, 237, 0, 0, 239, 0,
- 43, 186, 0, 0, -41, 243, 0, -145, 240, -183,
- 0, -190, -190, -190, -118, 0, 0, 245, 0, 246,
- 0, 0, 249, 250, 251, 0, 379, 202, 255, 22,
- 26, 30, 253, 0, 0, 248, 0, 0, 39, 256,
- 0, 259, 0, 0, 260, 0, 0, -16, 0, 0,
- 0, 0, 0, 0, 0, 0, 261, 0, 0, 0,
- -101, 263, 252, 264, 0, 271, 0, 0, 0, 0,
- 0, 389, 253, 272, 0, 0, 0, 0, 0, -218,
- -81, 187, 192, 0, 0, 0, 273, 0, 0, 0,
- 0, 0, 274, 0, 0, 0, 0, 0, 0, 0,
- 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 66,
+ 66, 0, 300, 0, 66, 66, 66, 66, 0, 0,
+ 0, -177, 0, 0, 0, 0, 0, 301, 0, 169,
+ 0, 159, 307, 174, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 178, 0, 0, -92, -123, 179,
+ 317, -123, -100, 187, 439, 0, 186, 188, 0, 190,
+ 191, 0, -23, 0, 0, 0, 195, 0, -180, -180,
+ 80, 83, 335, 0, 0, 0, 0, 0, 0, 0,
+ 0, 66, -180, 106, -110, 205, -19, -15, 207, -6,
+ 15, 19, 26, 0, 0, 0, 0, 208, 0, 173,
+ 66, 180, 344, 346, 0, 0, 0, 0, -145, 0,
+ 0, 221, 0, 0, 223, -49, -123, 56, 222, -3,
+ 206, -25, 22, 362, -123, 225, 227, 366, 367, 371,
+ -177, -128, 0, 109, 238, 235, 236, 0, 0, 0,
+ 0, 241, 243, 0, 0, 0, 30, 0, -180, 224,
+ 0, 248, 0, 0, 0, 0, 382, 207, 251, 0,
+ 0, 0, 0, 0, 386, 208, 255, 390, 38, 256,
+ -211, 114, 0, 0, 0, -70, 262, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 159, 395, 0, 263, 267, 270, 0, 0, 0, 66,
+ 66, 66, 0, 0, 0, 0, 397, 0, 264, 0,
+ 0, 0, 0, 0, 0, 0, 269, 244, 0, 0,
+ 272, 0, 0, 274, 0, 66, 175, 245, 0, 0,
+ -113, 276, 0, -188, 271, -178, 0, -123, -123, -123,
+ -119, 0, 0, 278, 0, 279, 0, 0, 280, 281,
+ 283, 0, 418, 270, 282, 42, 46, 52, 286, 0,
+ 0, 285, 0, 0, 62, 423, 288, 0, 291, 0,
+ 0, 290, 0, 0, -43, 0, 0, 0, 0, 0,
+ 0, 0, 0, 293, 0, 0, 177, -112, 296, 294,
+ 312, 0, 297, 0, 0, 0, 0, 0, 431, 286,
+ 319, 0, 228, -138, 0, 0, 0, -205, 56, 242,
+ 239, 0, 0, -180, 0, 322, 0, 0, 0, 0,
+ 0, 323, 0, 458, 0, 0, -68, 325, 0, 0,
+ 0, 0, 0, 0, 0, 0, -138, 0, 327, 0,
+ -60, 0, 0,
};
-short yyrindex[] = { 0,
+const short yyrindex[] = { 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 585, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 332, 0, 0,
+ -95, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 333, 0, 0, 0,
+ 332, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 480, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 522, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 280, 0, 0,
- -117, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 282, 0, 0, 0,
- 280, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 409, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 333, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 347, 0,
+ 0, 0, 0, 0, 349, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 282, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 284, 0, 0, 0, 0, 0, 290,
+ 0, 0, 0, 0, 368, 369, 0, 0, -189, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 291, 292, 0,
- 0, -222, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -467,215 +494,226 @@ short yyrindex[] = { 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 63, -189, 0, 0, 0, 499, 0,
+ 0, 0, 0, 0, 0, 0, 0, 502, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 41, -222, 0, 0, 0, 418, 0, 0, 0,
- 0, 0, 0, 0, 0, 426, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 429, 0, 0,
+ 505, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 348,
+ 0, 0, 0, 0, 0, 0, 0, 506, 0, 0,
+ 0, 0, 0, 0, 0, 507, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 276, 0, 0, 0,
- 0, 0, 0, 0, 428, 0, 0, 0, 0, 0,
- 0, 0, 431, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 508, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 432, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 297,
+ 0, 0, 0, 0, 0, 373, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 433, 0, 0,
- 0, 0, 434, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 303, 0, 0, 305, 0, 0,
+ 0, 0, 0, 509, 0, 0, 0, 0, 510, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 379, 0, 0, 380, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 383, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 516,
+ 0, 0, 385, 0, 0, 0, 0, 0, 0, 387,
+ 388, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 436, 0, 0, 0, 0, 0, 0, 0,
- 0, 306, 308, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0,
+ 0, 0, 0,
};
-short yygindex[] = { 0,
- -124, 0, 0, 0, -93, 320, 0, 0, 437, 0,
- 0, 0, 0, 0, 0, 285, 425, -84, 0, 102,
- 0, 0, 0, 301, 307, -75, 0, 242, -61, -10,
- 0, 559, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 456, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 523, 406, 410, 0, 214, 0, 224,
- 0, 0, 449, 0, 0, 0, 0, 0, 78, 80,
- 0, 0, 0, 149, 158, 0, 0, 335, 0, 217,
- 0, 0, 0, 0, 0, 267, 0, 0, 0, 0,
- 0, 106, 0, 140, 0, 97, 0, 541,
+const short yygindex[] = { 0,
+ -141, 0, 0, 0, -107, 389, 0, 0, 511, 0,
+ 0, 0, 0, 0, 0, 353, 494, 35, 0, 147,
+ 0, 0, -300, 370, 372, -77, 0, 308, -63, -10,
+ 0, 637, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 529, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 603, 111, 479, 481, 0, 287, 0,
+ 303, 0, 0, 525, 0, 0, 0, 0, 0, 144,
+ 152, 0, 0, 0, 211, 233, 0, 0, 401, 0,
+ 289, -475, 0, 0, 0, 0, 0, 352, 0, 0,
+ 0, 0, 0, 194, 0, 212, 0, 183, 0, 639,
};
-#define YYTABLESIZE 788
-short yytable[] = { 35,
- 178, 179, 180, 144, 308, 227, 476, 144, 163, 164,
- 273, 144, 125, 211, 137, 144, 348, 128, 182, 183,
- 56, 144, 143, 506, 26, 61, 192, 193, 194, 195,
- 196, 28, 439, 30, 122, 245, 202, 144, 204, 205,
- 515, 144, 208, 33, 34, 279, 144, 213, 423, 31,
- 144, 32, 33, 34, 144, 242, 83, 83, 144, 266,
- 48, 57, 144, 265, 177, 177, 177, 177, 157, 135,
- 136, 144, 276, 47, 516, 144, 33, 34, 33, 34,
- 246, 33, 34, 461, 24, 129, 130, 49, 50, 25,
- 38, 218, 219, 143, 220, 264, 39, 143, 40, 337,
- 41, 143, 42, 351, 369, 143, 298, 352, 33, 34,
- 234, 143, 43, 357, 33, 34, 239, 44, 238, 241,
- 247, 248, 249, 250, 235, 239, 83, 143, 45, 358,
- 46, 143, 53, 359, 60, 245, 143, 124, 360, 227,
- 143, 127, 410, 48, 143, 133, 488, 469, 143, 57,
- 489, 139, 143, 150, 490, 172, 480, 140, 141, 33,
- 34, 143, 151, 496, 152, 143, 153, 33, 34, 170,
- 49, 50, 281, 267, 268, 154, 265, 173, 33, 34,
- 246, 464, 187, 188, 155, 304, 465, 156, 307, 165,
- 166, 158, 159, 160, 161, 222, 223, 224, 225, 184,
- 265, 265, 181, 265, 265, 265, 265, 428, 185, 429,
- 174, 175, 430, 186, 431, 432, 433, 434, 33, 34,
- 247, 248, 249, 250, 190, 388, 191, 272, 140, 141,
- 33, 34, 140, 141, 33, 34, 140, 141, 33, 34,
- 140, 141, 33, 34, 261, 209, 140, 141, 33, 34,
- 121, 376, 377, 427, 129, 130, 339, 340, 210, 265,
- 392, 442, 140, 141, 33, 34, 140, 141, 33, 34,
- 345, 140, 141, 33, 34, 140, 141, 33, 34, 140,
- 141, 33, 34, 140, 141, 33, 34, 140, 141, 33,
- 34, 239, 228, 389, 390, 371, 140, 141, 33, 34,
- 140, 141, 33, 34, 292, 293, 294, 399, 400, 197,
- 285, 286, 500, 501, 198, 288, 289, 290, 291, 85,
- 85, 199, 200, 428, 201, 429, 203, 206, 430, 207,
- 431, 432, 433, 434, 214, 411, 380, 381, 382, 142,
- 383, 215, 216, 142, 217, 230, 232, 142, 231, 233,
- 244, 142, 253, 255, 256, 257, 241, 142, 258, 259,
- 403, 371, 384, 260, 263, 265, 265, 265, 166, 272,
- 473, 474, 475, 142, 265, 165, 280, 142, 281, 287,
- 296, 344, 142, 297, 299, 302, 142, 306, 305, 310,
- 142, 268, 333, 334, 142, 335, 336, 338, 142, 343,
- 346, 267, 350, 365, 353, 361, 366, 142, 367, 368,
- 374, 142, 379, 375, 241, 378, 391, 466, 386, 472,
- 393, 394, 395, 62, 396, 517, 397, 405, 408, 406,
- 407, 409, 63, 64, 65, 66, 67, 68, 69, 70,
- 71, 72, 73, 412, 414, 74, 415, 417, 418, 420,
- 421, 441, 422, 443, 444, 445, 75, 76, 77, 446,
- 453, 78, 79, 80, 81, 82, 83, 84, 85, 86,
- 87, 454, 460, 88, 89, 90, 91, 92, 93, 94,
- 95, 96, 97, 98, 99, 100, 101, 102, 103, 104,
- 177, 311, 455, 457, 456, 458, 450, 451, 452, 463,
- 468, 478, 479, 485, 105, 106, 480, 495, 483, 484,
- 491, 487, 509, 512, 497, 498, 501, 505, 499, 508,
- 500, 1, 459, 107, 510, 108, 109, 511, 514, 520,
- 521, 102, 110, 111, 112, 113, 77, 312, 21, 114,
- 225, 313, 137, 115, 116, 314, 204, 98, 99, 315,
- 132, 104, 138, 166, 87, 133, 261, 262, 268, 152,
- 269, 158, 159, 316, 160, 303, 240, 349, 262, 398,
- 342, 37, 229, 126, 278, 341, 419, 277, 416, 243,
- 519, 518, 462, 477, 317, 309, 507, 486, 440, 513,
- 318, 319, 320, 321, 322, 323, 324, 404, 138, 325,
- 326, 327, 0, 0, 62, 0, 0, 328, 0, 0,
- 0, 329, 330, 63, 64, 65, 66, 67, 68, 69,
- 70, 71, 72, 73, 0, 0, 74, 0, 0, 311,
- 0, 0, 0, 0, 0, 0, 0, 75, 76, 77,
- 0, 0, 78, 79, 80, 81, 82, 83, 84, 85,
- 86, 87, 0, 0, 88, 89, 90, 91, 92, 93,
- 94, 95, 96, 97, 98, 99, 100, 101, 102, 103,
- 104, 0, 0, 0, 1, 312, 0, 0, 0, 313,
- 2, 3, 4, 314, 0, 105, 106, 315, 0, 0,
+#define YYTABLESIZE 822
+const short yytable[] = { 35,
+ 185, 186, 187, 149, 222, 493, 168, 169, 170, 149,
+ 285, 478, 525, 149, 361, 26, 127, 149, 384, 190,
+ 56, 192, 130, 211, 321, 61, 149, 239, 202, 203,
+ 204, 205, 206, 207, 142, 291, 278, 133, 257, 213,
+ 28, 215, 216, 148, 439, 219, 31, 149, 33, 34,
+ 224, 149, 254, 539, 455, 30, 548, 32, 149, 33,
+ 34, 549, 149, 38, 553, 288, 184, 184, 184, 184,
+ 149, 33, 34, 39, 149, 549, 162, 40, 149, 33,
+ 34, 33, 34, 24, 149, 384, 41, 258, 25, 540,
+ 184, 91, 91, 148, 149, 276, 242, 42, 149, 148,
+ 310, 350, 43, 148, 48, 364, 44, 148, 243, 365,
+ 383, 134, 135, 45, 33, 34, 148, 535, 370, 140,
+ 141, 33, 34, 250, 253, 33, 34, 251, 201, 259,
+ 260, 261, 262, 49, 50, 162, 46, 148, 251, 371,
+ 47, 148, 53, 372, 481, 497, 33, 34, 148, 482,
+ 373, 57, 148, 48, 425, 257, 279, 280, 486, 246,
+ 148, 239, 437, 60, 148, 91, 505, 129, 148, 57,
+ 506, 132, 293, 138, 148, 247, 507, 155, 145, 146,
+ 33, 34, 49, 50, 148, 144, 513, 277, 148, 33,
+ 34, 33, 34, 229, 230, 317, 231, 171, 320, 33,
+ 34, 304, 305, 306, 258, 163, 164, 165, 166, 162,
+ 172, 173, 444, 156, 445, 196, 197, 446, 157, 447,
+ 448, 449, 450, 544, 403, 251, 158, 284, 145, 146,
+ 33, 34, 126, 418, 145, 146, 33, 34, 145, 146,
+ 33, 34, 145, 146, 33, 34, 259, 260, 261, 262,
+ 393, 145, 146, 33, 34, 414, 415, 134, 135, 458,
+ 177, 390, 391, 392, 163, 164, 165, 166, 352, 353,
+ 159, 407, 145, 146, 33, 34, 145, 146, 33, 34,
+ 404, 405, 358, 145, 146, 33, 34, 145, 146, 33,
+ 34, 518, 519, 160, 273, 145, 146, 33, 34, 145,
+ 146, 33, 34, 145, 146, 33, 34, 277, 385, 145,
+ 146, 33, 34, 161, 180, 33, 34, 184, 179, 145,
+ 146, 33, 34, 145, 146, 33, 34, 233, 234, 235,
+ 236, 277, 277, 188, 277, 277, 277, 277, 163, 164,
+ 165, 166, 189, 93, 93, 147, 191, 193, 426, 181,
+ 182, 147, 395, 396, 397, 147, 398, 194, 195, 147,
+ 199, 200, 208, 209, 324, 210, 297, 298, 147, 443,
+ 253, 300, 301, 302, 303, 385, 212, 214, 399, 217,
+ 218, 220, 221, 225, 490, 491, 492, 226, 227, 147,
+ 228, 277, 241, 147, 244, 245, 256, 265, 269, 267,
+ 147, 268, 270, 1, 147, 271, 275, 172, 272, 2,
+ 3, 4, 147, 277, 325, 173, 147, 284, 326, 239,
+ 147, 292, 299, 308, 327, 309, 147, 293, 328, 311,
+ 253, 5, 312, 483, 315, 489, 147, 318, 357, 319,
+ 147, 541, 329, 323, 346, 444, 347, 445, 348, 349,
+ 446, 351, 447, 448, 449, 450, 280, 379, 279, 356,
+ 359, 363, 378, 330, 366, 374, 381, 380, 382, 331,
+ 332, 333, 334, 335, 336, 337, 6, 388, 338, 339,
+ 340, 389, 394, 401, 406, 408, 341, 409, 410, 411,
+ 342, 343, 7, 412, 420, 421, 422, 423, 8, 424,
+ 277, 277, 277, 385, 429, 427, 430, 432, 184, 277,
+ 433, 435, 436, 385, 438, 9, 10, 459, 457, 469,
+ 470, 460, 11, 476, 472, 461, 385, 462, 473, 471,
+ 474, 485, 480, 477, 495, 496, 385, 497, 504, 500,
+ 385, 501, 502, 508, 512, 514, 515, 516, 517, 523,
+ 62, 524, 527, 530, 528, 531, 466, 467, 468, 63,
+ 64, 65, 66, 67, 68, 69, 70, 71, 72, 73,
+ 74, 75, 529, 518, 76, 533, 534, 519, 545, 546,
+ 547, 550, 475, 552, 1, 77, 78, 79, 83, 21,
+ 80, 81, 82, 83, 84, 85, 86, 87, 88, 89,
+ 90, 91, 110, 237, 92, 212, 93, 94, 95, 96,
+ 97, 98, 99, 100, 101, 102, 103, 104, 105, 106,
+ 107, 108, 109, 145, 106, 107, 140, 112, 95, 174,
+ 146, 141, 275, 276, 282, 160, 166, 110, 111, 273,
+ 283, 84, 274, 167, 168, 252, 316, 362, 413, 37,
+ 240, 355, 354, 131, 290, 289, 112, 551, 113, 114,
+ 255, 494, 434, 322, 543, 115, 116, 117, 118, 62,
+ 431, 542, 119, 479, 456, 503, 120, 121, 63, 64,
+ 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
+ 75, 526, 532, 76, 324, 419, 143, 0, 0, 0,
+ 0, 0, 0, 0, 77, 78, 79, 0, 0, 80,
+ 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,
+ 91, 0, 0, 92, 0, 93, 94, 95, 96, 97,
+ 98, 99, 100, 101, 102, 103, 104, 105, 106, 107,
+ 108, 109, 0, 0, 325, 0, 0, 0, 326, 0,
+ 0, 0, 0, 0, 327, 0, 110, 111, 328, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 5, 316, 0, 0, 107, 0, 108, 109, 0, 0,
- 0, 0, 0, 110, 111, 112, 113, 0, 0, 0,
- 114, 0, 317, 0, 115, 116, 0, 0, 318, 319,
- 320, 321, 322, 323, 324, 0, 0, 325, 326, 327,
- 0, 6, 0, 0, 0, 328, 0, 0, 0, 329,
- 330, 0, 0, 0, 0, 0, 0, 7, 0, 0,
- 0, 0, 0, 8, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 9, 10, 0, 0, 0, 0, 0, 11,
+ 0, 0, 329, 0, 0, 112, 0, 113, 114, 0,
+ 0, 0, 0, 0, 115, 116, 117, 118, 0, 0,
+ 0, 119, 0, 330, 0, 120, 121, 0, 0, 331,
+ 332, 333, 334, 335, 336, 337, 0, 0, 338, 339,
+ 340, 0, 0, 0, 0, 0, 341, 0, 0, 0,
+ 342, 343,
};
-short yycheck[] = { 10,
- 76, 77, 78, 33, 125, 123, 125, 33, 70, 71,
- 42, 33, 125, 107, 125, 33, 125, 256, 80, 81,
- 31, 33, 123, 125, 261, 36, 88, 89, 90, 91,
- 92, 123, 125, 258, 42, 256, 98, 33, 100, 101,
- 259, 33, 104, 260, 261, 170, 33, 109, 256, 261,
- 33, 123, 260, 261, 33, 125, 279, 280, 33, 256,
- 256, 260, 33, 148, 75, 76, 77, 78, 259, 259,
- 260, 33, 166, 123, 293, 33, 260, 261, 260, 261,
- 301, 260, 261, 125, 257, 324, 325, 283, 284, 262,
- 257, 350, 351, 123, 353, 125, 257, 123, 257, 125,
- 257, 123, 257, 125, 256, 123, 231, 125, 260, 261,
- 292, 123, 257, 125, 260, 261, 333, 257, 129, 130,
- 341, 342, 343, 344, 306, 333, 349, 123, 257, 125,
- 257, 123, 123, 125, 123, 256, 123, 261, 125, 257,
- 123, 257, 125, 256, 123, 123, 125, 331, 123, 260,
- 125, 257, 123, 123, 125, 123, 258, 258, 259, 260,
- 261, 123, 261, 125, 261, 123, 261, 260, 261, 276,
- 283, 284, 281, 370, 371, 261, 261, 259, 260, 261,
- 301, 327, 304, 305, 261, 247, 332, 261, 250, 276,
- 277, 382, 383, 384, 385, 378, 379, 380, 381, 259,
- 285, 286, 261, 288, 289, 290, 291, 326, 259, 328,
- 292, 293, 331, 259, 333, 334, 335, 336, 260, 261,
- 341, 342, 343, 344, 259, 319, 259, 259, 258, 259,
- 260, 261, 258, 259, 260, 261, 258, 259, 260, 261,
- 258, 259, 260, 261, 143, 123, 258, 259, 260, 261,
- 258, 313, 314, 256, 324, 325, 267, 268, 123, 344,
- 322, 386, 258, 259, 260, 261, 258, 259, 260, 261,
- 281, 258, 259, 260, 261, 258, 259, 260, 261, 258,
- 259, 260, 261, 258, 259, 260, 261, 258, 259, 260,
- 261, 333, 125, 259, 260, 306, 258, 259, 260, 261,
- 258, 259, 260, 261, 373, 374, 375, 378, 379, 259,
- 209, 210, 329, 330, 259, 214, 215, 216, 217, 279,
- 280, 259, 259, 326, 259, 328, 259, 259, 331, 259,
- 333, 334, 335, 336, 123, 346, 350, 351, 352, 369,
- 354, 123, 123, 369, 123, 257, 285, 369, 276, 257,
- 257, 369, 123, 259, 259, 257, 367, 369, 47, 47,
- 125, 372, 376, 260, 257, 450, 451, 452, 277, 259,
- 432, 433, 434, 369, 459, 276, 123, 369, 281, 123,
- 123, 280, 369, 257, 259, 257, 369, 123, 259, 257,
- 369, 371, 259, 259, 369, 259, 259, 257, 369, 125,
- 349, 370, 257, 288, 258, 258, 286, 369, 123, 123,
- 257, 369, 261, 259, 425, 259, 123, 428, 276, 430,
- 261, 261, 123, 256, 123, 501, 123, 257, 257, 261,
- 261, 257, 265, 266, 267, 268, 269, 270, 271, 272,
- 273, 274, 275, 280, 257, 278, 125, 257, 125, 257,
- 123, 257, 259, 123, 259, 259, 289, 290, 291, 258,
- 123, 294, 295, 296, 297, 298, 299, 300, 301, 302,
- 303, 257, 287, 306, 307, 308, 309, 310, 311, 312,
- 313, 314, 315, 316, 317, 318, 319, 320, 321, 322,
- 501, 256, 261, 257, 279, 257, 395, 396, 397, 257,
- 261, 257, 257, 125, 337, 338, 258, 260, 259, 259,
- 258, 257, 261, 125, 259, 257, 330, 257, 259, 257,
- 329, 0, 421, 356, 261, 358, 359, 257, 257, 257,
- 257, 123, 365, 366, 367, 368, 257, 302, 257, 372,
- 257, 306, 125, 376, 377, 310, 257, 257, 257, 314,
- 125, 123, 125, 257, 279, 125, 125, 125, 125, 257,
- 125, 257, 257, 328, 257, 246, 130, 283, 144, 328,
- 270, 13, 117, 51, 169, 269, 363, 168, 355, 131,
- 503, 502, 425, 435, 349, 251, 481, 448, 372, 493,
- 355, 356, 357, 358, 359, 360, 361, 331, 58, 364,
- 365, 366, -1, -1, 256, -1, -1, 372, -1, -1,
- -1, 376, 377, 265, 266, 267, 268, 269, 270, 271,
- 272, 273, 274, 275, -1, -1, 278, -1, -1, 256,
- -1, -1, -1, -1, -1, -1, -1, 289, 290, 291,
- -1, -1, 294, 295, 296, 297, 298, 299, 300, 301,
- 302, 303, -1, -1, 306, 307, 308, 309, 310, 311,
- 312, 313, 314, 315, 316, 317, 318, 319, 320, 321,
- 322, -1, -1, -1, 256, 302, -1, -1, -1, 306,
- 262, 263, 264, 310, -1, 337, 338, 314, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- 282, 328, -1, -1, 356, -1, 358, 359, -1, -1,
- -1, -1, -1, 365, 366, 367, 368, -1, -1, -1,
- 372, -1, 349, -1, 376, 377, -1, -1, 355, 356,
- 357, 358, 359, 360, 361, -1, -1, 364, 365, 366,
- -1, 323, -1, -1, -1, 372, -1, -1, -1, 376,
- 377, -1, -1, -1, -1, -1, -1, 339, -1, -1,
- -1, -1, -1, 345, -1, -1, -1, -1, -1, -1,
+const short yycheck[] = { 10,
+ 78, 79, 80, 33, 112, 125, 70, 71, 72, 33,
+ 42, 125, 125, 33, 125, 261, 42, 33, 319, 83,
+ 31, 85, 125, 101, 125, 36, 33, 123, 92, 93,
+ 94, 95, 96, 97, 125, 177, 256, 256, 256, 103,
+ 123, 105, 106, 123, 256, 109, 261, 33, 260, 261,
+ 114, 33, 125, 259, 125, 258, 125, 123, 33, 260,
+ 261, 537, 33, 257, 125, 173, 77, 78, 79, 80,
+ 33, 260, 261, 257, 33, 551, 259, 257, 33, 260,
+ 261, 260, 261, 257, 33, 386, 257, 305, 262, 295,
+ 101, 281, 282, 123, 33, 125, 278, 257, 33, 123,
+ 242, 125, 257, 123, 256, 125, 257, 123, 290, 125,
+ 256, 330, 331, 257, 260, 261, 123, 256, 125, 259,
+ 260, 260, 261, 134, 135, 260, 261, 339, 311, 347,
+ 348, 349, 350, 285, 286, 259, 257, 123, 339, 125,
+ 123, 123, 123, 125, 333, 258, 260, 261, 123, 338,
+ 125, 260, 123, 256, 125, 256, 376, 377, 337, 294,
+ 123, 257, 125, 123, 123, 355, 125, 261, 123, 260,
+ 125, 257, 283, 123, 123, 310, 125, 123, 258, 259,
+ 260, 261, 285, 286, 123, 257, 125, 153, 123, 260,
+ 261, 260, 261, 356, 357, 259, 359, 260, 262, 260,
+ 261, 379, 380, 381, 305, 388, 389, 390, 391, 259,
+ 278, 279, 332, 261, 334, 308, 309, 337, 261, 339,
+ 340, 341, 342, 524, 332, 339, 261, 259, 258, 259,
+ 260, 261, 258, 125, 258, 259, 260, 261, 258, 259,
+ 260, 261, 258, 259, 260, 261, 347, 348, 349, 350,
+ 328, 258, 259, 260, 261, 384, 385, 330, 331, 401,
+ 278, 311, 326, 327, 388, 389, 390, 391, 279, 280,
+ 261, 335, 258, 259, 260, 261, 258, 259, 260, 261,
+ 259, 260, 293, 258, 259, 260, 261, 258, 259, 260,
+ 261, 335, 336, 261, 148, 258, 259, 260, 261, 258,
+ 259, 260, 261, 258, 259, 260, 261, 273, 319, 258,
+ 259, 260, 261, 261, 259, 260, 261, 328, 123, 258,
+ 259, 260, 261, 258, 259, 260, 261, 384, 385, 386,
+ 387, 297, 298, 261, 300, 301, 302, 303, 388, 389,
+ 390, 391, 261, 281, 282, 375, 259, 259, 359, 294,
+ 295, 375, 356, 357, 358, 375, 360, 259, 259, 375,
+ 259, 259, 259, 259, 256, 259, 220, 221, 375, 256,
+ 381, 225, 226, 227, 228, 386, 259, 259, 382, 259,
+ 259, 123, 123, 123, 448, 449, 450, 123, 123, 375,
+ 123, 357, 257, 375, 287, 257, 257, 123, 257, 259,
+ 375, 259, 47, 256, 375, 47, 257, 278, 260, 262,
+ 263, 264, 375, 379, 306, 279, 375, 259, 310, 125,
+ 375, 123, 123, 123, 316, 257, 375, 283, 320, 123,
+ 441, 284, 259, 444, 257, 446, 375, 259, 292, 123,
+ 375, 519, 334, 257, 259, 332, 259, 334, 259, 259,
+ 337, 257, 339, 340, 341, 342, 377, 311, 376, 125,
+ 355, 257, 290, 355, 258, 258, 123, 288, 123, 361,
+ 362, 363, 364, 365, 366, 367, 329, 257, 370, 371,
+ 372, 259, 261, 278, 123, 261, 378, 261, 123, 123,
+ 382, 383, 345, 123, 257, 261, 261, 257, 351, 257,
+ 466, 467, 468, 514, 257, 282, 125, 257, 519, 475,
+ 125, 257, 123, 524, 259, 368, 369, 123, 257, 123,
+ 257, 259, 375, 349, 281, 259, 537, 258, 257, 261,
+ 257, 261, 257, 289, 257, 257, 547, 258, 257, 259,
+ 551, 259, 125, 258, 260, 123, 259, 257, 259, 257,
+ 256, 375, 257, 257, 261, 125, 410, 411, 412, 265,
+ 266, 267, 268, 269, 270, 271, 272, 273, 274, 275,
+ 276, 277, 261, 335, 280, 257, 349, 336, 257, 257,
+ 123, 257, 436, 257, 0, 291, 292, 293, 257, 257,
+ 296, 297, 298, 299, 300, 301, 302, 303, 304, 305,
+ 306, 307, 123, 257, 310, 257, 312, 313, 314, 315,
+ 316, 317, 318, 319, 320, 321, 322, 323, 324, 325,
+ 326, 327, 328, 125, 257, 257, 125, 123, 281, 257,
+ 125, 125, 125, 125, 125, 257, 257, 343, 344, 257,
+ 125, 257, 149, 257, 257, 135, 258, 295, 341, 13,
+ 122, 282, 281, 51, 176, 175, 362, 547, 364, 365,
+ 136, 451, 376, 263, 521, 371, 372, 373, 374, 256,
+ 368, 520, 378, 441, 386, 464, 382, 383, 265, 266,
+ 267, 268, 269, 270, 271, 272, 273, 274, 275, 276,
+ 277, 498, 510, 280, 256, 344, 58, -1, -1, -1,
+ -1, -1, -1, -1, 291, 292, 293, -1, -1, 296,
+ 297, 298, 299, 300, 301, 302, 303, 304, 305, 306,
+ 307, -1, -1, 310, -1, 312, 313, 314, 315, 316,
+ 317, 318, 319, 320, 321, 322, 323, 324, 325, 326,
+ 327, 328, -1, -1, 306, -1, -1, -1, 310, -1,
+ -1, -1, -1, -1, 316, -1, 343, 344, 320, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- 362, 363, -1, -1, -1, -1, -1, 369,
+ -1, -1, 334, -1, -1, 362, -1, 364, 365, -1,
+ -1, -1, -1, -1, 371, 372, 373, 374, -1, -1,
+ -1, 378, -1, 355, -1, 382, 383, -1, -1, 361,
+ 362, 363, 364, 365, 366, 367, -1, -1, 370, 371,
+ 372, -1, -1, -1, -1, -1, 378, -1, -1, -1,
+ 382, 383,
};
#define YYFINAL 12
#ifndef YYDEBUG
#define YYDEBUG 0
+#elif YYDEBUG
+#include <stdio.h>
#endif
-#define YYMAXTOKEN 385
+#define YYMAXTOKEN 391
#if YYDEBUG
-char *yyname[] = {
+const char * const yyname[] = {
"end-of-file",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
"'!'",0,0,0,0,0,0,0,0,"'*'",0,0,0,0,"'/'",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
@@ -686,19 +724,20 @@ char *yyname[] = {
"L_IPADDR","L_NUMBER","L_STRING","L_QSTRING","L_END_INCLUDE","T_INCLUDE",
"T_OPTIONS","T_DIRECTORY","T_PIDFILE","T_NAMED_XFER","T_DUMP_FILE",
"T_STATS_FILE","T_MEMSTATS_FILE","T_FAKE_IQUERY","T_RECURSION","T_FETCH_GLUE",
-"T_QUERY_SOURCE","T_LISTEN_ON","T_PORT","T_ADDRESS","T_RRSET_ORDER","T_ORDER",
-"T_NAME","T_CLASS","T_CONTROLS","T_INET","T_UNIX","T_PERM","T_OWNER","T_GROUP",
-"T_ALLOW","T_DATASIZE","T_STACKSIZE","T_CORESIZE","T_DEFAULT","T_UNLIMITED",
-"T_FILES","T_VERSION","T_HOSTSTATS","T_DEALLOC_ON_EXIT","T_TRANSFERS_IN",
+"T_HITCOUNT","T_PREFERRED_GLUE","T_QUERY_SOURCE","T_LISTEN_ON","T_PORT",
+"T_ADDRESS","T_RRSET_ORDER","T_ORDER","T_NAME","T_CLASS","T_CONTROLS","T_INET",
+"T_UNIX","T_PERM","T_OWNER","T_GROUP","T_ALLOW","T_DATASIZE","T_STACKSIZE",
+"T_CORESIZE","T_DEFAULT","T_UNLIMITED","T_FILES","T_VERSION","T_HOSTNAME",
+"T_HOSTSTATS","T_HOSTSTATSMAX","T_DEALLOC_ON_EXIT","T_TRANSFERS_IN",
"T_TRANSFERS_OUT","T_TRANSFERS_PER_NS","T_TRANSFER_FORMAT",
"T_MAX_TRANSFER_TIME_IN","T_SERIAL_QUERIES","T_ONE_ANSWER","T_MANY_ANSWERS",
-"T_NOTIFY","T_AUTH_NXDOMAIN","T_MULTIPLE_CNAMES","T_USE_IXFR",
-"T_MAINTAIN_IXFR_BASE","T_CLEAN_INTERVAL","T_INTERFACE_INTERVAL",
-"T_STATS_INTERVAL","T_MAX_LOG_SIZE_IXFR","T_HEARTBEAT","T_USE_ID_POOL",
-"T_MAX_NCACHE_TTL","T_HAS_OLD_CLIENTS","T_RFC2308_TYPE1","T_LAME_TTL",
-"T_MIN_ROOTS","T_TREAT_CR_AS_SPACE","T_LOGGING","T_CATEGORY","T_CHANNEL",
-"T_SEVERITY","T_DYNAMIC","T_FILE","T_VERSIONS","T_SIZE","T_SYSLOG","T_DEBUG",
-"T_NULL_OUTPUT","T_PRINT_TIME","T_PRINT_CATEGORY","T_PRINT_SEVERITY",
+"T_NOTIFY","T_EXPLICIT","T_NOTIFY_INITIAL","T_AUTH_NXDOMAIN",
+"T_MULTIPLE_CNAMES","T_USE_IXFR","T_MAINTAIN_IXFR_BASE","T_CLEAN_INTERVAL",
+"T_INTERFACE_INTERVAL","T_STATS_INTERVAL","T_MAX_LOG_SIZE_IXFR","T_HEARTBEAT",
+"T_USE_ID_POOL","T_MAX_NCACHE_TTL","T_HAS_OLD_CLIENTS","T_RFC2308_TYPE1",
+"T_LAME_TTL","T_MIN_ROOTS","T_TREAT_CR_AS_SPACE","T_LOGGING","T_CATEGORY",
+"T_CHANNEL","T_SEVERITY","T_DYNAMIC","T_FILE","T_VERSIONS","T_SIZE","T_SYSLOG",
+"T_DEBUG","T_NULL_OUTPUT","T_PRINT_TIME","T_PRINT_CATEGORY","T_PRINT_SEVERITY",
"T_SORTLIST","T_TOPOLOGY","T_SERVER","T_LONG_AXFR","T_BOGUS","T_TRANSFERS",
"T_KEYS","T_SUPPORT_IXFR","T_ZONE","T_IN","T_CHAOS","T_HESIOD","T_TYPE",
"T_MASTER","T_SLAVE","T_STUB","T_RESPONSE","T_HINT","T_MASTERS",
@@ -709,7 +748,7 @@ char *yyname[] = {
"T_FORWARDERS","T_ONLY","T_FIRST","T_IF_NO_ANSWER","T_IF_NO_DOMAIN","T_YES",
"T_TRUE","T_NO","T_FALSE",
};
-char *yyrule[] = {
+const char * const yyrule[] = {
"$accept : config_file",
"config_file : statement_list",
"statement_list : statement",
@@ -732,6 +771,7 @@ char *yyrule[] = {
"options : option L_EOS",
"options : options option L_EOS",
"option :",
+"option : T_HOSTNAME L_QSTRING",
"option : T_VERSION L_QSTRING",
"option : T_DIRECTORY L_QSTRING",
"option : T_NAMED_XFER L_QSTRING",
@@ -739,10 +779,14 @@ char *yyrule[] = {
"option : T_STATS_FILE L_QSTRING",
"option : T_MEMSTATS_FILE L_QSTRING",
"option : T_DUMP_FILE L_QSTRING",
+"option : T_PREFERRED_GLUE L_STRING",
"option : T_FAKE_IQUERY yea_or_nay",
"option : T_RECURSION yea_or_nay",
"option : T_FETCH_GLUE yea_or_nay",
+"option : T_HITCOUNT yea_or_nay",
+"option : T_NOTIFY T_EXPLICIT",
"option : T_NOTIFY yea_or_nay",
+"option : T_NOTIFY_INITIAL yea_or_nay",
"option : T_HOSTSTATS yea_or_nay",
"option : T_DEALLOC_ON_EXIT yea_or_nay",
"option : T_USE_IXFR yea_or_nay",
@@ -775,7 +819,8 @@ char *yyrule[] = {
"option : T_CLEAN_INTERVAL L_NUMBER",
"option : T_INTERFACE_INTERVAL L_NUMBER",
"option : T_STATS_INTERVAL L_NUMBER",
-"option : T_MAX_LOG_SIZE_IXFR L_NUMBER",
+"option : T_HOSTSTATSMAX L_NUMBER",
+"option : T_MAX_LOG_SIZE_IXFR size_spec",
"option : T_MAX_NCACHE_TTL L_NUMBER",
"option : T_LAME_TTL L_NUMBER",
"option : T_HEARTBEAT L_NUMBER",
@@ -789,6 +834,8 @@ char *yyrule[] = {
"controls : controls control L_EOS",
"control :",
"control : T_INET maybe_wild_addr T_PORT in_port T_ALLOW '{' address_match_list '}'",
+"control : T_INET maybe_wild_addr T_ALLOW '{' address_match_list '}' T_KEYS '{' dummy_key_list '}'",
+"control : T_INET maybe_wild_addr T_PORT in_port T_ALLOW '{' address_match_list '}' T_KEYS '{' dummy_key_list '}'",
"control : T_UNIX L_QSTRING T_PERM L_NUMBER T_OWNER L_NUMBER T_GROUP L_NUMBER",
"control : error",
"rrset_ordering_list : rrset_ordering_element L_EOS",
@@ -925,6 +972,10 @@ char *yyrule[] = {
"key_list : key_list_element L_EOS",
"key_list : key_list key_list_element L_EOS",
"key_list : error",
+"dummy_key_list_element : key_ref",
+"dummy_key_list : dummy_key_list_element L_EOS",
+"dummy_key_list : dummy_key_list dummy_key_list_element L_EOS",
+"dummy_key_list : error",
"$$8 :",
"key_stmt : T_SEC_KEY $$8 any_string '{' key_definition '}'",
"key_definition : algorithm_id secret",
@@ -960,7 +1011,8 @@ char *yyrule[] = {
"$$10 :",
"zone_option : T_FORWARDERS $$10 '{' opt_zone_forwarders_list '}'",
"zone_option : T_MAX_TRANSFER_TIME_IN L_NUMBER",
-"zone_option : T_MAX_LOG_SIZE_IXFR L_NUMBER",
+"zone_option : T_MAX_LOG_SIZE_IXFR size_spec",
+"zone_option : T_NOTIFY T_EXPLICIT",
"zone_option : T_NOTIFY yea_or_nay",
"zone_option : T_MAINTAIN_IXFR_BASE yea_or_nay",
"zone_option : T_PUBKEY L_NUMBER L_NUMBER L_NUMBER L_QSTRING",
@@ -971,6 +1023,7 @@ char *yyrule[] = {
"master_in_addr_list : master_in_addr L_EOS",
"master_in_addr_list : master_in_addr_list master_in_addr L_EOS",
"master_in_addr : L_IPADDR",
+"master_in_addr : L_IPADDR T_SEC_KEY key_ref",
"opt_notify_in_addr_list :",
"opt_notify_in_addr_list : notify_in_addr_list",
"notify_in_addr_list : notify_in_addr L_EOS",
@@ -1007,18 +1060,17 @@ char *yyrule[] = {
#define YYINITSTACKSIZE 200
int yydebug;
int yynerrs;
-struct yystack {
- short *ssp;
- YYSTYPE *vsp;
- short *ss;
- YYSTYPE *vs;
- int stacksize;
- short *sslim;
-};
-int yychar; /* some people use this, so we copy it in & out */
-int yyerrflag; /* must be global for yyerrok & YYRECOVERING */
+int yyerrflag;
+int yychar;
+short *yyssp;
+YYSTYPE *yyvsp;
+YYSTYPE yyval;
YYSTYPE yylval;
-#line 1776 "ns_parser.y"
+short *yyss;
+short *yysslim;
+YYSTYPE *yyvs;
+int yystacksize;
+#line 1857 "ns_parser.y"
static char *
canonical_name(char *name) {
@@ -1046,26 +1098,26 @@ init_acls() {
ime = new_ip_match_pattern(address, 0);
iml = new_ip_match_list();
add_to_ip_match_list(iml, ime);
- define_acl(savestr("any", 1), iml);
+ define_acl("any", iml);
/* ACL "none" */
ime = new_ip_match_pattern(address, 0);
ip_match_negate(ime);
iml = new_ip_match_list();
add_to_ip_match_list(iml, ime);
- define_acl(savestr("none", 1), iml);
+ define_acl("none", iml);
/* ACL "localhost" */
ime = new_ip_match_localhost();
iml = new_ip_match_list();
add_to_ip_match_list(iml, ime);
- define_acl(savestr("localhost", 1), iml);
+ define_acl("localhost", iml);
/* ACL "localnets" */
ime = new_ip_match_localnets();
iml = new_ip_match_list();
add_to_ip_match_list(iml, ime);
- define_acl(savestr("localnets", 1), iml);
+ define_acl("localnets", iml);
}
static void
@@ -1080,6 +1132,9 @@ free_sym_value(int type, void *value) {
case SYM_KEY:
free_key_info(value);
break;
+ case SYM_CHANNEL:
+ INSIST(log_free_channel(value) == 0);
+ break;
default:
ns_panic(ns_log_parser, 1,
"unhandled case in free_sym_value()");
@@ -1092,35 +1147,40 @@ static log_channel
lookup_channel(char *name) {
symbol_value value;
- if (lookup_symbol(symtab, name, SYM_CHANNEL, &value))
+ if (lookup_symbol(channeltab, name, SYM_CHANNEL, &value))
return ((log_channel)(value.pointer));
return (NULL);
}
static void
-define_channel(char *name, log_channel channel) {
+define_channel(const char *name, log_channel channel) {
symbol_value value;
value.pointer = channel;
- define_symbol(symtab, name, SYM_CHANNEL, value, SYMBOL_FREE_KEY);
+ INSIST(log_inc_references(channel) == 0);
+ define_symbol(channeltab, name, SYM_CHANNEL, value, SYMBOL_FREE_VALUE);
}
static void
define_builtin_channels() {
- define_channel(savestr("default_syslog", 1), syslog_channel);
- define_channel(savestr("default_debug", 1), debug_channel);
- define_channel(savestr("default_stderr", 1), stderr_channel);
- define_channel(savestr("null", 1), null_channel);
+ define_channel("default_syslog", syslog_channel);
+ define_channel("default_debug", debug_channel);
+ define_channel("default_stderr", stderr_channel);
+ define_channel("null", null_channel);
}
static void
parser_setup() {
seen_options = 0;
+ logged_options_error = 0;
seen_topology = 0;
symtab = new_symbol_table(SYMBOL_TABLE_SIZE, NULL);
if (authtab != NULL)
free_symbol_table(authtab);
authtab = new_symbol_table(AUTH_TABLE_SIZE, free_sym_value);
+ if (channeltab != NULL)
+ free_symbol_table(channeltab);
+ channeltab = new_symbol_table(AUTH_TABLE_SIZE, free_sym_value);
init_acls();
define_builtin_channels();
INIT_LIST(current_controls);
@@ -1142,7 +1202,7 @@ parser_cleanup() {
*/
ip_match_list
-lookup_acl(char *name) {
+lookup_acl(const char *name) {
symbol_value value;
if (lookup_symbol(authtab, name, SYM_ACL, &value))
@@ -1151,15 +1211,14 @@ lookup_acl(char *name) {
}
void
-define_acl(char *name, ip_match_list iml) {
+define_acl(const char *name, ip_match_list iml) {
symbol_value value;
INSIST(name != NULL);
INSIST(iml != NULL);
value.pointer = iml;
- define_symbol(authtab, name, SYM_ACL, value,
- SYMBOL_FREE_KEY|SYMBOL_FREE_VALUE);
+ define_symbol(authtab, name, SYM_ACL, value, SYMBOL_FREE_VALUE);
ns_debug(ns_log_parser, 7, "acl %s", name);
dprint_ip_match_list(ns_log_parser, iml, 2, "allow ", "deny ");
}
@@ -1174,7 +1233,7 @@ lookup_key(char *name) {
}
void
-define_key(char *name, struct dst_key *dst_key) {
+define_key(const char *name, struct dst_key *dst_key) {
symbol_value value;
INSIST(name != NULL);
@@ -1185,13 +1244,16 @@ define_key(char *name, struct dst_key *dst_key) {
dprint_key_info(dst_key);
}
-void
+time_t
parse_configuration(const char *filename) {
FILE *config_stream;
+ struct stat sb;
config_stream = fopen(filename, "r");
if (config_stream == NULL)
ns_panic(ns_log_parser, 0, "can't open '%s'", filename);
+ if (fstat(fileno(config_stream), &sb) == -1)
+ ns_panic(ns_log_parser, 0, "can't stat '%s'", filename);
lexer_setup();
parser_setup();
@@ -1199,6 +1261,7 @@ parse_configuration(const char *filename) {
(void)yyparse();
lexer_end_file();
parser_cleanup();
+ return (sb.st_mtime);
}
void
@@ -1210,78 +1273,51 @@ void
parser_shutdown(void) {
if (authtab != NULL)
free_symbol_table(authtab);
+ if (channeltab != NULL)
+ free_symbol_table(channeltab);
lexer_shutdown();
}
-#line 1216 "y.tab.c"
-/* allocate initial stack */
-#if defined(__STDC__) || defined(__cplusplus)
-static int yyinitstack(struct yystack *sp)
-#else
-static int yyinitstack(sp)
- struct yystack *sp;
-#endif
-{
- int newsize;
- short *newss;
- YYSTYPE *newvs;
-
- newsize = YYINITSTACKSIZE;
- newss = (short *)malloc(newsize * sizeof *newss);
- newvs = (YYSTYPE *)malloc(newsize * sizeof *newvs);
- sp->ss = sp->ssp = newss;
- sp->vs = sp->vsp = newvs;
- if (newss == NULL || newvs == NULL) return -1;
- sp->stacksize = newsize;
- sp->sslim = newss + newsize - 1;
- return 0;
-}
-
-/* double stack size, up to YYMAXDEPTH */
-#if defined(__STDC__) || defined(__cplusplus)
-static int yygrowstack(struct yystack *sp)
-#else
-static int yygrowstack(sp)
- struct yystack *sp;
-#endif
+#line 1279 "y.tab.c"
+/* allocate initial stack or double stack size, up to YYMAXDEPTH */
+static int yygrowstack()
{
int newsize, i;
short *newss;
YYSTYPE *newvs;
- if ((newsize = sp->stacksize) >= YYMAXDEPTH) return -1;
- if ((newsize *= 2) > YYMAXDEPTH) newsize = YYMAXDEPTH;
- i = sp->ssp - sp->ss;
- if ((newss = (short *)realloc(sp->ss, newsize * sizeof *newss)) == NULL)
+ if ((newsize = yystacksize) == 0)
+ newsize = YYINITSTACKSIZE;
+ else if (newsize >= YYMAXDEPTH)
return -1;
- sp->ss = newss;
- sp->ssp = newss + i;
- if ((newvs = (YYSTYPE *)realloc(sp->vs, newsize * sizeof *newvs)) == NULL)
+ else if ((newsize *= 2) > YYMAXDEPTH)
+ newsize = YYMAXDEPTH;
+ i = yyssp - yyss;
+ if ((newss = (short *)realloc(yyss, newsize * sizeof *newss)) == NULL)
return -1;
- sp->vs = newvs;
- sp->vsp = newvs + i;
- sp->stacksize = newsize;
- sp->sslim = newss + newsize - 1;
+ yyss = newss;
+ yyssp = newss + i;
+ if ((newvs = (YYSTYPE *)realloc(yyvs, newsize * sizeof *newvs)) == NULL)
+ return -1;
+ yyvs = newvs;
+ yyvsp = newvs + i;
+ yystacksize = newsize;
+ yysslim = yyss + newsize - 1;
return 0;
}
-#define YYFREESTACK(sp) { free((sp)->ss); free((sp)->vs); }
-
#define YYABORT goto yyabort
#define YYREJECT goto yyabort
#define YYACCEPT goto yyaccept
#define YYERROR goto yyerrlab
+
int
yyparse()
{
- register int yym, yyn, yystate, yych;
- register YYSTYPE *yyvsp;
- YYSTYPE yyval;
- struct yystack yystk;
+ register int yym, yyn, yystate;
#if YYDEBUG
- register char *yys;
- extern char *getenv();
+ register const char *yys;
- if (yys = getenv("YYDEBUG"))
+ if ((yys = getenv("YYDEBUG")))
{
yyn = *yys;
if (yyn >= '0' && yyn <= '9')
@@ -1291,57 +1327,60 @@ yyparse()
yynerrs = 0;
yyerrflag = 0;
- yychar = yych = YYEMPTY;
+ yychar = (-1);
- if (yyinitstack(&yystk)) goto yyoverflow;
- *yystk.ssp = yystate = 0;
+ if (yyss == NULL && yygrowstack()) goto yyoverflow;
+ yyssp = yyss;
+ yyvsp = yyvs;
+ *yyssp = yystate = 0;
yyloop:
- if (yyn = yydefred[yystate]) goto yyreduce;
- if (yych < 0)
+ if ((yyn = yydefred[yystate])) goto yyreduce;
+ if (yychar < 0)
{
- if ((yych = YYLEX) < 0) yych = 0;
- yychar = yych;
+ if ((yychar = yylex()) < 0) yychar = 0;
#if YYDEBUG
if (yydebug)
{
yys = 0;
- if (yych <= YYMAXTOKEN) yys = yyname[yych];
+ if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
if (!yys) yys = "illegal-symbol";
printf("%sdebug: state %d, reading %d (%s)\n",
- YYPREFIX, yystate, yych, yys);
+ YYPREFIX, yystate, yychar, yys);
}
#endif
}
- if ((yyn = yysindex[yystate]) && (yyn += yych) >= 0 &&
- yyn <= YYTABLESIZE && yycheck[yyn] == yych)
+ if ((yyn = yysindex[yystate]) && (yyn += yychar) >= 0 &&
+ yyn <= YYTABLESIZE && yycheck[yyn] == yychar)
{
#if YYDEBUG
if (yydebug)
printf("%sdebug: state %d, shifting to state %d\n",
YYPREFIX, yystate, yytable[yyn]);
#endif
- if (yystk.ssp >= yystk.sslim && yygrowstack(&yystk))
+ if (yyssp >= yysslim && yygrowstack())
+ {
goto yyoverflow;
- *++yystk.ssp = yystate = yytable[yyn];
- *++yystk.vsp = yylval;
- yychar = yych = YYEMPTY;
+ }
+ *++yyssp = yystate = yytable[yyn];
+ *++yyvsp = yylval;
+ yychar = (-1);
if (yyerrflag > 0) --yyerrflag;
goto yyloop;
}
- if ((yyn = yyrindex[yystate]) && (yyn += yych) >= 0 &&
- yyn <= YYTABLESIZE && yycheck[yyn] == yych)
+ if ((yyn = yyrindex[yystate]) && (yyn += yychar) >= 0 &&
+ yyn <= YYTABLESIZE && yycheck[yyn] == yychar)
{
yyn = yytable[yyn];
goto yyreduce;
}
if (yyerrflag) goto yyinrecovery;
-#ifdef lint
+#if defined(lint) || defined(__GNUC__)
goto yynewerror;
#endif
yynewerror:
yyerror("syntax error");
-#ifdef lint
+#if defined(lint) || defined(__GNUC__)
goto yyerrlab;
#endif
yyerrlab:
@@ -1352,19 +1391,20 @@ yyinrecovery:
yyerrflag = 3;
for (;;)
{
- if ((yyn = yysindex[*yystk.ssp]) &&
- (yyn += YYERRCODE) >= 0 &&
+ if ((yyn = yysindex[*yyssp]) && (yyn += YYERRCODE) >= 0 &&
yyn <= YYTABLESIZE && yycheck[yyn] == YYERRCODE)
{
#if YYDEBUG
if (yydebug)
printf("%sdebug: state %d, error recovery shifting\
- to state %d\n", YYPREFIX, *yystk.ssp, yytable[yyn]);
+ to state %d\n", YYPREFIX, *yyssp, yytable[yyn]);
#endif
- if (yystk.ssp >= yystk.sslim && yygrowstack(&yystk))
+ if (yyssp >= yysslim && yygrowstack())
+ {
goto yyoverflow;
- *++yystk.ssp = yystate = yytable[yyn];
- *++yystk.vsp = yylval;
+ }
+ *++yyssp = yystate = yytable[yyn];
+ *++yyvsp = yylval;
goto yyloop;
}
else
@@ -1372,28 +1412,28 @@ yyinrecovery:
#if YYDEBUG
if (yydebug)
printf("%sdebug: error recovery discarding state %d\n",
- YYPREFIX, *yystk.ssp);
+ YYPREFIX, *yyssp);
#endif
- if (yystk.ssp <= yystk.ss) goto yyabort;
- --yystk.ssp;
- --yystk.vsp;
+ if (yyssp <= yyss) goto yyabort;
+ --yyssp;
+ --yyvsp;
}
}
}
else
{
- if (yych == 0) goto yyabort;
+ if (yychar == 0) goto yyabort;
#if YYDEBUG
if (yydebug)
{
yys = 0;
- if (yych <= YYMAXTOKEN) yys = yyname[yych];
+ if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
if (!yys) yys = "illegal-symbol";
printf("%sdebug: state %d, error recovery discards token %d (%s)\n",
- YYPREFIX, yystate, yych, yys);
+ YYPREFIX, yystate, yychar, yys);
}
#endif
- yychar = yych = YYEMPTY;
+ yychar = (-1);
goto yyloop;
}
yyreduce:
@@ -1403,12 +1443,11 @@ yyreduce:
YYPREFIX, yystate, yyn, yyrule[yyn]);
#endif
yym = yylen[yyn];
- yyvsp = yystk.vsp; /* for speed in code under switch() */
yyval = yyvsp[1-yym];
switch (yyn)
{
case 1:
-#line 241 "ns_parser.y"
+#line 246 "ns_parser.y"
{
if (EMPTY(current_controls))
ns_ctl_defaults(&current_controls);
@@ -1416,11 +1455,14 @@ case 1:
}
break;
case 16:
-#line 266 "ns_parser.y"
-{ lexer_begin_file(yyvsp[-1].cp, NULL); }
+#line 272 "ns_parser.y"
+{
+ lexer_begin_file(yyvsp[-1].cp, NULL);
+ (void)freestr(yyvsp[-1].cp);
+ }
break;
case 17:
-#line 274 "ns_parser.y"
+#line 283 "ns_parser.y"
{
if (seen_options)
parser_error(0, "cannot redefine options");
@@ -1428,7 +1470,7 @@ case 17:
}
break;
case 18:
-#line 280 "ns_parser.y"
+#line 289 "ns_parser.y"
{
if (!seen_options)
set_options(current_options, 0);
@@ -1439,163 +1481,201 @@ case 18:
}
break;
case 22:
-#line 296 "ns_parser.y"
+#line 305 "ns_parser.y"
+{
+ if (current_options->hostname != NULL)
+ (void)freestr(current_options->hostname);
+ current_options->hostname = yyvsp[0].cp;
+ }
+break;
+case 23:
+#line 311 "ns_parser.y"
{
if (current_options->version != NULL)
- freestr(current_options->version);
+ (void)freestr(current_options->version);
current_options->version = yyvsp[0].cp;
}
break;
-case 23:
-#line 302 "ns_parser.y"
+case 24:
+#line 317 "ns_parser.y"
{
if (current_options->directory != NULL)
- freestr(current_options->directory);
+ (void)freestr(current_options->directory);
current_options->directory = yyvsp[0].cp;
}
break;
-case 24:
-#line 308 "ns_parser.y"
+case 25:
+#line 323 "ns_parser.y"
{
if (current_options->named_xfer != NULL)
- freestr(current_options->named_xfer);
+ (void)freestr(current_options->named_xfer);
current_options->named_xfer = yyvsp[0].cp;
}
break;
-case 25:
-#line 314 "ns_parser.y"
+case 26:
+#line 329 "ns_parser.y"
{
if (current_options->pid_filename != NULL)
- freestr(current_options->pid_filename);
+ (void)freestr(current_options->pid_filename);
current_options->pid_filename = yyvsp[0].cp;
}
break;
-case 26:
-#line 320 "ns_parser.y"
+case 27:
+#line 335 "ns_parser.y"
{
if (current_options->stats_filename != NULL)
- freestr(current_options->stats_filename);
+ (void)freestr(current_options->stats_filename);
current_options->stats_filename = yyvsp[0].cp;
}
break;
-case 27:
-#line 326 "ns_parser.y"
+case 28:
+#line 341 "ns_parser.y"
{
if (current_options->memstats_filename != NULL)
- freestr(current_options->memstats_filename);
+ (void)freestr(current_options->memstats_filename);
current_options->memstats_filename = yyvsp[0].cp;
}
break;
-case 28:
-#line 332 "ns_parser.y"
+case 29:
+#line 347 "ns_parser.y"
{
if (current_options->dump_filename != NULL)
- freestr(current_options->dump_filename);
+ (void)freestr(current_options->dump_filename);
current_options->dump_filename = yyvsp[0].cp;
}
break;
-case 29:
-#line 338 "ns_parser.y"
+case 30:
+#line 353 "ns_parser.y"
+{
+ current_options->preferred_glue =
+ strcasecmp(yyvsp[0].cp, "aaaa") ? T_A : T_AAAA;
+ }
+break;
+case 31:
+#line 358 "ns_parser.y"
{
set_global_boolean_option(current_options,
OPTION_FAKE_IQUERY, yyvsp[0].num);
}
break;
-case 30:
-#line 343 "ns_parser.y"
+case 32:
+#line 363 "ns_parser.y"
{
set_global_boolean_option(current_options,
OPTION_NORECURSE, !yyvsp[0].num);
}
break;
-case 31:
-#line 348 "ns_parser.y"
+case 33:
+#line 368 "ns_parser.y"
{
set_global_boolean_option(current_options,
OPTION_NOFETCHGLUE, !yyvsp[0].num);
}
break;
-case 32:
-#line 353 "ns_parser.y"
+case 34:
+#line 373 "ns_parser.y"
{
set_global_boolean_option(current_options,
- OPTION_NONOTIFY, !yyvsp[0].num);
+ OPTION_HITCOUNT, yyvsp[0].num);
}
break;
-case 33:
-#line 358 "ns_parser.y"
+case 35:
+#line 378 "ns_parser.y"
+{
+ current_options->notify = notify_explicit;
+ }
+break;
+case 36:
+#line 382 "ns_parser.y"
+{
+ if (yyvsp[0].num)
+ current_options->notify = notify_yes;
+ else
+ current_options->notify = notify_no;
+ }
+break;
+case 37:
+#line 389 "ns_parser.y"
+{
+ if (initial_configuration && yyvsp[0].num)
+ ns_notice(ns_log_default,
+ "suppressing initial notifies");
+ set_global_boolean_option(current_options,
+ OPTION_SUPNOTIFY_INITIAL, yyvsp[0].num);
+ }
+break;
+case 38:
+#line 397 "ns_parser.y"
{
set_global_boolean_option(current_options,
OPTION_HOSTSTATS, yyvsp[0].num);
}
break;
-case 34:
-#line 363 "ns_parser.y"
+case 39:
+#line 402 "ns_parser.y"
{
set_global_boolean_option(current_options,
OPTION_DEALLOC_ON_EXIT, yyvsp[0].num);
}
break;
-case 35:
-#line 368 "ns_parser.y"
+case 40:
+#line 407 "ns_parser.y"
{
set_global_boolean_option(current_options, OPTION_USE_IXFR, yyvsp[0].num);
}
break;
-case 36:
-#line 372 "ns_parser.y"
+case 41:
+#line 411 "ns_parser.y"
{
set_global_boolean_option(current_options,
OPTION_MAINTAIN_IXFR_BASE, yyvsp[0].num);
}
break;
-case 37:
-#line 377 "ns_parser.y"
+case 42:
+#line 416 "ns_parser.y"
{
set_global_boolean_option(current_options,
- OPTION_MAINTAIN_IXFR_BASE, yyvsp[0].num);
- set_global_boolean_option(current_options,
OPTION_NORFC2308_TYPE1, yyvsp[0].num);
set_global_boolean_option(current_options,
OPTION_NONAUTH_NXDOMAIN, !yyvsp[0].num);
}
break;
-case 38:
-#line 386 "ns_parser.y"
+case 43:
+#line 423 "ns_parser.y"
{
set_global_boolean_option(current_options, OPTION_NONAUTH_NXDOMAIN,
!yyvsp[0].num);
}
break;
-case 39:
-#line 391 "ns_parser.y"
+case 44:
+#line 428 "ns_parser.y"
{
set_global_boolean_option(current_options,
OPTION_MULTIPLE_CNAMES, yyvsp[0].num);
}
break;
-case 40:
-#line 396 "ns_parser.y"
+case 45:
+#line 433 "ns_parser.y"
{
current_options->check_names[yyvsp[-1].s_int] = (enum severity)yyvsp[0].s_int;
}
break;
-case 41:
-#line 400 "ns_parser.y"
+case 46:
+#line 437 "ns_parser.y"
{
set_global_boolean_option(current_options,
OPTION_USE_ID_POOL, yyvsp[0].num);
}
break;
-case 42:
-#line 405 "ns_parser.y"
+case 47:
+#line 442 "ns_parser.y"
{
set_global_boolean_option(current_options,
OPTION_NORFC2308_TYPE1, !yyvsp[0].num);
}
break;
-case 43:
-#line 410 "ns_parser.y"
+case 48:
+#line 447 "ns_parser.y"
{
char port_string[10];
symbol_value value;
@@ -1608,14 +1688,13 @@ case 43:
else {
add_listen_on(current_options, yyvsp[-3].us_int, yyvsp[-1].iml);
value.pointer = NULL;
- define_symbol(symtab, savestr(port_string, 1),
- SYM_PORT, value, SYMBOL_FREE_KEY);
+ define_symbol(symtab, port_string, SYM_PORT, value, 0);
}
}
break;
-case 45:
-#line 429 "ns_parser.y"
+case 50:
+#line 465 "ns_parser.y"
{
if (current_options->fwdtab) {
free_forwarders(current_options->fwdtab);
@@ -1623,14 +1702,14 @@ case 45:
}
}
break;
-case 48:
-#line 438 "ns_parser.y"
+case 53:
+#line 474 "ns_parser.y"
{
current_options->axfr_src = yyvsp[0].ip_addr;
}
break;
-case 49:
-#line 442 "ns_parser.y"
+case 54:
+#line 478 "ns_parser.y"
{
if (current_options->query_acl) {
parser_warning(0,
@@ -1640,8 +1719,8 @@ case 49:
current_options->query_acl = yyvsp[-1].iml;
}
break;
-case 50:
-#line 451 "ns_parser.y"
+case 55:
+#line 487 "ns_parser.y"
{
if (current_options->recursion_acl) {
parser_warning(0,
@@ -1651,8 +1730,8 @@ case 50:
current_options->recursion_acl = yyvsp[-1].iml;
}
break;
-case 51:
-#line 460 "ns_parser.y"
+case 56:
+#line 496 "ns_parser.y"
{
if (current_options->transfer_acl) {
parser_warning(0,
@@ -1662,8 +1741,8 @@ case 51:
current_options->transfer_acl = yyvsp[-1].iml;
}
break;
-case 52:
-#line 469 "ns_parser.y"
+case 57:
+#line 505 "ns_parser.y"
{
if (current_options->sortlist) {
parser_warning(0,
@@ -1673,8 +1752,8 @@ case 52:
current_options->sortlist = yyvsp[-1].iml;
}
break;
-case 53:
-#line 478 "ns_parser.y"
+case 58:
+#line 514 "ns_parser.y"
{
if (current_options->also_notify) {
parser_warning(0,
@@ -1684,8 +1763,8 @@ case 53:
}
}
break;
-case 55:
-#line 488 "ns_parser.y"
+case 60:
+#line 524 "ns_parser.y"
{
if (current_options->blackhole_acl) {
parser_warning(0,
@@ -1695,8 +1774,8 @@ case 55:
current_options->blackhole_acl = yyvsp[-1].iml;
}
break;
-case 56:
-#line 497 "ns_parser.y"
+case 61:
+#line 533 "ns_parser.y"
{
if (current_options->topology) {
parser_warning(0,
@@ -1706,115 +1785,138 @@ case 56:
current_options->topology = yyvsp[-1].iml;
}
break;
-case 57:
-#line 506 "ns_parser.y"
+case 62:
+#line 542 "ns_parser.y"
{
/* To get around the $$ = $1 default rule. */
}
break;
-case 59:
-#line 511 "ns_parser.y"
+case 64:
+#line 547 "ns_parser.y"
{
current_options->transfer_format = yyvsp[0].axfr_fmt;
}
break;
-case 60:
-#line 515 "ns_parser.y"
+case 65:
+#line 551 "ns_parser.y"
{
current_options->max_transfer_time_in = yyvsp[0].num * 60;
}
break;
-case 61:
-#line 519 "ns_parser.y"
+case 66:
+#line 555 "ns_parser.y"
{
current_options->serial_queries = yyvsp[0].num;
}
break;
-case 62:
-#line 523 "ns_parser.y"
+case 67:
+#line 559 "ns_parser.y"
{
current_options->clean_interval = yyvsp[0].num * 60;
}
break;
-case 63:
-#line 527 "ns_parser.y"
+case 68:
+#line 563 "ns_parser.y"
{
current_options->interface_interval = yyvsp[0].num * 60;
}
break;
-case 64:
-#line 531 "ns_parser.y"
+case 69:
+#line 567 "ns_parser.y"
{
current_options->stats_interval = yyvsp[0].num * 60;
}
break;
-case 65:
-#line 535 "ns_parser.y"
+case 70:
+#line 571 "ns_parser.y"
{
- current_options->max_log_size_ixfr = yyvsp[0].num;
+ current_options->max_host_stats = yyvsp[0].num;
}
break;
-case 66:
-#line 539 "ns_parser.y"
+case 71:
+#line 575 "ns_parser.y"
+{
+ current_options->max_log_size_ixfr = yyvsp[0].ul_int;
+ }
+break;
+case 72:
+#line 579 "ns_parser.y"
{
current_options->max_ncache_ttl = yyvsp[0].num;
}
break;
-case 67:
-#line 543 "ns_parser.y"
+case 73:
+#line 583 "ns_parser.y"
{
current_options->lame_ttl = yyvsp[0].num;
}
break;
-case 68:
-#line 547 "ns_parser.y"
+case 74:
+#line 587 "ns_parser.y"
{
current_options->heartbeat_interval = yyvsp[0].num * 60;
}
break;
-case 69:
-#line 551 "ns_parser.y"
+case 75:
+#line 591 "ns_parser.y"
{
set_global_boolean_option(current_options,
OPTION_NODIALUP, !yyvsp[0].num);
}
break;
-case 70:
-#line 556 "ns_parser.y"
+case 76:
+#line 596 "ns_parser.y"
{
if (current_options->ordering)
free_rrset_order_list(current_options->ordering);
current_options->ordering = yyvsp[-1].rol;
}
break;
-case 71:
-#line 562 "ns_parser.y"
+case 77:
+#line 602 "ns_parser.y"
{
set_global_boolean_option(current_options,
OPTION_TREAT_CR_AS_SPACE, yyvsp[0].num);
}
break;
-case 72:
-#line 567 "ns_parser.y"
+case 78:
+#line 607 "ns_parser.y"
{
if (yyvsp[0].num >= 1)
current_options->minroots = yyvsp[0].num;
}
break;
-case 78:
-#line 587 "ns_parser.y"
+case 84:
+#line 627 "ns_parser.y"
{
ns_ctl_add(&current_controls, ns_ctl_new_inet(yyvsp[-6].ip_addr, yyvsp[-4].us_int, yyvsp[-1].iml));
}
break;
-case 79:
-#line 591 "ns_parser.y"
+case 85:
+#line 633 "ns_parser.y"
{
+ parser_warning(0, "Ignoring BIND 9 inet control clause");
+ free_ip_match_list(yyvsp[-5].iml);
+ }
+break;
+case 86:
+#line 640 "ns_parser.y"
+{
+ parser_warning(0, "Ignoring BIND 9 inet control clause");
+ free_ip_match_list(yyvsp[-5].iml);
+ }
+break;
+case 87:
+#line 645 "ns_parser.y"
+{
+#ifndef NO_SOCKADDR_UN
ns_ctl_add(&current_controls, ns_ctl_new_unix(yyvsp[-6].cp, yyvsp[-4].num, yyvsp[-2].num, yyvsp[0].num));
+#endif
+ freestr(yyvsp[-6].cp);
}
break;
-case 81:
-#line 598 "ns_parser.y"
+case 89:
+#line 655 "ns_parser.y"
{
rrset_order_list rol;
@@ -1826,8 +1928,8 @@ case 81:
yyval.rol = rol;
}
break;
-case 82:
-#line 609 "ns_parser.y"
+case 90:
+#line 666 "ns_parser.y"
{
if (yyvsp[-1].roe != NULL) {
add_to_rrset_order_list(yyvsp[-2].rol, yyvsp[-1].roe);
@@ -1835,14 +1937,14 @@ case 82:
yyval.rol = yyvsp[-2].rol;
}
break;
-case 83:
-#line 618 "ns_parser.y"
+case 91:
+#line 675 "ns_parser.y"
{
yyval.s_int = C_ANY;
}
break;
-case 84:
-#line 622 "ns_parser.y"
+case 92:
+#line 679 "ns_parser.y"
{
symbol_value value;
@@ -1852,17 +1954,17 @@ case 84:
parser_error(0, "unknown class '%s'; using ANY", yyvsp[0].cp);
yyval.s_int = C_ANY;
}
- freestr(yyvsp[0].cp);
+ (void)freestr(yyvsp[0].cp);
}
break;
-case 85:
-#line 636 "ns_parser.y"
+case 93:
+#line 693 "ns_parser.y"
{
yyval.s_int = ns_t_any;
}
break;
-case 86:
-#line 640 "ns_parser.y"
+case 94:
+#line 697 "ns_parser.y"
{
int success;
@@ -1877,29 +1979,29 @@ case 86:
yyvsp[0].cp);
}
}
- freestr(yyvsp[0].cp);
+ (void)freestr(yyvsp[0].cp);
}
break;
-case 87:
-#line 658 "ns_parser.y"
+case 95:
+#line 715 "ns_parser.y"
{
yyval.cp = savestr("*", 1);
}
break;
-case 88:
-#line 662 "ns_parser.y"
+case 96:
+#line 719 "ns_parser.y"
{
if (strcmp(".",yyvsp[0].cp) == 0 || strcmp("*.",yyvsp[0].cp) == 0) {
yyval.cp = savestr("*", 1);
- freestr(yyvsp[0].cp);
+ (void)freestr(yyvsp[0].cp);
} else {
yyval.cp = yyvsp[0].cp ;
}
/* XXX Should do any more name validation here? */
}
break;
-case 89:
-#line 674 "ns_parser.y"
+case 97:
+#line 731 "ns_parser.y"
{
enum ordering o;
@@ -1915,94 +2017,94 @@ case 89:
yyvsp[0].cp, p_order(o));
}
- freestr(yyvsp[0].cp);
+ (void)freestr(yyvsp[0].cp);
yyval.roe = new_rrset_order_element(yyvsp[-4].s_int, yyvsp[-3].s_int, yyvsp[-2].cp, o);
}
}
break;
-case 90:
-#line 697 "ns_parser.y"
+case 98:
+#line 754 "ns_parser.y"
{
yyval.axfr_fmt = axfr_one_answer;
}
break;
-case 91:
-#line 701 "ns_parser.y"
+case 99:
+#line 758 "ns_parser.y"
{
yyval.axfr_fmt = axfr_many_answers;
}
break;
-case 92:
-#line 706 "ns_parser.y"
+case 100:
+#line 763 "ns_parser.y"
{ yyval.ip_addr = yyvsp[0].ip_addr; }
break;
-case 93:
-#line 707 "ns_parser.y"
+case 101:
+#line 764 "ns_parser.y"
{ yyval.ip_addr.s_addr = htonl(INADDR_ANY); }
break;
-case 94:
-#line 710 "ns_parser.y"
+case 102:
+#line 767 "ns_parser.y"
{ yyval.us_int = yyvsp[0].us_int; }
break;
-case 95:
-#line 711 "ns_parser.y"
+case 103:
+#line 768 "ns_parser.y"
{ yyval.us_int = htons(0); }
break;
-case 96:
-#line 715 "ns_parser.y"
+case 104:
+#line 772 "ns_parser.y"
{
current_options->query_source.sin_addr = yyvsp[0].ip_addr;
}
break;
-case 97:
-#line 721 "ns_parser.y"
+case 105:
+#line 778 "ns_parser.y"
{
current_options->query_source.sin_port = yyvsp[0].us_int;
}
break;
-case 102:
-#line 732 "ns_parser.y"
+case 110:
+#line 789 "ns_parser.y"
{ yyval.us_int = htons(NS_DEFAULTPORT); }
break;
-case 103:
-#line 733 "ns_parser.y"
+case 111:
+#line 790 "ns_parser.y"
{ yyval.us_int = yyvsp[0].us_int; }
break;
-case 104:
-#line 736 "ns_parser.y"
+case 112:
+#line 793 "ns_parser.y"
{ yyval.us_int = htons(0); }
break;
-case 105:
-#line 737 "ns_parser.y"
+case 113:
+#line 794 "ns_parser.y"
{ yyval.us_int = yyvsp[0].us_int; }
break;
-case 106:
-#line 742 "ns_parser.y"
+case 114:
+#line 799 "ns_parser.y"
{
yyval.num = 1;
}
break;
-case 107:
-#line 746 "ns_parser.y"
+case 115:
+#line 803 "ns_parser.y"
{
yyval.num = 1;
}
break;
-case 108:
-#line 750 "ns_parser.y"
+case 116:
+#line 807 "ns_parser.y"
{
yyval.num = 0;
}
break;
-case 109:
-#line 754 "ns_parser.y"
+case 117:
+#line 811 "ns_parser.y"
{
yyval.num = 0;
}
break;
-case 110:
-#line 758 "ns_parser.y"
+case 118:
+#line 815 "ns_parser.y"
{
if (yyvsp[0].num == 1 || yyvsp[0].num == 0) {
yyval.num = yyvsp[0].num;
@@ -2013,94 +2115,94 @@ case 110:
}
}
break;
-case 111:
-#line 770 "ns_parser.y"
+case 119:
+#line 827 "ns_parser.y"
{
yyval.s_int = primary_trans;
}
break;
-case 112:
-#line 774 "ns_parser.y"
+case 120:
+#line 831 "ns_parser.y"
{
yyval.s_int = secondary_trans;
}
break;
-case 113:
-#line 778 "ns_parser.y"
+case 121:
+#line 835 "ns_parser.y"
{
yyval.s_int = response_trans;
}
break;
-case 114:
-#line 784 "ns_parser.y"
+case 122:
+#line 841 "ns_parser.y"
{
yyval.s_int = warn;
}
break;
-case 115:
-#line 788 "ns_parser.y"
+case 123:
+#line 845 "ns_parser.y"
{
yyval.s_int = fail;
}
break;
-case 116:
-#line 792 "ns_parser.y"
+case 124:
+#line 849 "ns_parser.y"
{
yyval.s_int = ignore;
}
break;
-case 117:
-#line 798 "ns_parser.y"
+case 125:
+#line 855 "ns_parser.y"
{
set_global_boolean_option(current_options,
OPTION_FORWARD_ONLY, 1);
}
break;
-case 118:
-#line 803 "ns_parser.y"
+case 126:
+#line 860 "ns_parser.y"
{
set_global_boolean_option(current_options,
OPTION_FORWARD_ONLY, 0);
}
break;
-case 119:
-#line 808 "ns_parser.y"
+case 127:
+#line 865 "ns_parser.y"
{
parser_warning(0, "forward if-no-answer is unimplemented");
}
break;
-case 120:
-#line 812 "ns_parser.y"
+case 128:
+#line 869 "ns_parser.y"
{
parser_warning(0, "forward if-no-domain is unimplemented");
}
break;
-case 121:
-#line 818 "ns_parser.y"
+case 129:
+#line 875 "ns_parser.y"
{
current_options->data_size = yyvsp[0].ul_int;
}
break;
-case 122:
-#line 822 "ns_parser.y"
+case 130:
+#line 879 "ns_parser.y"
{
current_options->stack_size = yyvsp[0].ul_int;
}
break;
-case 123:
-#line 826 "ns_parser.y"
+case 131:
+#line 883 "ns_parser.y"
{
current_options->core_size = yyvsp[0].ul_int;
}
break;
-case 124:
-#line 830 "ns_parser.y"
+case 132:
+#line 887 "ns_parser.y"
{
current_options->files = yyvsp[0].ul_int;
}
break;
-case 125:
-#line 836 "ns_parser.y"
+case 133:
+#line 893 "ns_parser.y"
{
u_long result;
@@ -2111,116 +2213,115 @@ case 125:
/* 0 means "use default" */
yyval.ul_int = 0;
}
- freestr(yyvsp[0].cp);
+ (void)freestr(yyvsp[0].cp);
}
break;
-case 126:
-#line 849 "ns_parser.y"
+case 134:
+#line 906 "ns_parser.y"
{
yyval.ul_int = (u_long)yyvsp[0].num;
}
break;
-case 127:
-#line 853 "ns_parser.y"
+case 135:
+#line 910 "ns_parser.y"
{
yyval.ul_int = 0;
}
break;
-case 128:
-#line 857 "ns_parser.y"
+case 136:
+#line 914 "ns_parser.y"
{
yyval.ul_int = ULONG_MAX;
}
break;
-case 129:
-#line 863 "ns_parser.y"
+case 137:
+#line 920 "ns_parser.y"
{
current_options->transfers_in = (u_long) yyvsp[0].num;
}
break;
-case 130:
-#line 867 "ns_parser.y"
+case 138:
+#line 924 "ns_parser.y"
{
current_options->transfers_out = (u_long) yyvsp[0].num;
}
break;
-case 131:
-#line 871 "ns_parser.y"
+case 139:
+#line 928 "ns_parser.y"
{
current_options->transfers_per_ns = (u_long) yyvsp[0].num;
}
break;
-case 134:
-#line 881 "ns_parser.y"
+case 142:
+#line 938 "ns_parser.y"
{
/* nothing */
}
break;
-case 135:
-#line 885 "ns_parser.y"
+case 143:
+#line 942 "ns_parser.y"
{
/* nothing */
}
break;
-case 136:
-#line 891 "ns_parser.y"
+case 144:
+#line 948 "ns_parser.y"
{
add_global_forwarder(current_options, yyvsp[0].ip_addr);
}
break;
-case 139:
-#line 901 "ns_parser.y"
+case 147:
+#line 958 "ns_parser.y"
{
/* nothing */
}
break;
-case 140:
-#line 905 "ns_parser.y"
+case 148:
+#line 962 "ns_parser.y"
{
/* nothing */
}
break;
-case 141:
-#line 911 "ns_parser.y"
+case 149:
+#line 968 "ns_parser.y"
{
add_global_also_notify(current_options, yyvsp[0].ip_addr);
}
break;
-case 142:
-#line 921 "ns_parser.y"
+case 150:
+#line 978 "ns_parser.y"
{
current_logging = begin_logging();
}
break;
-case 143:
-#line 925 "ns_parser.y"
+case 151:
+#line 982 "ns_parser.y"
{
end_logging(current_logging, 1);
current_logging = NULL;
}
break;
-case 147:
-#line 937 "ns_parser.y"
+case 155:
+#line 994 "ns_parser.y"
{
current_category = yyvsp[0].s_int;
}
break;
-case 149:
-#line 942 "ns_parser.y"
+case 157:
+#line 999 "ns_parser.y"
{
chan_type = log_null;
chan_flags = 0;
chan_level = log_info;
}
break;
-case 150:
-#line 948 "ns_parser.y"
+case 158:
+#line 1005 "ns_parser.y"
{
log_channel current_channel = NULL;
if (lookup_channel(yyvsp[-4].cp) != NULL) {
parser_error(0, "can't redefine channel '%s'", yyvsp[-4].cp);
- freestr(yyvsp[-4].cp);
} else {
switch (chan_type) {
case log_file:
@@ -2230,8 +2331,9 @@ case 150:
chan_name, NULL,
chan_versions,
chan_max_size);
- freestr(chan_name);
- chan_name = NULL;
+ log_set_file_owner(current_channel,
+ user_id, group_id);
+ chan_name = freestr(chan_name);
break;
case log_syslog:
current_channel =
@@ -2252,10 +2354,11 @@ case 150:
"couldn't create channel");
define_channel(yyvsp[-4].cp, current_channel);
}
+ (void)freestr(yyvsp[-4].cp);
}
break;
-case 151:
-#line 989 "ns_parser.y"
+case 159:
+#line 1047 "ns_parser.y"
{
symbol_value value;
@@ -2265,87 +2368,87 @@ case 151:
parser_error(0, "unknown severity '%s'", yyvsp[0].cp);
chan_level = log_debug(99);
}
- freestr(yyvsp[0].cp);
+ (void)freestr(yyvsp[0].cp);
}
break;
-case 152:
-#line 1001 "ns_parser.y"
+case 160:
+#line 1059 "ns_parser.y"
{
chan_level = log_debug(1);
}
break;
-case 153:
-#line 1005 "ns_parser.y"
+case 161:
+#line 1063 "ns_parser.y"
{
chan_level = yyvsp[0].num;
}
break;
-case 154:
-#line 1009 "ns_parser.y"
+case 162:
+#line 1067 "ns_parser.y"
{
chan_level = 0;
chan_flags |= LOG_USE_CONTEXT_LEVEL|LOG_REQUIRE_DEBUG;
}
break;
-case 155:
-#line 1016 "ns_parser.y"
+case 163:
+#line 1074 "ns_parser.y"
{
chan_versions = yyvsp[0].num;
}
break;
-case 156:
-#line 1020 "ns_parser.y"
+case 164:
+#line 1078 "ns_parser.y"
{
chan_versions = LOG_MAX_VERSIONS;
}
break;
-case 157:
-#line 1026 "ns_parser.y"
+case 165:
+#line 1084 "ns_parser.y"
{
chan_max_size = yyvsp[0].ul_int;
}
break;
-case 158:
-#line 1032 "ns_parser.y"
+case 166:
+#line 1090 "ns_parser.y"
{
chan_versions = 0;
chan_max_size = ULONG_MAX;
}
break;
-case 159:
-#line 1037 "ns_parser.y"
+case 167:
+#line 1095 "ns_parser.y"
{
chan_max_size = ULONG_MAX;
}
break;
-case 160:
-#line 1041 "ns_parser.y"
+case 168:
+#line 1099 "ns_parser.y"
{
chan_versions = 0;
}
break;
-case 163:
-#line 1049 "ns_parser.y"
+case 171:
+#line 1107 "ns_parser.y"
{
chan_flags |= LOG_CLOSE_STREAM;
chan_type = log_file;
chan_name = yyvsp[-1].cp;
}
break;
-case 164:
-#line 1057 "ns_parser.y"
+case 172:
+#line 1115 "ns_parser.y"
{ yyval.cp = yyvsp[0].cp; }
break;
-case 165:
-#line 1058 "ns_parser.y"
+case 173:
+#line 1116 "ns_parser.y"
{ yyval.cp = savestr("syslog", 1); }
break;
-case 166:
-#line 1061 "ns_parser.y"
+case 174:
+#line 1119 "ns_parser.y"
{ yyval.s_int = LOG_DAEMON; }
break;
-case 167:
-#line 1063 "ns_parser.y"
+case 175:
+#line 1121 "ns_parser.y"
{
symbol_value value;
@@ -2355,36 +2458,36 @@ case 167:
parser_error(0, "unknown facility '%s'", yyvsp[0].cp);
yyval.s_int = LOG_DAEMON;
}
- freestr(yyvsp[0].cp);
+ (void)freestr(yyvsp[0].cp);
}
break;
-case 168:
-#line 1077 "ns_parser.y"
+case 176:
+#line 1135 "ns_parser.y"
{
chan_type = log_syslog;
chan_facility = yyvsp[0].s_int;
}
break;
-case 169:
-#line 1083 "ns_parser.y"
+case 177:
+#line 1141 "ns_parser.y"
{ /* nothing to do */ }
break;
-case 170:
-#line 1084 "ns_parser.y"
+case 178:
+#line 1142 "ns_parser.y"
{ /* nothing to do */ }
break;
-case 171:
-#line 1086 "ns_parser.y"
+case 179:
+#line 1144 "ns_parser.y"
{
chan_type = log_null;
}
break;
-case 172:
-#line 1089 "ns_parser.y"
+case 180:
+#line 1147 "ns_parser.y"
{ /* nothing to do */ }
break;
-case 173:
-#line 1091 "ns_parser.y"
+case 181:
+#line 1149 "ns_parser.y"
{
if (yyvsp[0].num)
chan_flags |= LOG_TIMESTAMP;
@@ -2392,8 +2495,8 @@ case 173:
chan_flags &= ~LOG_TIMESTAMP;
}
break;
-case 174:
-#line 1098 "ns_parser.y"
+case 182:
+#line 1156 "ns_parser.y"
{
if (yyvsp[0].num)
chan_flags |= LOG_PRINT_CATEGORY;
@@ -2401,8 +2504,8 @@ case 174:
chan_flags &= ~LOG_PRINT_CATEGORY;
}
break;
-case 175:
-#line 1105 "ns_parser.y"
+case 183:
+#line 1163 "ns_parser.y"
{
if (yyvsp[0].num)
chan_flags |= LOG_PRINT_LEVEL;
@@ -2410,15 +2513,14 @@ case 175:
chan_flags &= ~LOG_PRINT_LEVEL;
}
break;
-case 180:
-#line 1119 "ns_parser.y"
+case 188:
+#line 1177 "ns_parser.y"
{ yyval.cp = savestr("null", 1); }
break;
-case 181:
-#line 1123 "ns_parser.y"
+case 189:
+#line 1181 "ns_parser.y"
{
log_channel channel;
- symbol_value value;
if (current_category >= 0) {
channel = lookup_channel(yyvsp[0].cp);
@@ -2428,19 +2530,19 @@ case 181:
} else
parser_error(0, "unknown channel '%s'", yyvsp[0].cp);
}
- freestr(yyvsp[0].cp);
+ (void)freestr(yyvsp[0].cp);
}
break;
-case 186:
-#line 1145 "ns_parser.y"
+case 194:
+#line 1202 "ns_parser.y"
{ yyval.cp = savestr("default", 1); }
break;
-case 187:
-#line 1146 "ns_parser.y"
+case 195:
+#line 1203 "ns_parser.y"
{ yyval.cp = savestr("notify", 1); }
break;
-case 188:
-#line 1150 "ns_parser.y"
+case 196:
+#line 1207 "ns_parser.y"
{
symbol_value value;
@@ -2451,11 +2553,11 @@ case 188:
yyvsp[0].cp);
yyval.s_int = -1;
}
- freestr(yyvsp[0].cp);
+ (void)freestr(yyvsp[0].cp);
}
break;
-case 189:
-#line 1169 "ns_parser.y"
+case 197:
+#line 1226 "ns_parser.y"
{
const char *ip_printable;
symbol_value value;
@@ -2470,44 +2572,43 @@ case 189:
parser_error(0, "cannot redefine server '%s'",
ip_printable);
else
- define_symbol(symtab, savestr(ip_printable, 1),
- SYM_SERVER, value,
- SYMBOL_FREE_KEY);
+ define_symbol(symtab, ip_printable, SYM_SERVER, value,
+ 0);
current_server = begin_server(yyvsp[0].ip_addr);
}
break;
-case 190:
-#line 1189 "ns_parser.y"
+case 198:
+#line 1245 "ns_parser.y"
{
end_server(current_server, !seen_server);
}
break;
-case 193:
-#line 1199 "ns_parser.y"
+case 201:
+#line 1255 "ns_parser.y"
{
set_server_option(current_server, SERVER_INFO_BOGUS, yyvsp[0].num);
}
break;
-case 194:
-#line 1203 "ns_parser.y"
+case 202:
+#line 1259 "ns_parser.y"
{
set_server_option(current_server, SERVER_INFO_SUPPORT_IXFR, yyvsp[0].num);
}
break;
-case 195:
-#line 1207 "ns_parser.y"
+case 203:
+#line 1263 "ns_parser.y"
{
set_server_transfers(current_server, (int)yyvsp[0].num);
}
break;
-case 196:
-#line 1211 "ns_parser.y"
+case 204:
+#line 1267 "ns_parser.y"
{
set_server_transfer_format(current_server, yyvsp[0].axfr_fmt);
}
break;
-case 199:
-#line 1223 "ns_parser.y"
+case 207:
+#line 1279 "ns_parser.y"
{
ip_match_list iml;
@@ -2517,24 +2618,24 @@ case 199:
yyval.iml = iml;
}
break;
-case 200:
-#line 1232 "ns_parser.y"
+case 208:
+#line 1288 "ns_parser.y"
{
if (yyvsp[-1].ime != NULL)
add_to_ip_match_list(yyvsp[-2].iml, yyvsp[-1].ime);
yyval.iml = yyvsp[-2].iml;
}
break;
-case 202:
-#line 1241 "ns_parser.y"
+case 210:
+#line 1297 "ns_parser.y"
{
if (yyvsp[0].ime != NULL)
ip_match_negate(yyvsp[0].ime);
yyval.ime = yyvsp[0].ime;
}
break;
-case 203:
-#line 1247 "ns_parser.y"
+case 211:
+#line 1303 "ns_parser.y"
{
char *key_name;
struct dst_key *dst_key;
@@ -2552,16 +2653,18 @@ case 203:
}
else
yyval.ime = new_ip_match_key(dst_key);
+ (void)freestr(key_name);
+ freestr(yyvsp[0].cp);
}
break;
-case 204:
-#line 1268 "ns_parser.y"
+case 212:
+#line 1326 "ns_parser.y"
{
yyval.ime = new_ip_match_pattern(yyvsp[0].ip_addr, 32);
}
break;
-case 205:
-#line 1272 "ns_parser.y"
+case 213:
+#line 1330 "ns_parser.y"
{
if (yyvsp[0].num < 0 || yyvsp[0].num > 32) {
parser_error(0, "mask bits out of range; skipping");
@@ -2574,8 +2677,8 @@ case 205:
}
}
break;
-case 206:
-#line 1284 "ns_parser.y"
+case 214:
+#line 1342 "ns_parser.y"
{
struct in_addr ia;
@@ -2597,8 +2700,8 @@ case 206:
}
}
break;
-case 208:
-#line 1306 "ns_parser.y"
+case 216:
+#line 1364 "ns_parser.y"
{
char name[256];
@@ -2607,12 +2710,12 @@ case 208:
* we give it a name and treat it like any other acl.
*/
sprintf(name, "__internal_%p", yyvsp[-1].iml);
- define_acl(savestr(name, 1), yyvsp[-1].iml);
+ define_acl(name, yyvsp[-1].iml);
yyval.ime = new_ip_match_indirect(yyvsp[-1].iml);
}
break;
-case 209:
-#line 1320 "ns_parser.y"
+case 217:
+#line 1378 "ns_parser.y"
{
ip_match_list iml;
@@ -2622,11 +2725,11 @@ case 209:
yyval.ime = NULL;
} else
yyval.ime = new_ip_match_indirect(iml);
- freestr(yyvsp[0].cp);
+ (void)freestr(yyvsp[0].cp);
}
break;
-case 210:
-#line 1338 "ns_parser.y"
+case 218:
+#line 1396 "ns_parser.y"
{
struct dst_key *dst_key;
char *key_name;
@@ -2643,13 +2746,13 @@ case 210:
yyval.keyi = NULL;
} else
yyval.keyi = dst_key;
- freestr(key_name);
+ key_name = freestr(key_name);
}
- freestr(yyvsp[0].cp);
+ (void)freestr(yyvsp[0].cp);
}
break;
-case 211:
-#line 1361 "ns_parser.y"
+case 219:
+#line 1419 "ns_parser.y"
{
if (yyvsp[0].keyi == NULL)
parser_error(0, "empty key not added to server list ");
@@ -2657,15 +2760,15 @@ case 211:
add_server_key_info(current_server, yyvsp[0].keyi);
}
break;
-case 215:
-#line 1375 "ns_parser.y"
+case 227:
+#line 1440 "ns_parser.y"
{
current_algorithm = NULL;
current_secret = NULL;
}
break;
-case 216:
-#line 1380 "ns_parser.y"
+case 228:
+#line 1445 "ns_parser.y"
{
struct dst_key *dst_key;
char *key_name;
@@ -2676,13 +2779,11 @@ case 216:
yyvsp[-3].cp);
} else if (lookup_key(key_name) != NULL) {
parser_error(0, "can't redefine key '%s'", key_name);
- freestr(key_name);
} else {
if (current_algorithm == NULL ||
current_secret == NULL) {
parser_error(0, "skipping bad key '%s'",
key_name);
- freestr(key_name);
} else {
dst_key = new_key_info(key_name,
current_algorithm,
@@ -2697,58 +2798,66 @@ case 216:
}
}
}
- freestr(yyvsp[-3].cp);
+ if (key_name != NULL)
+ key_name = freestr(key_name);
+ if (current_algorithm != NULL)
+ current_algorithm = freestr(current_algorithm);
+ if (current_secret != NULL)
+ current_secret = freestr(current_secret);
+ (void)freestr(yyvsp[-3].cp);
}
break;
-case 217:
-#line 1416 "ns_parser.y"
+case 229:
+#line 1485 "ns_parser.y"
{
current_algorithm = yyvsp[-1].cp;
current_secret = yyvsp[0].cp;
}
break;
-case 218:
-#line 1421 "ns_parser.y"
+case 230:
+#line 1490 "ns_parser.y"
{
current_algorithm = yyvsp[0].cp;
current_secret = yyvsp[-1].cp;
}
break;
-case 219:
-#line 1426 "ns_parser.y"
+case 231:
+#line 1495 "ns_parser.y"
{
current_algorithm = NULL;
current_secret = NULL;
}
break;
-case 220:
-#line 1432 "ns_parser.y"
+case 232:
+#line 1501 "ns_parser.y"
{ yyval.cp = yyvsp[-1].cp; }
break;
-case 221:
-#line 1435 "ns_parser.y"
+case 233:
+#line 1504 "ns_parser.y"
{ yyval.cp = yyvsp[-1].cp; }
break;
-case 222:
-#line 1443 "ns_parser.y"
+case 234:
+#line 1512 "ns_parser.y"
{
if (lookup_acl(yyvsp[-3].cp) != NULL) {
parser_error(0, "can't redefine ACL '%s'", yyvsp[-3].cp);
- freestr(yyvsp[-3].cp);
} else
define_acl(yyvsp[-3].cp, yyvsp[-1].iml);
+ (void)freestr(yyvsp[-3].cp);
}
break;
-case 223:
-#line 1457 "ns_parser.y"
+case 235:
+#line 1526 "ns_parser.y"
{
int sym_type;
symbol_value value;
char *zone_name;
- if (!seen_options)
+ if (!seen_options && !logged_options_error) {
parser_error(0,
"no options statement before first zone; using previous/default");
+ logged_options_error = 1;
+ }
sym_type = SYM_ZONE | (yyvsp[0].num & 0xffff);
value.pointer = NULL;
zone_name = canonical_name(yyvsp[-1].cp);
@@ -2766,29 +2875,28 @@ case 223:
p_class(yyvsp[0].num));
} else {
should_install = 1;
- define_symbol(symtab, savestr(zone_name, 1),
- sym_type, value,
- SYMBOL_FREE_KEY);
+ define_symbol(symtab, zone_name, sym_type,
+ value, 0);
}
}
- freestr(yyvsp[-1].cp);
+ (void)freestr(yyvsp[-1].cp);
current_zone = begin_zone(zone_name, yyvsp[0].num);
}
break;
-case 224:
-#line 1491 "ns_parser.y"
+case 236:
+#line 1561 "ns_parser.y"
{
end_zone(current_zone, should_install);
}
break;
-case 227:
-#line 1501 "ns_parser.y"
+case 239:
+#line 1571 "ns_parser.y"
{
yyval.num = C_IN;
}
break;
-case 228:
-#line 1505 "ns_parser.y"
+case 240:
+#line 1575 "ns_parser.y"
{
symbol_value value;
@@ -2798,116 +2906,116 @@ case 228:
/* the zone validator will give the error */
yyval.num = C_NONE;
}
- freestr(yyvsp[0].cp);
+ (void)freestr(yyvsp[0].cp);
}
break;
-case 229:
-#line 1519 "ns_parser.y"
+case 241:
+#line 1589 "ns_parser.y"
{
yyval.s_int = Z_MASTER;
}
break;
-case 230:
-#line 1523 "ns_parser.y"
+case 242:
+#line 1593 "ns_parser.y"
{
yyval.s_int = Z_SLAVE;
}
break;
-case 231:
-#line 1527 "ns_parser.y"
+case 243:
+#line 1597 "ns_parser.y"
{
yyval.s_int = Z_HINT;
}
break;
-case 232:
-#line 1531 "ns_parser.y"
+case 244:
+#line 1601 "ns_parser.y"
{
yyval.s_int = Z_STUB;
}
break;
-case 233:
-#line 1535 "ns_parser.y"
+case 245:
+#line 1605 "ns_parser.y"
{
yyval.s_int = Z_FORWARD;
}
break;
-case 236:
-#line 1545 "ns_parser.y"
+case 248:
+#line 1615 "ns_parser.y"
{
if (!set_zone_type(current_zone, yyvsp[0].s_int))
parser_warning(0, "zone type already set; skipping");
}
break;
-case 237:
-#line 1550 "ns_parser.y"
+case 249:
+#line 1620 "ns_parser.y"
{
if (!set_zone_filename(current_zone, yyvsp[0].cp))
parser_warning(0,
"zone filename already set; skipping");
}
break;
-case 238:
-#line 1556 "ns_parser.y"
+case 250:
+#line 1626 "ns_parser.y"
{
- if (!set_zone_ixfr_file(current_zone, yyvsp[0].cp))
- parser_warning(0,
- "zone ixfr data base already set; skipping");
- }
+ if (!set_zone_ixfr_file(current_zone, yyvsp[0].cp))
+ parser_warning(0,
+ "zone ixfr data base already set; skipping");
+ }
break;
-case 239:
-#line 1562 "ns_parser.y"
+case 251:
+#line 1632 "ns_parser.y"
{
- if (!set_zone_ixfr_tmp(current_zone, yyvsp[0].cp))
- parser_warning(0,
- "zone ixfr temp filename already set; skipping");
- }
+ if (!set_zone_ixfr_tmp(current_zone, yyvsp[0].cp))
+ parser_warning(0,
+ "zone ixfr temp filename already set; skipping");
+ }
break;
-case 240:
-#line 1568 "ns_parser.y"
+case 252:
+#line 1638 "ns_parser.y"
{
set_zone_master_port(current_zone, yyvsp[-3].us_int);
}
break;
-case 241:
-#line 1572 "ns_parser.y"
+case 253:
+#line 1642 "ns_parser.y"
{
set_zone_transfer_source(current_zone, yyvsp[0].ip_addr);
}
break;
-case 242:
-#line 1576 "ns_parser.y"
+case 254:
+#line 1646 "ns_parser.y"
{
if (!set_zone_checknames(current_zone, (enum severity)yyvsp[0].s_int))
parser_warning(0,
"zone checknames already set; skipping");
}
break;
-case 243:
-#line 1582 "ns_parser.y"
+case 255:
+#line 1652 "ns_parser.y"
{
if (!set_zone_update_acl(current_zone, yyvsp[-1].iml))
parser_warning(0,
"zone update acl already set; skipping");
}
break;
-case 244:
-#line 1588 "ns_parser.y"
+case 256:
+#line 1658 "ns_parser.y"
{
if (!set_zone_query_acl(current_zone, yyvsp[-1].iml))
parser_warning(0,
"zone query acl already set; skipping");
}
break;
-case 245:
-#line 1594 "ns_parser.y"
+case 257:
+#line 1664 "ns_parser.y"
{
if (!set_zone_transfer_acl(current_zone, yyvsp[-1].iml))
parser_warning(0,
"zone transfer acl already set; skipping");
}
break;
-case 247:
-#line 1601 "ns_parser.y"
+case 259:
+#line 1671 "ns_parser.y"
{
struct zoneinfo *zp = current_zone.opaque;
if (zp->z_fwdtab) {
@@ -2917,41 +3025,50 @@ case 247:
}
break;
-case 249:
-#line 1611 "ns_parser.y"
+case 261:
+#line 1681 "ns_parser.y"
{
if (!set_zone_transfer_time_in(current_zone, yyvsp[0].num*60))
parser_warning(0,
"zone max transfer time (in) already set; skipping");
}
break;
-case 250:
-#line 1617 "ns_parser.y"
+case 262:
+#line 1687 "ns_parser.y"
{
- set_zone_max_log_size_ixfr(current_zone, yyvsp[0].num);
+ set_zone_max_log_size_ixfr(current_zone, yyvsp[0].ul_int);
}
break;
-case 251:
-#line 1621 "ns_parser.y"
+case 263:
+#line 1691 "ns_parser.y"
{
- set_zone_notify(current_zone, yyvsp[0].num);
+ set_zone_notify(current_zone, notify_explicit);
}
break;
-case 252:
-#line 1625 "ns_parser.y"
+case 264:
+#line 1695 "ns_parser.y"
+{
+ if (yyvsp[0].num)
+ set_zone_notify(current_zone, notify_yes);
+ else
+ set_zone_notify(current_zone, notify_no);
+ }
+break;
+case 265:
+#line 1702 "ns_parser.y"
{
set_zone_maintain_ixfr_base(current_zone, yyvsp[0].num);
}
break;
-case 253:
-#line 1629 "ns_parser.y"
+case 266:
+#line 1706 "ns_parser.y"
{
/* flags proto alg key */
set_zone_pubkey(current_zone, yyvsp[-3].num, yyvsp[-2].num, yyvsp[-1].num, yyvsp[0].cp);
}
break;
-case 254:
-#line 1634 "ns_parser.y"
+case 267:
+#line 1711 "ns_parser.y"
{
/* flags proto alg key */
char *endp;
@@ -2963,110 +3080,116 @@ case 254:
}
break;
-case 256:
-#line 1646 "ns_parser.y"
+case 269:
+#line 1723 "ns_parser.y"
{
set_zone_dialup(current_zone, yyvsp[0].num);
}
break;
-case 258:
-#line 1653 "ns_parser.y"
+case 271:
+#line 1730 "ns_parser.y"
{
/* nothing */
}
break;
-case 259:
-#line 1657 "ns_parser.y"
+case 272:
+#line 1734 "ns_parser.y"
{
/* nothing */
}
break;
-case 260:
-#line 1663 "ns_parser.y"
+case 273:
+#line 1740 "ns_parser.y"
{
- add_zone_master(current_zone, yyvsp[0].ip_addr);
+ add_zone_master(current_zone, yyvsp[0].ip_addr, NULL);
}
break;
-case 263:
-#line 1673 "ns_parser.y"
+case 274:
+#line 1744 "ns_parser.y"
+{
+ add_zone_master(current_zone, yyvsp[-2].ip_addr, yyvsp[0].keyi);
+ }
+break;
+case 277:
+#line 1754 "ns_parser.y"
{
/* nothing */
}
break;
-case 264:
-#line 1677 "ns_parser.y"
+case 278:
+#line 1758 "ns_parser.y"
{
/* nothing */
}
break;
-case 265:
-#line 1683 "ns_parser.y"
+case 279:
+#line 1764 "ns_parser.y"
{
add_zone_notify(current_zone, yyvsp[0].ip_addr);
}
break;
-case 266:
-#line 1689 "ns_parser.y"
+case 280:
+#line 1770 "ns_parser.y"
{
set_zone_boolean_option(current_zone, OPTION_FORWARD_ONLY, 1);
}
break;
-case 267:
-#line 1693 "ns_parser.y"
+case 281:
+#line 1774 "ns_parser.y"
{
set_zone_boolean_option(current_zone, OPTION_FORWARD_ONLY, 0);
}
break;
-case 268:
-#line 1699 "ns_parser.y"
+case 282:
+#line 1780 "ns_parser.y"
{
set_zone_forward(current_zone);
}
break;
-case 270:
-#line 1706 "ns_parser.y"
+case 284:
+#line 1787 "ns_parser.y"
{
/* nothing */
}
break;
-case 271:
-#line 1710 "ns_parser.y"
+case 285:
+#line 1791 "ns_parser.y"
{
/* nothing */
}
break;
-case 272:
-#line 1716 "ns_parser.y"
+case 286:
+#line 1797 "ns_parser.y"
{
add_zone_forwarder(current_zone, yyvsp[0].ip_addr);
}
break;
-case 273:
-#line 1726 "ns_parser.y"
+case 287:
+#line 1807 "ns_parser.y"
{
}
break;
-case 274:
-#line 1730 "ns_parser.y"
+case 288:
+#line 1811 "ns_parser.y"
{
/* nothing */
}
break;
-case 275:
-#line 1734 "ns_parser.y"
+case 289:
+#line 1815 "ns_parser.y"
{
/* nothing */
}
break;
-case 276:
-#line 1739 "ns_parser.y"
+case 290:
+#line 1820 "ns_parser.y"
{
/* name flags proto alg key */
set_trusted_key(yyvsp[-4].cp, yyvsp[-3].num, yyvsp[-2].num, yyvsp[-1].num, yyvsp[0].cp);
}
break;
-case 277:
-#line 1744 "ns_parser.y"
+case 291:
+#line 1825 "ns_parser.y"
{
/* name flags proto alg key */
char *endp;
@@ -3077,25 +3200,24 @@ case 277:
set_trusted_key(yyvsp[-4].cp, flags, yyvsp[-2].num, yyvsp[-1].num, yyvsp[0].cp);
}
break;
-case 278:
-#line 1760 "ns_parser.y"
+case 292:
+#line 1841 "ns_parser.y"
{
if (yyvsp[0].num < 0 || yyvsp[0].num > 65535) {
parser_warning(0,
"invalid IP port number '%d'; setting port to 0",
- yyvsp[0].num);
+ (int)yyvsp[0].num);
yyvsp[0].num = 0;
} else
yyval.us_int = htons(yyvsp[0].num);
}
break;
-#line 3093 "y.tab.c"
+#line 3214 "y.tab.c"
}
- yystk.ssp -= yym;
- yystate = *yystk.ssp;
- yystk.vsp -= yym;
+ yyssp -= yym;
+ yystate = *yyssp;
+ yyvsp -= yym;
yym = yylhs[yyn];
- yych = yychar;
if (yystate == 0 && yym == 0)
{
#if YYDEBUG
@@ -3104,24 +3226,23 @@ break;
state %d\n", YYPREFIX, YYFINAL);
#endif
yystate = YYFINAL;
- *++yystk.ssp = YYFINAL;
- *++yystk.vsp = yyval;
- if (yych < 0)
+ *++yyssp = YYFINAL;
+ *++yyvsp = yyval;
+ if (yychar < 0)
{
- if ((yych = YYLEX) < 0) yych = 0;
- yychar = yych;
+ if ((yychar = yylex()) < 0) yychar = 0;
#if YYDEBUG
if (yydebug)
{
yys = 0;
- if (yych <= YYMAXTOKEN) yys = yyname[yych];
+ if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
if (!yys) yys = "illegal-symbol";
printf("%sdebug: state %d, reading %d (%s)\n",
- YYPREFIX, YYFINAL, yych, yys);
+ YYPREFIX, YYFINAL, yychar, yys);
}
#endif
}
- if (yych == 0) goto yyaccept;
+ if (yychar == 0) goto yyaccept;
goto yyloop;
}
if ((yyn = yygindex[yym]) && (yyn += yystate) >= 0 &&
@@ -3132,19 +3253,19 @@ break;
#if YYDEBUG
if (yydebug)
printf("%sdebug: after reduction, shifting from state %d \
-to state %d\n", YYPREFIX, *yystk.ssp, yystate);
+to state %d\n", YYPREFIX, *yyssp, yystate);
#endif
- if (yystk.ssp >= yystk.sslim && yygrowstack(&yystk))
+ if (yyssp >= yysslim && yygrowstack())
+ {
goto yyoverflow;
- *++yystk.ssp = yystate;
- *++yystk.vsp = yyval;
+ }
+ *++yyssp = yystate;
+ *++yyvsp = yyval;
goto yyloop;
yyoverflow:
yyerror("yacc stack overflow");
yyabort:
- YYFREESTACK(&yystk);
return (1);
yyaccept:
- YYFREESTACK(&yystk);
return (0);
}
diff --git a/contrib/bind/bin/named/ns_parser.h b/contrib/bind/bin/named/ns_parser.h
index 571fb47..80dceab 100644
--- a/contrib/bind/bin/named/ns_parser.h
+++ b/contrib/bind/bin/named/ns_parser.h
@@ -1,4 +1,3 @@
-#define YYEMPTY (-1)
#define L_EOS 257
#define L_IPADDR 258
#define L_NUMBER 259
@@ -16,118 +15,124 @@
#define T_FAKE_IQUERY 271
#define T_RECURSION 272
#define T_FETCH_GLUE 273
-#define T_QUERY_SOURCE 274
-#define T_LISTEN_ON 275
-#define T_PORT 276
-#define T_ADDRESS 277
-#define T_RRSET_ORDER 278
-#define T_ORDER 279
-#define T_NAME 280
-#define T_CLASS 281
-#define T_CONTROLS 282
-#define T_INET 283
-#define T_UNIX 284
-#define T_PERM 285
-#define T_OWNER 286
-#define T_GROUP 287
-#define T_ALLOW 288
-#define T_DATASIZE 289
-#define T_STACKSIZE 290
-#define T_CORESIZE 291
-#define T_DEFAULT 292
-#define T_UNLIMITED 293
-#define T_FILES 294
-#define T_VERSION 295
-#define T_HOSTSTATS 296
-#define T_DEALLOC_ON_EXIT 297
-#define T_TRANSFERS_IN 298
-#define T_TRANSFERS_OUT 299
-#define T_TRANSFERS_PER_NS 300
-#define T_TRANSFER_FORMAT 301
-#define T_MAX_TRANSFER_TIME_IN 302
-#define T_SERIAL_QUERIES 303
-#define T_ONE_ANSWER 304
-#define T_MANY_ANSWERS 305
-#define T_NOTIFY 306
-#define T_AUTH_NXDOMAIN 307
-#define T_MULTIPLE_CNAMES 308
-#define T_USE_IXFR 309
-#define T_MAINTAIN_IXFR_BASE 310
-#define T_CLEAN_INTERVAL 311
-#define T_INTERFACE_INTERVAL 312
-#define T_STATS_INTERVAL 313
-#define T_MAX_LOG_SIZE_IXFR 314
-#define T_HEARTBEAT 315
-#define T_USE_ID_POOL 316
-#define T_MAX_NCACHE_TTL 317
-#define T_HAS_OLD_CLIENTS 318
-#define T_RFC2308_TYPE1 319
-#define T_LAME_TTL 320
-#define T_MIN_ROOTS 321
-#define T_TREAT_CR_AS_SPACE 322
-#define T_LOGGING 323
-#define T_CATEGORY 324
-#define T_CHANNEL 325
-#define T_SEVERITY 326
-#define T_DYNAMIC 327
-#define T_FILE 328
-#define T_VERSIONS 329
-#define T_SIZE 330
-#define T_SYSLOG 331
-#define T_DEBUG 332
-#define T_NULL_OUTPUT 333
-#define T_PRINT_TIME 334
-#define T_PRINT_CATEGORY 335
-#define T_PRINT_SEVERITY 336
-#define T_SORTLIST 337
-#define T_TOPOLOGY 338
-#define T_SERVER 339
-#define T_LONG_AXFR 340
-#define T_BOGUS 341
-#define T_TRANSFERS 342
-#define T_KEYS 343
-#define T_SUPPORT_IXFR 344
-#define T_ZONE 345
-#define T_IN 346
-#define T_CHAOS 347
-#define T_HESIOD 348
-#define T_TYPE 349
-#define T_MASTER 350
-#define T_SLAVE 351
-#define T_STUB 352
-#define T_RESPONSE 353
-#define T_HINT 354
-#define T_MASTERS 355
-#define T_TRANSFER_SOURCE 356
-#define T_PUBKEY 357
-#define T_ALSO_NOTIFY 358
-#define T_DIALUP 359
-#define T_FILE_IXFR 360
-#define T_IXFR_TMP 361
-#define T_TRUSTED_KEYS 362
-#define T_ACL 363
-#define T_ALLOW_UPDATE 364
-#define T_ALLOW_QUERY 365
-#define T_ALLOW_TRANSFER 366
-#define T_ALLOW_RECURSION 367
-#define T_BLACKHOLE 368
-#define T_SEC_KEY 369
-#define T_ALGID 370
-#define T_SECRET 371
-#define T_CHECK_NAMES 372
-#define T_WARN 373
-#define T_FAIL 374
-#define T_IGNORE 375
-#define T_FORWARD 376
-#define T_FORWARDERS 377
-#define T_ONLY 378
-#define T_FIRST 379
-#define T_IF_NO_ANSWER 380
-#define T_IF_NO_DOMAIN 381
-#define T_YES 382
-#define T_TRUE 383
-#define T_NO 384
-#define T_FALSE 385
+#define T_HITCOUNT 274
+#define T_PREFERRED_GLUE 275
+#define T_QUERY_SOURCE 276
+#define T_LISTEN_ON 277
+#define T_PORT 278
+#define T_ADDRESS 279
+#define T_RRSET_ORDER 280
+#define T_ORDER 281
+#define T_NAME 282
+#define T_CLASS 283
+#define T_CONTROLS 284
+#define T_INET 285
+#define T_UNIX 286
+#define T_PERM 287
+#define T_OWNER 288
+#define T_GROUP 289
+#define T_ALLOW 290
+#define T_DATASIZE 291
+#define T_STACKSIZE 292
+#define T_CORESIZE 293
+#define T_DEFAULT 294
+#define T_UNLIMITED 295
+#define T_FILES 296
+#define T_VERSION 297
+#define T_HOSTNAME 298
+#define T_HOSTSTATS 299
+#define T_HOSTSTATSMAX 300
+#define T_DEALLOC_ON_EXIT 301
+#define T_TRANSFERS_IN 302
+#define T_TRANSFERS_OUT 303
+#define T_TRANSFERS_PER_NS 304
+#define T_TRANSFER_FORMAT 305
+#define T_MAX_TRANSFER_TIME_IN 306
+#define T_SERIAL_QUERIES 307
+#define T_ONE_ANSWER 308
+#define T_MANY_ANSWERS 309
+#define T_NOTIFY 310
+#define T_EXPLICIT 311
+#define T_NOTIFY_INITIAL 312
+#define T_AUTH_NXDOMAIN 313
+#define T_MULTIPLE_CNAMES 314
+#define T_USE_IXFR 315
+#define T_MAINTAIN_IXFR_BASE 316
+#define T_CLEAN_INTERVAL 317
+#define T_INTERFACE_INTERVAL 318
+#define T_STATS_INTERVAL 319
+#define T_MAX_LOG_SIZE_IXFR 320
+#define T_HEARTBEAT 321
+#define T_USE_ID_POOL 322
+#define T_MAX_NCACHE_TTL 323
+#define T_HAS_OLD_CLIENTS 324
+#define T_RFC2308_TYPE1 325
+#define T_LAME_TTL 326
+#define T_MIN_ROOTS 327
+#define T_TREAT_CR_AS_SPACE 328
+#define T_LOGGING 329
+#define T_CATEGORY 330
+#define T_CHANNEL 331
+#define T_SEVERITY 332
+#define T_DYNAMIC 333
+#define T_FILE 334
+#define T_VERSIONS 335
+#define T_SIZE 336
+#define T_SYSLOG 337
+#define T_DEBUG 338
+#define T_NULL_OUTPUT 339
+#define T_PRINT_TIME 340
+#define T_PRINT_CATEGORY 341
+#define T_PRINT_SEVERITY 342
+#define T_SORTLIST 343
+#define T_TOPOLOGY 344
+#define T_SERVER 345
+#define T_LONG_AXFR 346
+#define T_BOGUS 347
+#define T_TRANSFERS 348
+#define T_KEYS 349
+#define T_SUPPORT_IXFR 350
+#define T_ZONE 351
+#define T_IN 352
+#define T_CHAOS 353
+#define T_HESIOD 354
+#define T_TYPE 355
+#define T_MASTER 356
+#define T_SLAVE 357
+#define T_STUB 358
+#define T_RESPONSE 359
+#define T_HINT 360
+#define T_MASTERS 361
+#define T_TRANSFER_SOURCE 362
+#define T_PUBKEY 363
+#define T_ALSO_NOTIFY 364
+#define T_DIALUP 365
+#define T_FILE_IXFR 366
+#define T_IXFR_TMP 367
+#define T_TRUSTED_KEYS 368
+#define T_ACL 369
+#define T_ALLOW_UPDATE 370
+#define T_ALLOW_QUERY 371
+#define T_ALLOW_TRANSFER 372
+#define T_ALLOW_RECURSION 373
+#define T_BLACKHOLE 374
+#define T_SEC_KEY 375
+#define T_ALGID 376
+#define T_SECRET 377
+#define T_CHECK_NAMES 378
+#define T_WARN 379
+#define T_FAIL 380
+#define T_IGNORE 381
+#define T_FORWARD 382
+#define T_FORWARDERS 383
+#define T_ONLY 384
+#define T_FIRST 385
+#define T_IF_NO_ANSWER 386
+#define T_IF_NO_DOMAIN 387
+#define T_YES 388
+#define T_TRUE 389
+#define T_NO 390
+#define T_FALSE 391
typedef union {
char * cp;
int s_int;
diff --git a/contrib/bind/bin/named/ns_parser.y b/contrib/bind/bin/named/ns_parser.y
index 0fe9dc7..8e62962 100644
--- a/contrib/bind/bin/named/ns_parser.y
+++ b/contrib/bind/bin/named/ns_parser.y
@@ -1,6 +1,6 @@
%{
#if !defined(lint) && !defined(SABER)
-static char rcsid[] = "$Id: ns_parser.y,v 8.78 2001/12/28 04:07:48 marka Exp $";
+static char rcsid[] = "$Id: ns_parser.y,v 8.79 2002/04/25 05:27:13 marka Exp $";
#endif /* not lint */
/*
@@ -150,7 +150,7 @@ int yyparse();
%token T_TRANSFER_FORMAT T_MAX_TRANSFER_TIME_IN
%token T_SERIAL_QUERIES T_ONE_ANSWER T_MANY_ANSWERS
%type <axfr_fmt> transfer_format
-%token T_NOTIFY T_NOTIFY_INITIAL T_AUTH_NXDOMAIN
+%token T_NOTIFY T_EXPLICIT T_NOTIFY_INITIAL T_AUTH_NXDOMAIN
%token T_MULTIPLE_CNAMES T_USE_IXFR T_MAINTAIN_IXFR_BASE
%token T_CLEAN_INTERVAL T_INTERFACE_INTERVAL T_STATS_INTERVAL
%token T_MAX_LOG_SIZE_IXFR
@@ -374,10 +374,16 @@ option: /* Empty */
set_global_boolean_option(current_options,
OPTION_HITCOUNT, $2);
}
+ | T_NOTIFY T_EXPLICIT
+ {
+ current_options->notify = notify_explicit;
+ }
| T_NOTIFY yea_or_nay
{
- set_global_boolean_option(current_options,
- OPTION_NONOTIFY, !$2);
+ if ($2)
+ current_options->notify = notify_yes;
+ else
+ current_options->notify = notify_no;
}
| T_NOTIFY_INITIAL yea_or_nay
{
@@ -1681,9 +1687,16 @@ zone_option: T_TYPE zone_type
{
set_zone_max_log_size_ixfr(current_zone, $2);
}
+ | T_NOTIFY T_EXPLICIT
+ {
+ set_zone_notify(current_zone, notify_explicit);
+ }
| T_NOTIFY yea_or_nay
{
- set_zone_notify(current_zone, $2);
+ if ($2)
+ set_zone_notify(current_zone, notify_yes);
+ else
+ set_zone_notify(current_zone, notify_no);
}
| T_MAINTAIN_IXFR_BASE yea_or_nay
{
diff --git a/contrib/bind/bin/named/ns_req.c b/contrib/bind/bin/named/ns_req.c
index 6695881..1a1d756 100644
--- a/contrib/bind/bin/named/ns_req.c
+++ b/contrib/bind/bin/named/ns_req.c
@@ -1,6 +1,6 @@
#if !defined(lint) && !defined(SABER)
static const char sccsid[] = "@(#)ns_req.c 4.47 (Berkeley) 7/1/91";
-static const char rcsid[] = "$Id: ns_req.c,v 8.162 2002/02/01 00:05:36 marka Exp $";
+static const char rcsid[] = "$Id: ns_req.c,v 8.168 2002/04/30 03:43:52 marka Exp $";
#endif /* not lint */
/*
@@ -231,24 +231,10 @@ ns_get_opt(u_char *msg, u_char *eom,
version = *cp++;
GETSHORT(flags, cp);
GETSHORT(rdlen, cp);
- /* ensure options are well formed */
+ if (cp + rdlen > eom)
+ return (-1);
options = cp;
optsize = rdlen;
- while (rdlen != 0) {
- u_int16_t code;
- u_int16_t len;
-
- if (rdlen < 4)
- return (-1);
- GETSHORT(code, cp);
- GETSHORT(len, cp);
- rdlen -= 4;
- if (len > rdlen)
- return (-1);
- cp += len;
- rdlen -= len;
- }
- /* Everything checks out. */
if (versionp != NULL)
*versionp = version;
if (rcodep != NULL)
@@ -315,6 +301,7 @@ ns_req(u_char *msg, int msglen, int buflen, struct qstream *qsp,
u_int16_t rcode = ns_r_noerror;
u_int16_t udpsize = 0;
int drop;
+ int tsig_adjust = 0;
#ifdef DEBUG
if (debug > 3) {
@@ -332,9 +319,18 @@ ns_req(u_char *msg, int msglen, int buflen, struct qstream *qsp,
has_tsig = 0;
else {
char buf[MAXDNAME];
+ u_char tmp[NS_MAXCDNAME];
has_tsig = 1;
- n = dn_expand(msg, msg + msglen, tsigstart, buf, sizeof buf);
+ n = ns_name_unpack(msg, msg + msglen, tsigstart,
+ tmp, sizeof tmp);
+ if (n > 0) {
+ tsig_adjust = dn_skipname(tmp, tmp + sizeof(tmp)) - n;
+ if (ns_name_ntop(tmp, buf, sizeof buf) == -1)
+ n = -1;
+ else if (buf[0] == '.')
+ buf[0] = '\0';
+ }
if (n < 0) {
ns_debug(ns_log_default, 1,
"ns_req: bad TSIG key name");
@@ -395,7 +391,8 @@ ns_req(u_char *msg, int msglen, int buflen, struct qstream *qsp,
in_tsig->siglen = siglen;
memcpy(in_tsig->sig, sig, siglen);
tsig_size = msglen_orig - msglen;
- in_tsig->tsig_size = tsig_size;
+ /* AXFR/IXFR need the uncompressed tsig size. */
+ in_tsig->tsig_size = tsig_size + tsig_adjust;
} else if (has_tsig) {
action = Finish;
in_tsig = memget(sizeof(struct tsig_record));
@@ -576,8 +573,9 @@ ns_req(u_char *msg, int msglen, int buflen, struct qstream *qsp,
sig2len = sizeof sig2;
msglen = cp - msg;
buflen = buflen_orig - msglen;
- n = ns_sign(msg, &msglen, msglen + buflen, error, key,
- sig, siglen, sig2, &sig2len, tsig_time);
+ n = ns_sign2(msg, &msglen, msglen + buflen, error, key,
+ sig, siglen, sig2, &sig2len, tsig_time,
+ dnptrs, dnptrs_end);
if (n == NS_TSIG_ERROR_NO_SPACE &&
ntohs(hp->qdcount) != 0) {
hp->qdcount = htons(0);
@@ -609,12 +607,14 @@ ns_req(u_char *msg, int msglen, int buflen, struct qstream *qsp,
INSIST(n > 0);
cp += n;
buflen -= n;
+ msglen += n;
}
if (has_tsig > 0) {
buflen += tsig_size;
sig2len = sizeof sig2;
- n = ns_sign(msg, &msglen, msglen + buflen, error, key,
- sig, siglen, sig2, &sig2len, tsig_time);
+ n = ns_sign2(msg, &msglen, msglen + buflen, error, key,
+ sig, siglen, sig2, &sig2len, tsig_time,
+ dnptrs, dnptrs_end);
if (n != 0) {
INSIST(0);
}
@@ -1218,12 +1218,17 @@ req_query(HEADER *hp, u_char **cpp, u_char *eom, struct qstream *qsp,
goto fetchns;
}
}
+#ifdef NXDOMAIN_ON_DENIAL
+ hp->rcode = ns_r_nxdomain;
+ return (Finish);
+#else
ns_notice(ns_log_security,
"denied query from %s for \"%s\" %s/%s",
sin_ntoa(from), *dname ? dname : ".",
p_type(type), p_class(class));
nameserIncr(from.sin_addr, nssRcvdUQ);
return (Refuse);
+#endif
}
} else {
ip_match_list transfer_acl;
@@ -2315,7 +2320,10 @@ doaddinfo(HEADER *hp, u_char *msg, int msglen) {
cp = msg;
loop:
for (ap = addinfo, i = 0; i < addcount; ap++, i++) {
- int foundany = 0,
+ int auth = 0,
+ founda = 0,
+ foundaaaa = 0,
+ founda6 = 0,
foundcname = 0,
save_count = count,
save_msglen = msglen;
@@ -2340,16 +2348,27 @@ loop:
/* look for the data */
(void)delete_stale(np);
for (dp = np->n_data; dp != NULL; dp = dp->d_next) {
+ if (dp->d_class != ap->a_class)
+ continue;
if (dp->d_rcode == NXDOMAIN) {
- if (dp->d_class == ap->a_class)
- foundany++;
+ founda = founda6 = foundaaaa = 1;
continue;
}
- if ((match(dp, (int)ap->a_class, T_CNAME) &&
- dp->d_type == T_CNAME)) {
+ switch (dp->d_type) {
+ case ns_t_a: founda = 1; break;
+ case ns_t_a6: founda6 = 1; break;
+ case ns_t_aaaa: foundaaaa = 1; break;
+ }
+ if (!dp->d_rcode && dp->d_type == T_CNAME) {
foundcname++;
break;
}
+ if (auth == 0 && ap->a_type == T_A &&
+ (dp->d_type == ns_t_a || dp->d_type == ns_t_a6 ||
+ dp->d_type == ns_t_aaaa) &&
+ (zones[dp->d_zone].z_type == z_master ||
+ zones[dp->d_zone].z_type == z_slave))
+ auth = 1;
if (pass == 0 && ap->a_type == T_A &&
server_options->preferred_glue != 0 &&
!match(dp, (int)ap->a_class,
@@ -2374,8 +2393,6 @@ loop:
if (ap->a_type == T_SRV &&
!match(dp, (int)ap->a_class, T_SRV))
continue;
-
- foundany++;
if (dp->d_rcode)
continue;
/*
@@ -2417,12 +2434,20 @@ loop:
}
next_rr:
if (!NS_OPTION_P(OPTION_NOFETCHGLUE) &&
- !foundcname && !foundany &&
- (ap->a_type == T_A || ap->a_type == T_AAAA)) {
+ !foundcname && ap->a_type == T_A) {
/* ask a real server for this info */
- (void) sysquery(ap->a_dname, (int)ap->a_class,
- ap->a_type, NULL, NULL, 0, ns_port,
- QUERY, 0);
+ if (!founda && !auth)
+ (void) sysquery(ap->a_dname, (int)ap->a_class,
+ ns_t_a, NULL, NULL, 0, ns_port,
+ QUERY, 0);
+ if (!foundaaaa && !auth)
+ (void) sysquery(ap->a_dname, (int)ap->a_class,
+ ns_t_aaaa, NULL, NULL, 0,
+ ns_port, QUERY, 0);
+ if (!founda6 && !auth)
+ (void) sysquery(ap->a_dname, (int)ap->a_class,
+ ns_t_a6, NULL, NULL, 0, ns_port,
+ QUERY, 0);
}
if (foundcname) {
if (!haveComplained(nhash(ap->a_dname),
diff --git a/contrib/bind/bin/named/ns_resp.c b/contrib/bind/bin/named/ns_resp.c
index ea62674..5be0038 100644
--- a/contrib/bind/bin/named/ns_resp.c
+++ b/contrib/bind/bin/named/ns_resp.c
@@ -1,6 +1,6 @@
#if !defined(lint) && !defined(SABER)
static const char sccsid[] = "@(#)ns_resp.c 4.65 (Berkeley) 3/3/91";
-static const char rcsid[] = "$Id: ns_resp.c,v 8.172 2002/01/31 00:06:41 marka Exp $";
+static const char rcsid[] = "$Id: ns_resp.c,v 8.176 2002/04/17 07:10:10 marka Exp $";
#endif /* not lint */
/*
@@ -182,7 +182,8 @@ static int rrsetcmp(char *, struct db_list *, struct hashbuf *),
struct sockaddr_in, char **);
static void mark_bad(struct qinfo *qp, struct sockaddr_in from);
static void mark_lame(struct qinfo *qp, struct sockaddr_in from);
-static int mark_noedns(struct qinfo *qp, struct sockaddr_in from);
+static int mark_noedns(struct qinfo *qp, struct sockaddr_in from,
+ int cache);
static void fast_retry(struct qinfo *qp, struct sockaddr_in from,
int samehost);
static void add_related_additional(char *);
@@ -417,15 +418,15 @@ ns_resp(u_char *msg, int msglen, struct sockaddr_in from, struct qstream *qsp)
switch (hp->rcode) {
case SERVFAIL:
nameserIncr(from.sin_addr, nssRcvdFail);
- noedns = mark_noedns(qp, from);
+ noedns = mark_noedns(qp, from, 0);
break;
case FORMERR:
nameserIncr(from.sin_addr, nssRcvdFErr);
- noedns = mark_noedns(qp, from);
+ noedns = mark_noedns(qp, from, 1);
break;
case NOTIMP:
nameserIncr(from.sin_addr, nssRcvdErr);
- noedns = mark_noedns(qp, from);
+ noedns = mark_noedns(qp, from, 1);
break;
default:
nameserIncr(from.sin_addr, nssRcvdErr);
@@ -1059,6 +1060,7 @@ tcp_retry:
/* Additional section. */
switch (type) {
case T_A:
+ case ns_t_a6:
case T_AAAA:
case T_SRV:
if (externalcname ||
@@ -1778,6 +1780,7 @@ rrextract(u_char *msg, int msglen, u_char *rrp, struct databuf **dpp,
case T_LOC:
case T_KEY:
case ns_t_cert:
+ case ns_t_opt:
cp1 = cp;
n = dlen;
cp += n;
@@ -1859,6 +1862,8 @@ rrextract(u_char *msg, int msglen, u_char *rrp, struct databuf **dpp,
}
n = cp1 - data;
cp1 = data;
+ if (tnamep != NULL && type == T_SOA)
+ *tnamep = savestr((char *)cp1, 1);
break;
case T_NAPTR:
@@ -3933,14 +3938,14 @@ trunc_adjust(u_char *msg, int msglen, int outlen) {
* mark the server "from" bad in the qp structure so it won't be retried.
*/
static int
-mark_noedns(struct qinfo *qp, struct sockaddr_in from) {
+mark_noedns(struct qinfo *qp, struct sockaddr_in from, int cache) {
int i;
for (i = 0; i < (int)qp->q_naddr; i++)
if (ina_equal(qp->q_addr[i].ns_addr.sin_addr, from.sin_addr)) {
if (qp->q_addr[i].noedns)
return (1);
- if (qp->q_addr[i].nsdata)
+ if (qp->q_addr[i].nsdata && cache)
qp->q_addr[i].nsdata->d_noedns = 1;
qp->q_addr[i].noedns = 1;
break;
diff --git a/contrib/bind/bin/named/ns_xfr.c b/contrib/bind/bin/named/ns_xfr.c
index ab23b6b..d7a8505 100644
--- a/contrib/bind/bin/named/ns_xfr.c
+++ b/contrib/bind/bin/named/ns_xfr.c
@@ -1,5 +1,5 @@
#if !defined(lint) && !defined(SABER)
-static const char rcsid[] = "$Id: ns_xfr.c,v 8.67 2001/07/10 05:06:50 marka Exp $";
+static const char rcsid[] = "$Id: ns_xfr.c,v 8.68 2002/04/11 05:19:06 marka Exp $";
#endif /* not lint */
/*
@@ -180,13 +180,15 @@ ns_xfr(struct qstream *qsp, struct namebuf *znp,
qsp->xfr.transfer_format = si->transfer_format;
else
qsp->xfr.transfer_format = server_options->transfer_format;
- if (in_tsig == NULL)
+ if (in_tsig == NULL) {
qsp->xfr.tsig_state = NULL;
- else {
+ qsp->xfr.tsig_size = 0;
+ } else {
qsp->xfr.tsig_state = memget(sizeof(ns_tcp_tsig_state));
ns_sign_tcp_init(in_tsig->key, in_tsig->sig, in_tsig->siglen,
qsp->xfr.tsig_state);
qsp->xfr.tsig_skip = 0;
+ qsp->xfr.tsig_size = in_tsig->tsig_size;
}
if (type == ns_t_ixfr) {
@@ -393,14 +395,15 @@ sx_addrr(struct qstream *qsp, const char *dname, struct databuf *dp) {
}
}
- n = make_rr(dname, dp, qsp->xfr.cp, qsp->xfr.eom - qsp->xfr.cp,
- 0, qsp->xfr.ptrs, edp, 0);
+ n = make_rr(dname, dp, qsp->xfr.cp, qsp->xfr.eom - qsp->xfr.cp -
+ qsp->xfr.tsig_size, 0, qsp->xfr.ptrs, edp, 0);
if (n < 0) {
if (sx_flush(qsp) < 0)
return (-1);
if (qsp->xfr.cp == NULL)
sx_newmsg(qsp);
- n = make_rr(dname, dp, qsp->xfr.cp, qsp->xfr.eom - qsp->xfr.cp,
+ n = make_rr(dname, dp, qsp->xfr.cp, qsp->xfr.eom -
+ qsp->xfr.cp - qsp->xfr.tsig_size,
0, qsp->xfr.ptrs, edp, 0);
INSIST(n >= 0);
}
OpenPOWER on IntegriCloud