Commit 1d7b66a
bridge: mcast: Allow user space to specify MDB entry routing protocol
Add the 'MDBE_ATTR_RTPORT' attribute to allow user space to specify the
routing protocol of the MDB port group entry. Enforce a minimum value of
'RTPROT_STATIC' to prevent user space from using protocol values that
should only be set by the kernel (e.g., 'RTPROT_KERNEL'). Maintain
backward compatibility by defaulting to 'RTPROT_STATIC'.
The protocol is already visible to user space in RTM_NEWMDB responses
and notifications via the 'MDBA_MDB_EATTR_RTPROT' attribute.
The routing protocol allows a routing daemon to distinguish between
entries configured by it and those configured by the administrator. Once
MDB flush is supported, the protocol can be used as a criterion
according to which the flush is performed.
Examples:
# bridge mdb add dev br0 port dummy10 grp 239.1.1.1 permanent proto kernel
Error: integer out of range.
# bridge mdb add dev br0 port dummy10 grp 239.1.1.1 permanent proto static
# bridge mdb add dev br0 port dummy10 grp 239.1.1.1 src 192.0.2.1 permanent proto zebra
# bridge mdb add dev br0 port dummy10 grp 239.1.1.2 permanent source_list 198.51.100.1,198.51.100.2 filter_mode include proto 250
# bridge -d mdb show
dev br0 port dummy10 grp 239.1.1.2 src 198.51.100.2 permanent filter_mode include proto 250
dev br0 port dummy10 grp 239.1.1.2 src 198.51.100.1 permanent filter_mode include proto 250
dev br0 port dummy10 grp 239.1.1.2 permanent filter_mode include source_list 198.51.100.2/0.00,198.51.100.1/0.00 proto 250
dev br0 port dummy10 grp 239.1.1.1 src 192.0.2.1 permanent filter_mode include proto zebra
dev br0 port dummy10 grp 239.1.1.1 permanent filter_mode exclude proto static
Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Acked-by: Nikolay Aleksandrov <razor@blackwall.org>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>1 parent 6afaae6 commit 1d7b66a
File tree
3 files changed
+15
-2
lines changed- include/uapi/linux
- net/bridge
3 files changed
+15
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
725 | 725 | | |
726 | 726 | | |
727 | 727 | | |
| 728 | + | |
728 | 729 | | |
729 | 730 | | |
730 | 731 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
682 | 682 | | |
683 | 683 | | |
684 | 684 | | |
| 685 | + | |
685 | 686 | | |
686 | 687 | | |
687 | 688 | | |
| |||
823 | 824 | | |
824 | 825 | | |
825 | 826 | | |
826 | | - | |
| 827 | + | |
827 | 828 | | |
828 | 829 | | |
829 | 830 | | |
| |||
881 | 882 | | |
882 | 883 | | |
883 | 884 | | |
| 885 | + | |
884 | 886 | | |
885 | 887 | | |
886 | 888 | | |
| |||
982 | 984 | | |
983 | 985 | | |
984 | 986 | | |
985 | | - | |
| 987 | + | |
986 | 988 | | |
987 | 989 | | |
988 | 990 | | |
| |||
1193 | 1195 | | |
1194 | 1196 | | |
1195 | 1197 | | |
| 1198 | + | |
| 1199 | + | |
| 1200 | + | |
| 1201 | + | |
| 1202 | + | |
| 1203 | + | |
| 1204 | + | |
| 1205 | + | |
1196 | 1206 | | |
1197 | 1207 | | |
1198 | 1208 | | |
| |||
1212 | 1222 | | |
1213 | 1223 | | |
1214 | 1224 | | |
| 1225 | + | |
1215 | 1226 | | |
1216 | 1227 | | |
1217 | 1228 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
| 109 | + | |
109 | 110 | | |
110 | 111 | | |
111 | 112 | | |
| |||
0 commit comments