diff options
| author | Donald Sharp <sharpd@cumulusnetworks.com> | 2019-01-29 21:45:02 -0500 |
|---|---|---|
| committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2019-01-29 21:45:02 -0500 |
| commit | 058c16b7e239f1c50a1d4b4376a6aff6b8dad959 (patch) | |
| tree | d2a8fd4570610acf69e8af34f9ac155ec4dc4ccd /zebra/zebra_rib.c | |
| parent | 2da33d6b3acf63f3386c70c43907f529406e8151 (diff) | |
zebra: Trust kernel and System routes
If we receive a valid message from the kernel that
is either a kernel or system route, we should trust
that the route is legit and just use it.
Old behavior:
K * 172.22.0.0/15 [0/0] via 172.22.2.254, eva_dummy1 inactive, 00:00:16
New Behavior:
K>* 172.22.0.0/15 [0/0] via 172.22.2.254, eva_dummy1, 00:02:35
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'zebra/zebra_rib.c')
| -rw-r--r-- | zebra/zebra_rib.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/zebra/zebra_rib.c b/zebra/zebra_rib.c index 0d284b74b0..3205f68b68 100644 --- a/zebra/zebra_rib.c +++ b/zebra/zebra_rib.c @@ -437,6 +437,14 @@ static int nexthop_active(afi_t afi, struct route_entry *re, if (CHECK_FLAG(nexthop->flags, NEXTHOP_FLAG_EVPN_RVTEP)) return 1; + /* + * If the kernel has sent us a route, then + * by golly gee whiz it's a good route. + */ + if (re->type == ZEBRA_ROUTE_KERNEL || + re->type == ZEBRA_ROUTE_SYSTEM) + return 1; + /* Skip nexthops that have been filtered out due to route-map */ /* The nexthops are specific to this route and so the same */ /* nexthop for a different route may not have this flag set */ |
