From aab09c104e38dff1b046e6af01b5eaafa52dd10c Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Mon, 5 Feb 2018 03:42:09 -0500 Subject: [PATCH] zebra: Cleanup nexthop update encoding The encoding of the nexthop update made some distinctions between nexthop types that it does not need to. Signed-off-by: Donald Sharp --- zebra/zebra_rnh.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/zebra/zebra_rnh.c b/zebra/zebra_rnh.c index 8983bdee09..cea46ffc18 100644 --- a/zebra/zebra_rnh.c +++ b/zebra/zebra_rnh.c @@ -1034,6 +1034,7 @@ static int send_client(struct rnh *rnh, struct zserv *client, rnh_type_t type, stream_putc(s, nexthop->type); switch (nexthop->type) { case NEXTHOP_TYPE_IPV4: + case NEXTHOP_TYPE_IPV4_IFINDEX: stream_put_in_addr(s, &nexthop->gate.ipv4); stream_putl(s, nexthop->ifindex); @@ -1041,15 +1042,7 @@ static int send_client(struct rnh *rnh, struct zserv *client, rnh_type_t type, case NEXTHOP_TYPE_IFINDEX: stream_putl(s, nexthop->ifindex); break; - case NEXTHOP_TYPE_IPV4_IFINDEX: - stream_put_in_addr(s, - &nexthop->gate.ipv4); - stream_putl(s, nexthop->ifindex); - break; case NEXTHOP_TYPE_IPV6: - stream_put(s, &nexthop->gate.ipv6, 16); - stream_putl(s, nexthop->ifindex); - break; case NEXTHOP_TYPE_IPV6_IFINDEX: stream_put(s, &nexthop->gate.ipv6, 16); stream_putl(s, nexthop->ifindex);