]> git.puffer.fish Git - matthieu/frr.git/commitdiff
zebra: Add encap type when building packet for FPM
authorDonald Sharp <sharpd@nvidia.com>
Sat, 28 Oct 2023 14:03:39 +0000 (10:03 -0400)
committerMergify <37929162+mergify[bot]@users.noreply.github.com>
Wed, 8 Nov 2023 13:52:51 +0000 (13:52 +0000)
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 4ac659fcbeb3848ee6caf06676a9ac1543ae62f1)

zebra/rt_netlink.c

index 79d79d74be65d425fa72950766308cf76c4cc414..d846918e6c5a6700a01ca140a8a70075287fed43 100644 (file)
@@ -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) {