[OpenWrt-Devel] [PATCH][netifd] Bridge hairpin mode must be off by default

Jonas Gorski jogo at openwrt.org
Thu Sep 10 09:20:06 EDT 2015


Hi,

On Thu, Sep 10, 2015 at 3:00 PM, Dmitry Ivanov
<dmitrijs.ivanovs at ubnt.com> wrote:
> Bridge hairpin mode must be off by default when multicast_to_unicast is
> off. Enabling this mode leads to broadcast frames such as ARP and DHCP
> being retransmitted back to AP in WDS configurations.
>
> Signed-off-by: Dmitry Ivanov <dima at ubnt.com>

Commit subject/message does not match what the patch does:

> ---
>  system-linux.c | 7 +++----
>  1 file changed, 3 insertions(+), 4 deletions(-)
>
> diff --git a/system-linux.c b/system-linux.c
> index 01500a5..6994ace 100644
> --- a/system-linux.c
> +++ b/system-linux.c
> @@ -576,12 +576,11 @@ static char *system_get_bridge(const char *name, char *buf, int buflen)
>  static void
>  system_bridge_set_wireless(struct device *bridge, struct device *dev)
>  {
> -       bool mcast_to_ucast = true;
> +       bool mcast_to_ucast = false;
>         bool hairpin = true;
>
> -       if (bridge->settings.flags & DEV_OPT_MULTICAST_TO_UNICAST &&
> -           !bridge->settings.multicast_to_unicast)
> -               mcast_to_ucast = false;
> +       if (bridge->settings.flags & DEV_OPT_MULTICAST_TO_UNICAST)
> +               mcast_to_ucast = bridge->settings.multicast_to_unicast;
>
>         if (!mcast_to_ucast || dev->wireless_isolate)
>                 hairpin = false;

hairpin mode will already be disabled if macst_to_ucast is disabled.

What this patch does is change the default of multicast to unicast to
off. Changing the default of hairpin mode to off is only a side effect
of that.


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



More information about the openwrt-devel mailing list