<div dir="ltr"><div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Nov 13, 2014 at 3:00 PM, Felix Fietkau <span dir="ltr"><<a href="mailto:nbd@openwrt.org" target="_blank">nbd@openwrt.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 2014-11-13 14:35, Hans Dedecker wrote:<br>
> When a device with the same name is deleted and created again in the kernel<br>
> the ifindex changes.<br>
> A race condition will occur when netlink event messages linked to the old device<br>
> are processed and will thus overwrite the correct ifindex of the new device.<br>
> Further make sure a valid ifindex is in place for both external and internal<br>
> devices when setting the state to enabled.<br>
><br>
> Signed-off-by: Hans Dedecker <<a href="mailto:dedeckeh@gmail.com">dedeckeh@gmail.com</a>><br>
> ---<br>
> diff --git a/system-dummy.c b/system-dummy.c<br>
> index 8e420e1..94b3308 100644<br>
> --- a/system-dummy.c<br>
> +++ b/system-dummy.c<br>
> @@ -96,6 +96,13 @@ int system_if_check(struct device *dev)<br>
>       return 0;<br>
>  }<br>
><br>
> +int system_if_resolve(struct device *dev)<br>
> +{<br>
> +     dev->ifindex = 0;<br>
> +<br>
> +     return 0;<br>
You can leave out the dev->ifindex assignment here.<br>
<span class="HOEnZb"><font color="#888888"><br>
- Felix<br>
</font></span></blockquote></div>OK will do</div></div><div class="gmail_extra"><br></div><div class="gmail_extra">Hans</div></div>