Skip to content

Commit f0f7b28

Browse files
donaldsharpmergify[bot]
authored andcommitted
zebra: Add encap type when building packet for FPM
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)
1 parent 24f2b7d commit f0f7b28

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

zebra/rt_netlink.c

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2235,19 +2235,21 @@ ssize_t netlink_route_multipath_msg_encode(int cmd,
22352235
p, routedesc, bytelen, nexthop,
22362236
&req->n, &req->r, datalen, cmd))
22372237
return 0;
2238+
2239+
/*
2240+
* Add encapsulation information when
2241+
* installing via FPM.
2242+
*/
2243+
if (fpm) {
2244+
if (!netlink_route_nexthop_encap(&req->n,
2245+
datalen,
2246+
nexthop))
2247+
return 0;
2248+
}
2249+
22382250
nexthop_num++;
22392251
break;
22402252
}
2241-
2242-
/*
2243-
* Add encapsulation information when installing via
2244-
* FPM.
2245-
*/
2246-
if (fpm) {
2247-
if (!netlink_route_nexthop_encap(
2248-
&req->n, datalen, nexthop))
2249-
return 0;
2250-
}
22512253
}
22522254

22532255
if (setsrc) {

0 commit comments

Comments
 (0)