Skip to content

Commit

Permalink
zebra: Add encap type when building packet for FPM
Browse files Browse the repository at this point in the history
Currently in the single nexthop case w/ evpn sending
down via the FPM the encap type is not being set
for the nexthop.

This looks like the result of some code reorg for the
nexthop happened but the fpm failed to be accounted for.
Let's just move the encap type encoding to where it
will happen.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
(cherry picked from commit 4ac659f)
  • Loading branch information
donaldsharp authored and mergify[bot] committed Nov 8, 2023
1 parent 24f2b7d commit f0f7b28
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions zebra/rt_netlink.c
Original file line number Diff line number Diff line change
Expand Up @@ -2235,19 +2235,21 @@ ssize_t netlink_route_multipath_msg_encode(int cmd,
p, routedesc, bytelen, nexthop,
&req->n, &req->r, datalen, cmd))
return 0;

/*
* Add encapsulation information when
* installing via FPM.
*/
if (fpm) {
if (!netlink_route_nexthop_encap(&req->n,
datalen,
nexthop))
return 0;
}

nexthop_num++;
break;
}

/*
* Add encapsulation information when installing via
* FPM.
*/
if (fpm) {
if (!netlink_route_nexthop_encap(
&req->n, datalen, nexthop))
return 0;
}
}

if (setsrc) {
Expand Down

0 comments on commit f0f7b28

Please sign in to comment.