Thx for the feedback, I'll rework the patch

Hans


On Fri, Dec 13, 2013 at 9:58 PM, Felix Fietkau <[email protected]> wrote:

> On 2013-12-13 12:13, Hans Dedecker wrote:
> > Apply the bridge MTU setting when set after adding a bridge
> > member as the kernel overrides the bridge mtu with the bridge
> > member MTU
> >
> > Signed-off-by: Hans Dedecker <[email protected]>
> > ---
> >  bridge.c |   14 ++++++++++++--
> >  1 files changed, 12 insertions(+), 2 deletions(-)
> >
> > diff --git a/bridge.c b/bridge.c
> > index 4ef0d7e..75c653a 100644
> > --- a/bridge.c
> > +++ b/bridge.c
> > @@ -231,8 +231,18 @@ bridge_member_cb(struct device_user *dev, enum
> device_event ev)
> >               bm->present = true;
> >               bst->n_present++;
> >
> > -             if (bst->dev.active)
> > -                     bridge_enable_member(bm);
> > +             if (bst->dev.active) {
> > +                     if (!bridge_enable_member(bm)) {
> > +                             /*
> > +                              * Adding a bridge member can overwrite
> the bridge mtu
> > +                              * in the kernel, apply the bridge
> settings in case the
> > +                              * bridge mtu is set
> > +                              */
> > +                             if (bst->dev.settings.flags & DEV_OPT_MTU)
> > +                                     system_if_apply_settings(&bst->dev,
> > +                                             &bst->dev.settings);
> > +                     }
> > +             }
> I think this should limit the applied settings to the MTU. Applying
> other settings like the MAC address could be problematic for some
> devices (e.g. wifi).
>
> - Felix
>
>
_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

Reply via email to