diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2005-04-28 13:54:46 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2005-04-28 13:54:46 +0000 |
commit | 934b54fb57ccdabbc5621556f361d6f264d7781c (patch) | |
tree | e1a8b7bd3a70362a1cf5ecca2a3c517b5db28e41 /usr.sbin/bgpd/parse.y | |
parent | 0038c3369dd66655dd155902da4283ca84dc9f36 (diff) |
Support for "network connected" and "network static" -- announce all
directly connected respectively all static routes. The list is auto-
matically adjusted as soon as a route changes.
OK henning@
Diffstat (limited to 'usr.sbin/bgpd/parse.y')
-rw-r--r-- | usr.sbin/bgpd/parse.y | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/usr.sbin/bgpd/parse.y b/usr.sbin/bgpd/parse.y index dff6c9ae9a7..3b0ac5f6a18 100644 --- a/usr.sbin/bgpd/parse.y +++ b/usr.sbin/bgpd/parse.y @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.161 2005/04/17 16:41:21 henning Exp $ */ +/* $OpenBSD: parse.y,v 1.162 2005/04/28 13:54:45 claudio Exp $ */ /* * Copyright (c) 2002, 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -150,6 +150,7 @@ typedef struct { %token ALLOW DENY MATCH %token QUICK %token FROM TO ANY +%token CONNECTED STATIC %token PREFIX PREFIXLEN SOURCEAS TRANSITAS COMMUNITY %token SET LOCALPREF MED METRIC NEXTHOP REJECT BLACKHOLE NOMODIFY %token PREPEND_SELF PREPEND_PEER PFTABLE WEIGHT @@ -343,6 +344,24 @@ conf_main : AS asnumber { TAILQ_INSERT_TAIL(netconf, n, entry); } + | NETWORK STATIC filter_set { + conf->flags |= BGPD_FLAG_REDIST_STATIC; + if ($3 == NULL || SIMPLEQ_EMPTY($3)) + SIMPLEQ_INIT(&conf->staticset); + else + memcpy(&conf->staticset, $3, + sizeof(conf->staticset)); + free($3); + } + | NETWORK CONNECTED filter_set { + conf->flags |= BGPD_FLAG_REDIST_CONNECTED; + if ($3 == NULL || SIMPLEQ_EMPTY($3)) + SIMPLEQ_INIT(&conf->connectset); + else + memcpy(&conf->connectset, $3, + sizeof(conf->connectset)); + free($3); + } | DUMP STRING STRING optnumber { int action; @@ -1393,6 +1412,7 @@ lookup(char *s) { "blackhole", BLACKHOLE}, { "capabilities", CAPABILITIES}, { "community", COMMUNITY}, + { "connected", CONNECTED}, { "deny", DENY}, { "depend", DEPEND}, { "descr", DESCR}, @@ -1444,6 +1464,7 @@ lookup(char *s) { "set", SET}, { "source-as", SOURCEAS}, { "spi", SPI}, + { "static", STATIC}, { "tcp", TCP}, { "to", TO}, { "transit-as", TRANSITAS}, |