]> git.puffer.fish Git - mirror/frr.git/commitdiff
zebra: set RTNH_F_ONLINK in nexthop creation 5552/head
authorStephen Worley <sworley@cumulusnetworks.com>
Tue, 17 Dec 2019 19:24:22 +0000 (14:24 -0500)
committerStephen Worley <sworley@cumulusnetworks.com>
Tue, 17 Dec 2019 19:24:22 +0000 (14:24 -0500)
We were not setting the RTNH_F_ONLINK flag where appropriate
when creating nexthop objects in the kernel.

Set it on the nhmsg.nh_flags netlink message.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
zebra/rt_netlink.c

index e77c923230093dadacf2459cae2d90d7e524349c..fff569c0920a3dea453e28263fd78e2976558c30 100644 (file)
@@ -2044,6 +2044,9 @@ static int netlink_nexthop(int cmd, struct zebra_dplane_ctx *ctx)
 
                        addattr32(&req.n, req_size, NHA_OIF, nh->ifindex);
 
+                       if (CHECK_FLAG(nh->flags, NEXTHOP_FLAG_ONLINK))
+                               req.nhm.nh_flags |= RTNH_F_ONLINK;
+
                        num_labels =
                                build_label_stack(nh->nh_label, out_lse,
                                                  label_buf, sizeof(label_buf));