If a dummy context is created, it might happen
that its index is equal to -1. In this particular case
the IP address has not been copied to context->address
during ipv4 extraction.
If we force from oFono a context activation, it will
make ConnMan crashing on set_connected().
DBG("%s", modem->path);
+ if (modem->context->index < 0 ||
+ modem->context->ipv4_address == NULL) {
+ connman_error("Invalid index and/or address");
+ return;
+ }
+
connman_network_set_index(modem->network, modem->context->index);
switch (modem->context->ipv4_method) {