On Thu, Nov 13, 2014 at 3:00 PM, Felix Fietkau <[email protected]> wrote:

> On 2014-11-13 14:35, Hans Dedecker wrote:
> > When a device with the same name is deleted and created again in the
> kernel
> > the ifindex changes.
> > A race condition will occur when netlink event messages linked to the
> old device
> > are processed and will thus overwrite the correct ifindex of the new
> device.
> > Further make sure a valid ifindex is in place for both external and
> internal
> > devices when setting the state to enabled.
> >
> > Signed-off-by: Hans Dedecker <[email protected]>
> > ---
> > diff --git a/system-dummy.c b/system-dummy.c
> > index 8e420e1..94b3308 100644
> > --- a/system-dummy.c
> > +++ b/system-dummy.c
> > @@ -96,6 +96,13 @@ int system_if_check(struct device *dev)
> >       return 0;
> >  }
> >
> > +int system_if_resolve(struct device *dev)
> > +{
> > +     dev->ifindex = 0;
> > +
> > +     return 0;
> You can leave out the dev->ifindex assignment here.
>
> - Felix
>
OK will do

Hans
_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

Reply via email to