diff options
author | Henning Brauer <henning@cvs.openbsd.org> | 2003-12-27 14:43:00 +0000 |
---|---|---|
committer | Henning Brauer <henning@cvs.openbsd.org> | 2003-12-27 14:43:00 +0000 |
commit | 4fcccdabcc6808606cce79b0b76ca7e8ab53feb1 (patch) | |
tree | 42f32d3cf6e3e071f17e09e2af34b8bac4fc0573 /usr.sbin | |
parent | b05b333bfff36cbbe4520128f957742c4ae51f63 (diff) |
"no fib-update" -> "fib-update [yes|no]"
makes more sense this way
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/bgpd/bgpd.conf.5 | 11 | ||||
-rw-r--r-- | usr.sbin/bgpd/parse.y | 22 |
2 files changed, 25 insertions, 8 deletions
diff --git a/usr.sbin/bgpd/bgpd.conf.5 b/usr.sbin/bgpd/bgpd.conf.5 index b6aad2a7110..11946568609 100644 --- a/usr.sbin/bgpd/bgpd.conf.5 +++ b/usr.sbin/bgpd/bgpd.conf.5 @@ -1,4 +1,4 @@ -.\" $OpenBSD: bgpd.conf.5,v 1.7 2003/12/26 20:52:14 jakob Exp $ +.\" $OpenBSD: bgpd.conf.5,v 1.8 2003/12/27 14:42:59 henning Exp $ .\" .\" Copyright (c) 2003 Henning Brauer <henning@openbsd.org> .\" Copyright (c) 2002 Daniel Hartmeier <dhartmei@openbsd.org> @@ -131,8 +131,13 @@ listen on 127.0.0.1 .Ed .It Ar log updates Log received and sent updates. -.It Ar no fib-update -Do not update the Forward Information Base aka the kernel routing table. +.It Ar fib-update +If set to +.Em no , +do not update the Forward Information Base aka the kernel +routing table. +The default is +.Em yes . .El .Sh NEIGHBORS AND GROUPS .Ar bgpd diff --git a/usr.sbin/bgpd/parse.y b/usr.sbin/bgpd/parse.y index 19d7f2241be..62bd8566f6d 100644 --- a/usr.sbin/bgpd/parse.y +++ b/usr.sbin/bgpd/parse.y @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.21 2003/12/27 14:28:41 henning Exp $ */ +/* $OpenBSD: parse.y,v 1.22 2003/12/27 14:42:59 henning Exp $ */ /* * Copyright (c) 2002, 2003 Henning Brauer <henning@openbsd.org> @@ -89,7 +89,7 @@ typedef struct { %token MRTDUMP %token LOG UPDATES %token <v.string> STRING -%type <v.number> number +%type <v.number> number yesno %type <v.string> string %type <v.addr> address %% @@ -123,6 +123,16 @@ string : string STRING { | STRING ; +yesno : STRING { + if (!strcmp($1, "yes")) + $$ = 1; + else if (!strcmp($1, "no")) + $$ = 0; + else + YYERROR; + } + ; + varset : STRING '=' string { if (conf->opts & BGPD_OPT_VERBOSE) printf("%s = \"%s\"\n", $1, $3); @@ -156,8 +166,11 @@ conf_main : AS number { | LISTEN ON address { conf->listen_addr.sin_addr.s_addr = $3.s_addr; } - | NO FIBUPDATE { - conf->flags |= BGPD_FLAG_NO_FIB_UPDATE; + | FIBUPDATE yesno { + if ($2 == 1) + conf->flags |= BGPD_FLAG_NO_FIB_UPDATE; + else + conf->flags &= ~BGPD_FLAG_NO_FIB_UPDATE; } | LOG UPDATES { conf->log |= BGPD_LOG_UPDATES; @@ -322,7 +335,6 @@ lookup(char *s) { "mrtdump", MRTDUMP}, { "multihop", MULTIHOP}, { "neighbor", NEIGHBOR}, - { "no", NO}, { "on", ON}, { "passive", PASSIVE}, { "remote-as", REMOTEAS}, |