diff options
author | Neale Ranns <nranns@cisco.com> | 2018-09-13 08:45:12 -0700 |
---|---|---|
committer | Damjan Marion <dmarion@me.com> | 2018-09-14 18:21:43 +0000 |
commit | ef90ed08fbcde7535b4a789349b39dc25798c77d (patch) | |
tree | 4d36c0fa1ddd39700c4979dbc12366a78a4175a5 /src/vnet/bier/bier_api.c | |
parent | ccf444d50253325bd8a7b0dddc2f34f5586b5e45 (diff) |
BIER API and load-balancing fixes
Change-Id: Ibda19d786070c942c75016ab568c8361de2f24af
Signed-off-by: Neale Ranns <nranns@cisco.com>
Diffstat (limited to 'src/vnet/bier/bier_api.c')
-rw-r--r-- | src/vnet/bier/bier_api.c | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/src/vnet/bier/bier_api.c b/src/vnet/bier/bier_api.c index 93048a0a890..2e8fc626baa 100644 --- a/src/vnet/bier/bier_api.c +++ b/src/vnet/bier/bier_api.c @@ -204,13 +204,24 @@ vl_api_bier_route_add_del_t_handler (vl_api_bier_route_add_del_t * mp) } } - if (mp->br_is_add) + if (mp->br_is_replace) { - bier_table_route_add(&bti, bp, brpaths); + if (0 == vec_len(brpaths)) + { + bier_table_route_delete(&bti, bp); + } + else + { + bier_table_route_path_update(&bti, bp, brpaths); + } + } + else if (mp->br_is_add) + { + bier_table_route_path_add(&bti, bp, brpaths); } else { - bier_table_route_remove(&bti, bp, brpaths); + bier_table_route_path_remove(&bti, bp, brpaths); } vec_free(brpaths); |