diff options
| author | Nikolay Aleksandrov <nikolay@cumulusnetworks.com> | 2020-07-15 17:59:12 +0300 |
|---|---|---|
| committer | Anuradha Karuppiah <anuradhak@nvidia.com> | 2020-12-11 12:13:36 -0800 |
| commit | 4bcdb6086c0af476f703e510bfcd4da69ac6c7f9 (patch) | |
| tree | 9eb3edd63c5dce1a680e4cec9f6327998232a3c6 /zebra/kernel_netlink.c | |
| parent | 9c474915511968e5fb6f1489925721ba3eddd090 (diff) | |
zebra: move from NDA_NOTIFY to NDA_FDB_EXT_ATTRS
Use the new nested NDA_FDB_EXT_ATTRS attribute to control per-fdb
notifications.
PS: The attributes where updated as a part of the kernel upstreaming
hence the change.
Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
Diffstat (limited to 'zebra/kernel_netlink.c')
| -rw-r--r-- | zebra/kernel_netlink.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/zebra/kernel_netlink.c b/zebra/kernel_netlink.c index 76da00c619..59c0d252dc 100644 --- a/zebra/kernel_netlink.c +++ b/zebra/kernel_netlink.c @@ -489,6 +489,19 @@ static void netlink_install_filter(int sock, __u32 pid, __u32 dplane_pid) safe_strerror(errno)); } +void netlink_parse_rtattr_flags(struct rtattr **tb, int max, + struct rtattr *rta, int len, unsigned short flags) +{ + unsigned short type; + + while (RTA_OK(rta, len)) { + type = rta->rta_type & ~flags; + if ((type <= max) && (!tb[type])) + tb[type] = rta; + rta = RTA_NEXT(rta, len); + } +} + void netlink_parse_rtattr(struct rtattr **tb, int max, struct rtattr *rta, int len) { |
