diff options
| author | Donald Sharp <sharpd@cumulusnetworks.com> | 2018-02-05 03:42:09 -0500 |
|---|---|---|
| committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2018-02-05 03:42:09 -0500 |
| commit | aab09c104e38dff1b046e6af01b5eaafa52dd10c (patch) | |
| tree | 186a136bbf3303c85b2ab156c3cf6e41c433e767 | |
| parent | 65e630c051e8032e9dcc3940fb952769482c3315 (diff) | |
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 <sharpd@cumulusnetworks.com>
| -rw-r--r-- | zebra/zebra_rnh.c | 9 |
1 files changed, 1 insertions, 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); |
