diff options
author | Thomas Haller <thaller@redhat.com> | 2022-03-14 08:51:49 (GMT) |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2022-03-14 22:50:29 (GMT) |
commit | 57a6d510b6d2dc23ad63c1e16ab89a00ccc902f3 (patch) | |
tree | d757609f7bbeb327f655556babec7db60eb49526 /include | |
parent | 0b44562c48b819576002fb1c7336834cd361caf1 (diff) | |
download | libnl-57a6d510b6d2dc23ad63c1e16ab89a00ccc902f3.zip libnl-57a6d510b6d2dc23ad63c1e16ab89a00ccc902f3.tar.gz libnl-57a6d510b6d2dc23ad63c1e16ab89a00ccc902f3.tar.bz2 |
route/mdb: drop extra MDB attributes and rework mdb_compare()
- a `struct rtnl_mdb` has a list of `struct rtnl_mdb_entry`.
An attribute like MDB_ATTR_PORT is not really an attribute
of the MDB struct, but rather of one entry. It makes no sense
to mangle these. Having MDB_ATTR_PORT set in the change flags
would mean that at least one entry has the port set.
Instead, add MDB_ATTR_ENTRIES which is about the list of entries.
- drop unused `ce_mask` in `struct rtnl_mdb_entry`.
- rework mdb_compare(). When we compare the two lists of entries,
it's not right to have two nested loops. You can either
iterate both lists in step, and compare each element to do
a comparison that honors the order of the elements. Or, you
can compare the two lists accepting any order. The latter
is more complicated, and does not seem right. So do the former.
Diffstat (limited to 'include')
-rw-r--r-- | include/netlink-private/types.h | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/include/netlink-private/types.h b/include/netlink-private/types.h index 80188ae..8e13222 100644 --- a/include/netlink-private/types.h +++ b/include/netlink-private/types.h @@ -1356,7 +1356,6 @@ struct rtnl_mdb { struct rtnl_mdb_entry { struct nl_list_head mdb_list; struct nl_addr *addr; - uint32_t ce_mask; /* HACK to support attr macros */ uint32_t ifindex; uint16_t vid; uint16_t proto; |