-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #174 from mssonicbld/sonicbld/202305-merge
[code sync] Merge code from sonic-net/sonic-buildimage:202305 to 202305
- Loading branch information
Showing
2 changed files
with
59 additions
and
0 deletions.
There are no files selected for viewing
58 changes: 58 additions & 0 deletions
58
src/sonic-frr/patch/0032-zebra-Fix-fpm-multipath-encap-addition.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
From b7ac2397103fe7d347d0766bd9966ff2302403c5 Mon Sep 17 00:00:00 2001 | ||
From: dgsudharsan <sudharsand@nvidia.com> | ||
Date: Tue, 21 Nov 2023 01:17:24 +0000 | ||
Subject: [PATCH] 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. | ||
|
||
|
||
diff --git a/zebra/rt_netlink.c b/zebra/rt_netlink.c | ||
index 71505e037a..6bdc15592c 100644 | ||
--- a/zebra/rt_netlink.c | ||
+++ b/zebra/rt_netlink.c | ||
@@ -2330,6 +2330,16 @@ ssize_t netlink_route_multipath_msg_encode(int cmd, | ||
tag)) | ||
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 (p->family == AF_INET) | ||
src.ipv4 = src1->ipv4; | ||
@@ -2343,23 +2353,6 @@ ssize_t netlink_route_multipath_msg_encode(int cmd, | ||
|
||
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 (p->family == AF_INET) { | ||
if (!nl_attr_put(&req->n, datalen, RTA_PREFSRC, | ||
-- | ||
2.17.1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters