Hi Christophe,
In connman debug traces (attached) it seems that service is not
disconnected-reconnected. That's why there is a difference between
current real eth0 configuration and connman DBUS properties. This can be
fixed by a connman restart (this time, information in kconf.config file
will be used to connect ethernet device using fixed IP address).
If I do the same thing with an already provisioned service, it is
correctly disconnected and reconnected. At the end of operation, eth0
IP, gateway, ... is aligned with configuration in kconf.config file even
without a connman restart.
I made a patch (attached) to fix this problem. The idea is to force
service disconnection when connman knows that a new configuration is
available for this service. I have simply copied what is done in
unregister_service (src/config.c).
My questions are:
1) Do you think the behavior described here is a bug or should I not do
this (provision a connected service) / do this differently?
2) If it is a bug, is this the right way to fix it?
This sounds like a bug. At least the service should be disconnected via
this path here:
provision_changed()
__connman_config_provision_service_ident()
find_and_provision_service_from_config()
try_provision_service()
__connman_service_disconnect()
Can you check what is going in try_provision_service. At least your code
snipped should end in there not in service.c
I will be without mail access until end of July. If you think this is
a
bug and wants a patch quicker than that, please do the correct patch. If
you can wait and give me advice on what would be a correct patch, I can
submit this patch when I am back from holidays.
No worries. No hurry, rather enjoy your holidays. /me does the same :)
Thanks,
Daniel