diff options
| author | Donald Sharp <sharpd@nvidia.com> | 2020-09-18 15:47:27 -0400 |
|---|---|---|
| committer | Donald Sharp <sharpd@nvidia.com> | 2020-09-22 15:57:43 -0400 |
| commit | 5a3cf85391b3665b5344d577e98aaa29a1927818 (patch) | |
| tree | 3a741a61822632d23877cf37a9f25999dd482fe1 /zebra/rt_netlink.c | |
| parent | 4c56ce1cead5f6514ea2af34f0b7a07c35746520 (diff) | |
lib, zebra: Add ability to read kernel notice of TRAP/OFFLOAD
The linux kernel is getting RTM_F_TRAP and RTM_F_OFFLOAD for
kernel routes that have an underlying asic offload. Write the
code to receive these notifications from the linux kernel and
to store that data for display about the routes.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'zebra/rt_netlink.c')
| -rw-r--r-- | zebra/rt_netlink.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/zebra/rt_netlink.c b/zebra/rt_netlink.c index 50b1a62d86..c4fe808071 100644 --- a/zebra/rt_netlink.c +++ b/zebra/rt_netlink.c @@ -643,6 +643,11 @@ static int netlink_route_change_read_unicast(struct nlmsghdr *h, ns_id_t ns_id, return 0; } + if (rtm->rtm_flags & RTM_F_TRAP) + flags |= ZEBRA_FLAG_TRAPPED; + if (rtm->rtm_flags & RTM_F_OFFLOAD) + flags |= ZEBRA_FLAG_OFFLOADED; + /* Route which inserted by Zebra. */ if (selfroute) { flags |= ZEBRA_FLAG_SELFROUTE; |
