mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-06 21:50:39 +00:00
zebra: Fix fpm multipath encap addition
The fpm code path in building a ecmp route for evpn has a bug that caused it to not add the encap attribute to the netlink message. See #f0f7b285b99dbd971400d33feea007232c0bd4a9 for the single path case being fixed. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
This commit is contained in:
parent
f9012ed5cf
commit
6b23ece88b
@ -2475,6 +2475,16 @@ ssize_t netlink_route_multipath_msg_encode(int cmd, struct zebra_dplane_ctx *ctx
|
|||||||
tag))
|
tag))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Add encapsulation information when installing via
|
||||||
|
* FPM.
|
||||||
|
*/
|
||||||
|
if (fpm) {
|
||||||
|
if (!netlink_route_nexthop_encap(
|
||||||
|
&req->n, datalen, nexthop))
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
if (!setsrc && src1) {
|
if (!setsrc && src1) {
|
||||||
if (p->family == AF_INET)
|
if (p->family == AF_INET)
|
||||||
src.ipv4 = src1->ipv4;
|
src.ipv4 = src1->ipv4;
|
||||||
@ -2488,23 +2498,6 @@ ssize_t netlink_route_multipath_msg_encode(int cmd, struct zebra_dplane_ctx *ctx
|
|||||||
|
|
||||||
nl_attr_nest_end(&req->n, nest);
|
nl_attr_nest_end(&req->n, nest);
|
||||||
|
|
||||||
/*
|
|
||||||
* Add encapsulation information when installing via
|
|
||||||
* FPM.
|
|
||||||
*/
|
|
||||||
if (fpm) {
|
|
||||||
for (ALL_NEXTHOPS_PTR(dplane_ctx_get_ng(ctx),
|
|
||||||
nexthop)) {
|
|
||||||
if (CHECK_FLAG(nexthop->flags,
|
|
||||||
NEXTHOP_FLAG_RECURSIVE))
|
|
||||||
continue;
|
|
||||||
if (!netlink_route_nexthop_encap(
|
|
||||||
&req->n, datalen, nexthop))
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
if (setsrc) {
|
if (setsrc) {
|
||||||
if (p->family == AF_INET) {
|
if (p->family == AF_INET) {
|
||||||
if (!nl_attr_put(&req->n, datalen, RTA_PREFSRC,
|
if (!nl_attr_put(&req->n, datalen, RTA_PREFSRC,
|
||||||
|
Loading…
Reference in New Issue
Block a user