zebra: Send nexthop ifindex for type NEXTHOP_TYPE_IPV6

Once RP/BSR address is learned in PIMD, PIMD does nexthop tracking
in Zebra.
For IPV6 address, the nexthop type is either NEXTHOP_TYPE_IPV6
or NEXTHOP_TYPE_IPV6_IFINDEX.
Zebra should send nexthop ifindex information along with nexthop address
to the client (PIMD).

Issue: #11526
Issue: #11957

Signed-off-by: Sarita Patra <saritap@vmware.com>
(cherry picked from commit ed9323604a)
This commit is contained in:
Sarita Patra 2022-10-10 11:06:10 -07:00 committed by Mergify
parent 614a18415d
commit 26a7da3637

View File

@ -134,8 +134,6 @@ static int zserv_encode_nexthop(struct stream *s, struct nexthop *nexthop)
stream_putl(s, nexthop->ifindex); stream_putl(s, nexthop->ifindex);
break; break;
case NEXTHOP_TYPE_IPV6: case NEXTHOP_TYPE_IPV6:
stream_put(s, &nexthop->gate.ipv6, 16);
break;
case NEXTHOP_TYPE_IPV6_IFINDEX: case NEXTHOP_TYPE_IPV6_IFINDEX:
stream_put(s, &nexthop->gate.ipv6, 16); stream_put(s, &nexthop->gate.ipv6, 16);
stream_putl(s, nexthop->ifindex); stream_putl(s, nexthop->ifindex);