On 2015-08-23 17:19, Linus Lüssing wrote:
> The multicast_router option of a bridge allows to control the forwarding
> behaviour of multicast packets independant of the listener state:
> 
> * 0: Only forward if specific listener is present
> * 1 (default): Forward if specific listener or a multicast router
>   was detected (currently only learned via query messages, no MRD
>   support yet)
> * 2: Always forward any multicast traffic on this port
> 
> Since MRD is not mandated you might end up with silent multicast routers
> (e.g. if your link has more than one multicast router; only one can
> become the selected, "noisy" querier). Here you might need a manual
> configuration option like the "multicast_router" option.
> 
> Other scenarios where this can be useful are for instance:
> * Segmentation of IGMP/MLD domains together with ebtables
> * Dedicated bridge port for monitoring/debugging purposes
> 
> Signed-off-by: Linus Lüssing <linus.luess...@c0d3.blue>
> ---
>  device.c       |   12 ++++++++++++
>  device.h       |    3 +++
>  system-linux.c |   18 ++++++++++++++++++
>  3 files changed, 33 insertions(+)
> 
> diff --git a/device.c b/device.c
> index b44ccb8..d6e288c 100644
> --- a/device.c
> +++ b/device.c
> @@ -281,6 +283,14 @@ device_init_settings(struct device *dev, struct 
> blob_attr **tb)
>               s->flags |= DEV_OPT_MULTICAST_TO_UNICAST;
>       }
>  
> +     if ((cur = tb[DEV_ATTR_MULTICAST_ROUTER])) {
> +             s->multicast_router = blobmsg_get_u32(cur);
> +             if (s->multicast_router >= 0 && s->multicast_router <= 2)
Applied the netifd patches with a minor modification: Removed the >= 0
test because the field is unsigned (fixes a compiler warning).

Thanks,

- Felix
_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

Reply via email to