Hi,

On Tue, 2013-10-22 at 14:54 +0800, Chengyi Zhao wrote:

> 2013/10/21 Jukka Rissanen <[email protected]>
> 
> >         if (!f)
> > -               return;
> > +               goto out;
> >
> 
> systemd-udevd concomitantly loads or controls modules, so maybe interface
> name will be renamed before excusing the code "filename =
> g_strdup_printf("/sys/class/net/%s/uevent", name);",
> so I think we could add the following code:
> 
> -    if (!f)
> +    if (!f) {
> +        interface->service_type = CONNMAN_SERVICE_TYPE_UNKNOWN;
> +        interface->device_type = CONNMAN_DEVICE_TYPE_UNKNOWN;
> -         return;
> +         goto out;
> +    }
> 
> Because the code logic tells us the interface default service_type
> is CONNMAN_SERVICE_TYPE_ETHERNET and device_type is
> CONNMAN_DEVICE_TYPE_ETHERNET, when opening the file failed, all of types
> will be set to
> default type, this is not correct, maybe wlan0 interface will be treated as
> ethernet type.

Thanks, this explanation put your patch into context. Jukka added it as
the first patch into his patch set so it will not be forgotten.

Cheers,

        Patrik

_______________________________________________
connman mailing list
[email protected]
https://lists.connman.net/mailman/listinfo/connman

Reply via email to