diff options
author | Ondrej Zajicek (work) <santiago@crfreenet.org> | 2019-08-01 00:53:22 +0200 |
---|---|---|
committer | Ondrej Zajicek (work) <santiago@crfreenet.org> | 2019-08-01 00:53:22 +0200 |
commit | da8644d7d99a0f693037d244f456164568abc68c (patch) | |
tree | c4ead657616263981f7fcbbb98424eb842343b5f /nest/proto.c | |
parent | d72d3891bf262b28cd4d03fd72e88bf37fef112a (diff) |
Nest: VRF of protocol can be explicitly specified as 'default'
Protocol can have specified VRF, in such case it is restricted to a set
of ifaces associated with the VRF, otherwise it can use all interfaces.
The patch allows to specify VRF as 'default', in which case it is
restricted to a set of iface not associated with any VRF.
Diffstat (limited to 'nest/proto.c')
-rw-r--r-- | nest/proto.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/nest/proto.c b/nest/proto.c index 162441b6..66cb937d 100644 --- a/nest/proto.c +++ b/nest/proto.c @@ -387,6 +387,7 @@ proto_init(struct proto_config *c) q->export_state = ES_DOWN; q->last_state_change = now; q->vrf = c->vrf; + q->vrf_set = c->vrf_set; add_tail(&initial_proto_list, &q->n); @@ -411,6 +412,7 @@ proto_reconfigure(struct proto *p, struct proto_config *oc, struct proto_config if ((nc->protocol != oc->protocol) || (nc->disabled != p->disabled) || (nc->vrf != oc->vrf) || + (nc->vrf_set != oc->vrf_set) || (nc->table->table != oc->table->table)) return 0; @@ -1567,6 +1569,9 @@ proto_cmd_show(struct proto *p, uintptr_t verbose, int cnt) if (p->cf->router_id) cli_msg(-1006, " Router ID: %R", p->cf->router_id); + if (p->vrf_set) + cli_msg(-1006, " VRF: %s", p->vrf ? p->vrf->name : "default"); + if (p->proto->show_proto_info) p->proto->show_proto_info(p); else |