summaryrefslogtreecommitdiffstats
path: root/lib/nexthop.c
diff options
context:
space:
mode:
authorStephen Worley <sworley@cumulusnetworks.com>2020-10-02 23:25:36 +0200
committerStephen Worley <sworley@cumulusnetworks.com>2020-10-02 23:25:36 +0200
commit7403e155610d4680d174b99b79780eded340d0ff (patch)
tree50cc827c1e1548c4ffa28f7f385932fa44528069 /lib/nexthop.c
parentMerge pull request #7232 from idryzhov/more-topotests-vrf-id (diff)
downloadfrr-7403e155610d4680d174b99b79780eded340d0ff.tar.xz
frr-7403e155610d4680d174b99b79780eded340d0ff.zip
lib: remove nexthop_same_firsthop() api
Remove the nexthop_same_firsthop() api and just call nexthop_same(). Not entirely sure why we were using this function in the first place, but now we are just marking dupes with it so lets just call a common function and avoid issues. Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
Diffstat (limited to 'lib/nexthop.c')
-rw-r--r--lib/nexthop.c37
1 files changed, 0 insertions, 37 deletions
diff --git a/lib/nexthop.c b/lib/nexthop.c
index 0ea72d03e..f1575649b 100644
--- a/lib/nexthop.c
+++ b/lib/nexthop.c
@@ -202,43 +202,6 @@ int nexthop_cmp(const struct nexthop *next1, const struct nexthop *next2)
return ret;
}
-bool nexthop_same_firsthop(const struct nexthop *next1,
- const struct nexthop *next2)
-{
- /* Map the TYPE_IPx types to TYPE_IPx_IFINDEX */
- int type1 = NEXTHOP_FIRSTHOPTYPE(next1->type);
- int type2 = NEXTHOP_FIRSTHOPTYPE(next2->type);
-
- if (type1 != type2)
- return false;
-
- if (next1->vrf_id != next2->vrf_id)
- return false;
-
- switch (type1) {
- case NEXTHOP_TYPE_IPV4_IFINDEX:
- if (!IPV4_ADDR_SAME(&next1->gate.ipv4, &next2->gate.ipv4))
- return false;
- if (next1->ifindex != next2->ifindex)
- return false;
- break;
- case NEXTHOP_TYPE_IFINDEX:
- if (next1->ifindex != next2->ifindex)
- return false;
- break;
- case NEXTHOP_TYPE_IPV6_IFINDEX:
- if (!IPV6_ADDR_SAME(&next1->gate.ipv6, &next2->gate.ipv6))
- return false;
- if (next1->ifindex != next2->ifindex)
- return false;
- break;
- default:
- /* do nothing */
- break;
- }
- return true;
-}
-
/*
* nexthop_type_to_str
*/