From d7b234b9002b35da9d2c0066f5ffc03ba05b7210 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Fri, 17 Nov 2023 16:57:20 -0500 Subject: [PATCH] TESTt --- zebra/rt_netlink.c | 27 ++++++++++----------------- 1 file changed, 10 insertions(+), 17 deletions(-) diff --git a/zebra/rt_netlink.c b/zebra/rt_netlink.c index d846918e6c5a..5d2362914336 100644 --- a/zebra/rt_netlink.c +++ b/zebra/rt_netlink.c @@ -2296,6 +2296,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; @@ -2309,23 +2319,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,