History

bridge: mcast: Allow user space to add (*, G) with a source list and filter mode

Add new netlink attributes to the RTM_NEWMDB request that allow user space to add (*, G) with a source list and filter mode. The RTM_NEWMDB message can already dump such entries (created by the kernel) so there is no need to add dump support. However, the message contains a different set of attributes depending if it is a request or a response. The naming and structure of the new attributes try to follow the existing ones used in the response. Request: [ struct nlmsghdr ] [ struct br_port_msg ] [ MDBA_SET_ENTRY ] struct br_mdb_entry [ MDBA_SET_ENTRY_ATTRS ] [ MDBE_ATTR_SOURCE ] struct in_addr / struct in6_addr [ MDBE_ATTR_SRC_LIST ] // new [ MDBE_SRC_LIST_ENTRY ] [ MDBE_SRCATTR_ADDRESS ] struct in_addr / struct in6_addr [ ...] [ MDBE_ATTR_GROUP_MODE ] // new u8 Response: [ struct nlmsghdr ] [ struct br_port_msg ] [ MDBA_MDB ] [ MDBA_MDB_ENTRY ] [ MDBA_MDB_ENTRY_INFO ] struct br_mdb_entry [ MDBA_MDB_EATTR_TIMER ] u32 [ MDBA_MDB_EATTR_SOURCE ] struct in_addr / struct in6_addr [ MDBA_MDB_EATTR_RTPROT ] u8 [ MDBA_MDB_EATTR_SRC_LIST ] [ MDBA_MDB_SRCLIST_ENTRY ] [ MDBA_MDB_SRCATTR_ADDRESS ] struct in_addr / struct in6_addr [ MDBA_MDB_SRCATTR_TIMER ] u8 [...] [ MDBA_MDB_EATTR_GROUP_MODE ] u8

Ido Schimmel committed 3 years ago

Commit 6afaae61 parent b1c8fec2 files · +150 −0Browse files

Showing the changes to include/uapi (1 of 2 files). Show all

Unified · Split

include/uapi/linux/if_bridge.h+20−0
@@ -723,10 +723,30 @@ enum { · 722 unmodified lines
723723 enum {
724724 MDBE_ATTR_UNSPEC,
725725 MDBE_ATTR_SOURCE,
726+ MDBE_ATTR_SRC_LIST,
727+ MDBE_ATTR_GROUP_MODE,
726728 __MDBE_ATTR_MAX,
727729 };
728730 #define MDBE_ATTR_MAX (__MDBE_ATTR_MAX - 1)
729731
732+/* per mdb entry source */
733+enum {
734+ MDBE_SRC_LIST_UNSPEC,
735+ MDBE_SRC_LIST_ENTRY,
736+ __MDBE_SRC_LIST_MAX,
737+};
738+#define MDBE_SRC_LIST_MAX (__MDBE_SRC_LIST_MAX - 1)
739+
740+/* per mdb entry per source attributes
741+ * these are embedded in MDBE_SRC_LIST_ENTRY
742+ */
743+enum {
744+ MDBE_SRCATTR_UNSPEC,
745+ MDBE_SRCATTR_ADDRESS,
746+ __MDBE_SRCATTR_MAX,
747+};
748+#define MDBE_SRCATTR_MAX (__MDBE_SRCATTR_MAX - 1)
749+
730750 /* Embedded inside LINK_XSTATS_TYPE_BRIDGE */
731751 enum {
732752 BRIDGE_XSTATS_UNSPEC,

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t