Skip to content

Commit

Permalink
zebra: Allow for storage of non-configed vrf routes
Browse files Browse the repository at this point in the history
When zebra is being configed we allow for static routes
to be entered.  This presents a problem for when a vrf
is cli configed but not kernel configed yet.

Modify zebra to notice that when a static route is
entered and either the nexthop vrf or the vrf
is not fully configed, to save that config to the
side.

When vrf's become active( kernel configed ) parse
through the list of saved to the side static routes
and determine if any of them can be installed.

Additionally modify the cli to output the saved
to the side cli, so that we can properly handle
a wr mem.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
  • Loading branch information
donaldsharp committed Mar 1, 2018
1 parent b295572 commit 908e1b2
Show file tree
Hide file tree
Showing 3 changed files with 295 additions and 23 deletions.
2 changes: 2 additions & 0 deletions zebra/rib.h
Original file line number Diff line number Diff line change
Expand Up @@ -446,6 +446,8 @@ DECLARE_HOOK(rib_update, (struct route_node * rn, const char *reason),
extern void zebra_vty_init(void);
extern int static_config(struct vty *vty, struct zebra_vrf *zvrf,
afi_t afi, safi_t safi, const char *cmd);
extern void static_config_install_delayed_routes(struct zebra_vrf *zvrf);

extern pid_t pid;

#endif /*_ZEBRA_RIB_H */
6 changes: 6 additions & 0 deletions zebra/zebra_vrf.c
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,12 @@ static int zebra_vrf_enable(struct vrf *vrf)
}
}

/*
* We may have static routes that are now possible to
* insert into the appropriate tables
*/
static_config_install_delayed_routes(zvrf);

/* Kick off any VxLAN-EVPN processing. */
zebra_vxlan_vrf_enable(zvrf);

Expand Down
Loading

0 comments on commit 908e1b2

Please sign in to comment.