diff options
| author | Stephen Worley <sworley@cumulusnetworks.com> | 2019-12-17 14:24:22 -0500 |
|---|---|---|
| committer | Stephen Worley <sworley@cumulusnetworks.com> | 2019-12-17 14:24:22 -0500 |
| commit | 62d2ecb2f23f07e445a4e4d00d1f787b3c19cd57 (patch) | |
| tree | 9ea36b8df6eae29597049e119b9d6e4682aa48f3 | |
| parent | 65bb725102fa546c72215189eb399e0a1076b151 (diff) | |
zebra: set RTNH_F_ONLINK in nexthop creation
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>
| -rw-r--r-- | zebra/rt_netlink.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/zebra/rt_netlink.c b/zebra/rt_netlink.c index e77c923230..fff569c092 100644 --- a/zebra/rt_netlink.c +++ b/zebra/rt_netlink.c @@ -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)); |
