diff options
author | Ondrej Zajicek <santiago@crfreenet.org> | 2010-11-11 12:24:27 +0100 |
---|---|---|
committer | Ondrej Zajicek <santiago@crfreenet.org> | 2010-11-11 12:24:27 +0100 |
commit | fe181e7c63843ad65401cc1e400ae1ac3187122f (patch) | |
tree | df37b8d76084521bb33e749a70ea85f04f19e16d /proto/static/config.Y | |
parent | f25cb0ef9f6341648513e793a3162b32fc250d2b (diff) | |
download | bird-fe181e7c63843ad65401cc1e400ae1ac3187122f.tar bird-fe181e7c63843ad65401cc1e400ae1ac3187122f.zip |
Adds support for iface link check to static protocol.
Diffstat (limited to 'proto/static/config.Y')
-rw-r--r-- | proto/static/config.Y | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/proto/static/config.Y b/proto/static/config.Y index a7e5016..9f4d7da 100644 --- a/proto/static/config.Y +++ b/proto/static/config.Y @@ -12,11 +12,12 @@ CF_HDR CF_DEFINES +#define STATIC_CFG ((struct static_config *) this_proto) static struct static_route *this_srt; CF_DECLS -CF_KEYWORDS(STATIC, ROUTE, VIA, DROP, REJECT, PROHIBIT, PREFERENCE) +CF_KEYWORDS(STATIC, ROUTE, VIA, DROP, REJECT, PROHIBIT, PREFERENCE, CHECK, LINK) CF_GRAMMAR @@ -31,12 +32,13 @@ static_proto_start: proto_start STATIC { static_proto: static_proto_start proto_name '{' | static_proto proto_item ';' + | static_proto CHECK LINK ';' { STATIC_CFG->check = STATIC_CHECK_LINK; } | static_proto stat_route ';' ; stat_route0: ROUTE prefix { this_srt = cfg_allocz(sizeof(struct static_route)); - add_tail(&((struct static_config *) this_proto)->other_routes, &this_srt->n); + add_tail(&STATIC_CFG->other_routes, &this_srt->n); this_srt->net = $2.addr; this_srt->masklen = $2.len; } @@ -51,7 +53,7 @@ stat_route: this_srt->dest = RTD_DEVICE; this_srt->if_name = $3; rem_node(&this_srt->n); - add_tail(&((struct static_config *) this_proto)->iface_routes, &this_srt->n); + add_tail(&STATIC_CFG->iface_routes, &this_srt->n); } | stat_route0 DROP { this_srt->dest = RTD_BLACKHOLE; } | stat_route0 REJECT { this_srt->dest = RTD_UNREACHABLE; } |