diff options
author | Ondrej Zajicek (work) <santiago@crfreenet.org> | 2017-07-04 23:36:21 +0200 |
---|---|---|
committer | Ondrej Zajicek (work) <santiago@crfreenet.org> | 2017-07-04 23:36:21 +0200 |
commit | a1f5e514ef091b82754f38f0e583af40778c7d97 (patch) | |
tree | b449e8da19c061bb4a64857cf29cae9a521cf86f /proto/static/config.Y | |
parent | 5220cb63e34961b097d3bc274e394c0fa946d7d3 (diff) |
Implement onlink flag for nexthops
Add proper support for per-nexthop onlink flag in routes to handle next
hop addresses that are not covered by interface IP ranges. Supported by
kernel and static protocols.
Thanks to Vincent Bernat for the idea.
Diffstat (limited to 'proto/static/config.Y')
-rw-r--r-- | proto/static/config.Y | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/proto/static/config.Y b/proto/static/config.Y index 66ae3c98..66e5ea4c 100644 --- a/proto/static/config.Y +++ b/proto/static/config.Y @@ -44,7 +44,7 @@ static_route_finish(void) CF_DECLS CF_KEYWORDS(STATIC, ROUTE, VIA, DROP, REJECT, PROHIBIT, PREFERENCE, CHECK, LINK) -CF_KEYWORDS(WEIGHT, RECURSIVE, IGP, TABLE, BLACKHOLE, UNREACHABLE, BFD, MPLS) +CF_KEYWORDS(ONLINK, WEIGHT, RECURSIVE, IGP, TABLE, BLACKHOLE, UNREACHABLE, BFD, MPLS) CF_GRAMMAR @@ -87,6 +87,9 @@ stat_nexthop: | stat_nexthop MPLS label_stack { this_snh->mls = $3; } + | stat_nexthop ONLINK bool { + this_snh->onlink = $3; + } | stat_nexthop WEIGHT expr { this_snh->weight = $3 - 1; if (($3<1) || ($3>256)) cf_error("Weight must be in range 1-256"); |