diff options
author | Stephen Worley <sworley@cumulusnetworks.com> | 2020-07-24 23:50:20 +0200 |
---|---|---|
committer | Stephen Worley <sworley@cumulusnetworks.com> | 2020-09-28 18:40:59 +0200 |
commit | cc6a0d7d80e176ce9cced99cb1d5de9792c6f3f3 (patch) | |
tree | f704bb996ac38c103b350e700cf4d0a98e17158a /sharpd | |
parent | zebra: add logging for NHG ignoring in netlink (diff) | |
download | frr-cc6a0d7d80e176ce9cced99cb1d5de9792c6f3f3.tar.xz frr-cc6a0d7d80e176ce9cced99cb1d5de9792c6f3f3.zip |
Revert "lib,sharpd,pbrd: `set installable` nhg command"
This reverts commit 1844f45e30913b27cfd875036f865a0edadcf244.
Diffstat (limited to 'sharpd')
-rw-r--r-- | sharpd/sharp_nht.c | 40 |
1 files changed, 4 insertions, 36 deletions
diff --git a/sharpd/sharp_nht.c b/sharpd/sharp_nht.c index e76b1016a..731d58e56 100644 --- a/sharpd/sharp_nht.c +++ b/sharpd/sharp_nht.c @@ -78,8 +78,6 @@ struct sharp_nhg { uint32_t id; char name[256]; - - bool installable; }; static uint32_t nhg_id; @@ -122,9 +120,7 @@ static void sharp_nhgroup_add_nexthop_cb(const struct nexthop_group_cmd *nhgc, strncpy(lookup.name, nhgc->name, sizeof(lookup.name)); snhg = sharp_nhg_rb_find(&nhg_head, &lookup); - if (snhg->installable) - nhg_add(snhg->id, &nhgc->nhg); - + nhg_add(snhg->id, &nhgc->nhg); return; } @@ -137,9 +133,7 @@ static void sharp_nhgroup_del_nexthop_cb(const struct nexthop_group_cmd *nhgc, strncpy(lookup.name, nhgc->name, sizeof(lookup.name)); snhg = sharp_nhg_rb_find(&nhg_head, &lookup); - if (snhg->installable) - nhg_add(snhg->id, &nhgc->nhg); - + nhg_add(snhg->id, &nhgc->nhg); return; } @@ -153,34 +147,12 @@ static void sharp_nhgroup_delete_cb(const char *name) if (!snhg) return; - if (snhg->installable) - nhg_del(snhg->id); - + nhg_del(snhg->id); sharp_nhg_rb_del(&nhg_head, snhg); XFREE(MTYPE_NHG, snhg); return; } -static void sharp_nhgroup_installable_cb(const struct nexthop_group_cmd *nhgc) -{ - struct sharp_nhg lookup; - struct sharp_nhg *snhg; - - strncpy(lookup.name, nhgc->name, sizeof(lookup.name)); - snhg = sharp_nhg_rb_find(&nhg_head, &lookup); - if (!snhg) - return; - - snhg->installable = nhgc->installable; - - if (snhg->installable) - nhg_add(snhg->id, &nhgc->nhg); - else - nhg_del(snhg->id); - - return; -} - uint32_t sharp_nhgroup_get_id(const char *name) { struct sharp_nhg lookup; @@ -191,9 +163,6 @@ uint32_t sharp_nhgroup_get_id(const char *name) if (!snhg) return 0; - if (!snhg->installable) - return 0; - return snhg->id; } @@ -204,6 +173,5 @@ void sharp_nhgroup_init(void) nexthop_group_init(sharp_nhgroup_add_cb, sharp_nhgroup_add_nexthop_cb, sharp_nhgroup_del_nexthop_cb, - sharp_nhgroup_delete_cb, - sharp_nhgroup_installable_cb); + sharp_nhgroup_delete_cb); } |