platform/upstream/connman.git
12 years agomain: Add 'PreferredTechnologies' configuration file option
Patrik Flykt [Thu, 5 Apr 2012 19:38:40 +0000 (22:38 +0300)]
main: Add 'PreferredTechnologies' configuration file option

The main.conf 'PreferredTechnologies' is a list of service
type strings but converted to a list of service type enums.
Thus the configuration option is accessible via the function
connman_setting_get_uint_list().

12 years agomain: Free g_key_file config immediately after use
Patrik Flykt [Thu, 5 Apr 2012 19:38:39 +0000 (22:38 +0300)]
main: Free g_key_file config immediately after use

12 years agoTODO: Mark DefaultAutoConnectTechnologies done
Patrik Flykt [Thu, 5 Apr 2012 19:38:35 +0000 (22:38 +0300)]
TODO: Mark DefaultAutoConnectTechnologies done

12 years agoservice: Set autoconnect according to configured preferences
Patrik Flykt [Thu, 5 Apr 2012 19:38:34 +0000 (22:38 +0300)]
service: Set autoconnect according to configured preferences

12 years agomain: Add 'DefaultAutoConnectTechnologies' configuration option
Patrik Flykt [Thu, 5 Apr 2012 19:38:33 +0000 (22:38 +0300)]
main: Add 'DefaultAutoConnectTechnologies' configuration option

The main.conf 'DefaultAutoConnectTechnologies' is a list of
service type strings. It is converted to a list of service type
enums, and thus the configuration option is accessible via the
function connman_setting_get_uint_list().

If this option is not specified, the default technologies to
autoconnect are wifi, ethernet and cellular just like before.

12 years agoservice: Add __connman_service_string2type() function
Patrik Flykt [Thu, 5 Apr 2012 19:38:32 +0000 (22:38 +0300)]
service: Add __connman_service_string2type() function

12 years agotimeserver: Check for resolv before accessing it
Alok Barsode [Thu, 5 Apr 2012 10:20:25 +0000 (13:20 +0300)]
timeserver: Check for resolv before accessing it

In order to cancel any ongoing resolution, check
if both resolv and resolv_id are valid.

12 years agotimeservers: Add Fallback Timerservers
Alok Barsode [Thu, 5 Apr 2012 10:20:24 +0000 (13:20 +0300)]
timeservers: Add Fallback Timerservers

Add Fallback timeservers via main.conf.

These timeservers are used for time corrections when
there are no valid timeservers provided by the user or by the
network. The list of timeservers which are queried for
timing correction are Timeservers.Configuration (set by the
user), service timeservers(via service), gateway, global
timeservers (via clock API) and fallback timeservers, in that order.

12 years agomain: Parse FallbackTimeservers list from main.conf
Alok Barsode [Thu, 5 Apr 2012 10:20:23 +0000 (13:20 +0300)]
main: Parse FallbackTimeservers list from main.conf

12 years agontp: Shorten NTP failure delay
Alok Barsode [Thu, 5 Apr 2012 10:20:22 +0000 (13:20 +0300)]
ntp: Shorten NTP failure delay

If the NTP server failed to respond, NTP client wait for 16 seconds
before trying the next server. But since now we have the default
gateway as a possible candidate for NTP (which has higher priority over
global timeaservers), there might be a chance that it might fail to
respond to a NTP query (e.g a wifi router without ntp support).
We have to wait for 16 sec, untill NTP switches to the next server.
This seems like a long period, especially if you made timezone changes
and you want the NTP sync to happen asap. Hence reducing this timeout to
5 seconds.

12 years agotest: Add set-timeservers
Alok Barsode [Thu, 5 Apr 2012 10:20:21 +0000 (13:20 +0300)]
test: Add set-timeservers

Add script to modify service Timeservers.Configuration property.

12 years agodoc: Add Timeserves.Configuration service property
Alok Barsode [Thu, 5 Apr 2012 10:20:20 +0000 (13:20 +0300)]
doc: Add Timeserves.Configuration service property

12 years agotimeserver: Add Timeservers.Configuration to timeserver list
Alok Barsode [Thu, 5 Apr 2012 10:20:19 +0000 (13:20 +0300)]
timeserver: Add Timeservers.Configuration to timeserver list

Add Timeservers.Configuration timerservers (if any) to the list of
timeservers for time correction query. Now the Order is
Timeserver.Config (via the user), service timeserver (via DHCP).
default gateway (system), global timeservers (via the user).

12 years agoservice: Add Timeservers.Configuration Property
Alok Barsode [Thu, 5 Apr 2012 10:20:18 +0000 (13:20 +0300)]
service: Add Timeservers.Configuration Property

This property helps to add service specific timeservers. These are set by the
user and are per service.

12 years agotimeserver: Add service gateway to timeserver list
Alok Barsode [Thu, 5 Apr 2012 10:20:17 +0000 (13:20 +0300)]
timeserver: Add service gateway to timeserver list

Add default service gateway to the timeserver query list.
Now the list is service timeservers (via DHCP), gateway and global
timeservers, in that order.

12 years agotimeserver: Create timeserver list
Alok Barsode [Thu, 5 Apr 2012 10:20:16 +0000 (13:20 +0300)]
timeserver: Create timeserver list

Create a timeserver list for NTP query. This list consists of
timeserver provided via DHCP and the ones set by user in that
order. We recreate this list everytime the default service changes
or one of the timeserver values change.

Use getaddrinfo to determine if the timeserver is a domain name or
a IP address.

12 years agotimeserver: Trigger ntp on default changed notifier
Alok Barsode [Thu, 5 Apr 2012 10:20:15 +0000 (13:20 +0300)]
timeserver: Trigger ntp on default changed notifier

Trigger NTP sync on default service going to READY/ONLINE state
instead of triggering NTP sync on ONLINE state only. This makes
sense for local ntp servers even if the wispr check fails.

12 years agoservice: Add __connman_service_get_default
Alok Barsode [Thu, 5 Apr 2012 10:20:14 +0000 (13:20 +0300)]
service: Add __connman_service_get_default

Export the default service via this api. This is helpful
to obtain info like default service's timeserver list and gateway.

12 years agoReplace older system timeserver values with new ones instead of appending
Alok Barsode [Thu, 5 Apr 2012 10:20:13 +0000 (13:20 +0300)]
Replace older system timeserver values with new ones instead of appending

Fixes BMC#24997.

12 years agomeego: Remove the meego plugin
Alok Barsode [Thu, 5 Apr 2012 10:20:12 +0000 (13:20 +0300)]
meego: Remove the meego plugin

The fallback Timeservers should replace this plugin.

12 years agogdbus: Use destroy callback for service watch
Anderson Lizardo [Tue, 3 Apr 2012 16:14:58 +0000 (12:14 -0400)]
gdbus: Use destroy callback for service watch

Even though service watches accepted a "destroy" callback, they were
being ignored. This fix properly pass them along so they are called when
the watch is removed.

12 years agogdbus: Fix white space coding style issue
Syam Sidhardhan [Sun, 26 Jun 2011 21:56:04 +0000 (03:26 +0530)]
gdbus: Fix white space coding style issue

- corrected the space before '{'

12 years agoconnection: Add host route for VPN when setting default gateway
Jukka Rissanen [Tue, 3 Apr 2012 11:04:46 +0000 (14:04 +0300)]
connection: Add host route for VPN when setting default gateway

This is needed so that VPN gets default route when moving
services. That can happen if VPN did not had default route
before.

12 years agoconnection: Remove wrong VPN route
Jukka Rissanen [Tue, 3 Apr 2012 11:04:45 +0000 (14:04 +0300)]
connection: Remove wrong VPN route

Before this patch the system created following routes for VPN

Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         192.168.10.9    0.0.0.0         UG    0      0        0 vpn0
192.168.2.0     0.0.0.0         255.255.255.0   U     0      0        0 wlan0
192.168.2.1     0.0.0.0         255.255.255.255 UH    0      0        0 vpn0
192.168.2.1     0.0.0.0         255.255.255.255 UH    0      0        0 wlan0
192.168.10.1    192.168.10.9    255.255.255.255 UGH   0      0        0 vpn0
192.168.10.9    0.0.0.0         255.255.255.255 UH    0      0        0 vpn0

Here the route to gateway in wlan0 192.168.2.1 via vpn0 is not
correct and it will prevent connections to 192.168.2.1

The correct routes should be:

Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         192.168.10.9    0.0.0.0         UG    0      0        0 vpn0
192.168.2.0     0.0.0.0         255.255.255.0   U     0      0        0 wlan0
192.168.2.1     0.0.0.0         255.255.255.255 UH    0      0        0 wlan0
192.168.10.1    192.168.10.9    255.255.255.255 UGH   0      0        0 vpn0
192.168.10.9    0.0.0.0         255.255.255.255 UH    0      0        0 vpn0

Fixes MBC#25035

12 years agoinet: Build failure fix
Patrik Flykt [Thu, 5 Apr 2012 12:32:50 +0000 (15:32 +0300)]
inet: Build failure fix

"The format modifier for size_t is %zd." (Marcel, 20/12/2011)

12 years ago6to4: Connectivity check was done too early
Jukka Rissanen [Thu, 5 Apr 2012 09:04:08 +0000 (12:04 +0300)]
6to4: Connectivity check was done too early

The 6to4 code checks that we can connect to ipv6.connman.net
host via tunnel. The check can be done only after we have the
tunnel up and running. The patch makes sure that we do the
checks only after we have got newlink message from rtnl.

12 years agogweb: Add more debug prints when error happens
Jukka Rissanen [Thu, 5 Apr 2012 09:04:07 +0000 (12:04 +0300)]
gweb: Add more debug prints when error happens

These prints are useful when checking why network
connection failed.

12 years ago6to4: Add web debug prints
Jukka Rissanen [Thu, 5 Apr 2012 09:04:06 +0000 (12:04 +0300)]
6to4: Add web debug prints

In order to see what is the problem with web connection,
add debug print function.

12 years agoinet: Refactor rtnl functions in 6to4.c
Jukka Rissanen [Thu, 5 Apr 2012 09:04:05 +0000 (12:04 +0300)]
inet: Refactor rtnl functions in 6to4.c

The rtnl support functions are now in inet.c which is a
more logical place for them and now other files can also
use them.

12 years agoconnection: Set additional point-to-point route
Jukka Rissanen [Tue, 27 Mar 2012 07:59:58 +0000 (10:59 +0300)]
connection: Set additional point-to-point route

This is useful if P-t-P link does not have a default route.

Fixes BMC#25027

12 years agoservice: Nameservers behind P-t-P link need special handling
Jukka Rissanen [Tue, 27 Mar 2012 07:59:57 +0000 (10:59 +0300)]
service: Nameservers behind P-t-P link need special handling

Setting routes to nameservers need special setup if the
nameservers are behind point-to-point link, the gateway
must not be set in this case.

12 years agonet: Add functions to get dest address of P-t-P link
Jukka Rissanen [Tue, 27 Mar 2012 07:59:56 +0000 (10:59 +0300)]
net: Add functions to get dest address of P-t-P link

These functions are needed when we need to setup a route
to point-to-point link destination address. The route is
needed if P-t-P link does not have a default route.

12 years agotodo: Mark split tunneling/routing done
Jukka Rissanen [Thu, 5 Apr 2012 09:00:54 +0000 (12:00 +0300)]
todo: Mark split tunneling/routing done

12 years agoconnection: Remove original default route only when needed
Jukka Rissanen [Thu, 5 Apr 2012 09:00:53 +0000 (12:00 +0300)]
connection: Remove original default route only when needed

If the new VPN gateway has split routing set, then do not
clear original default route because VPN will not set the
default route. Without this check we would not get any
proper default route set.

12 years agoservice: Return service split routing status
Jukka Rissanen [Thu, 5 Apr 2012 09:00:52 +0000 (12:00 +0300)]
service: Return service split routing status

12 years agoconnection: Update service list order
Jukka Rissanen [Thu, 5 Apr 2012 09:00:51 +0000 (12:00 +0300)]
connection: Update service list order

This is done as we might have changed the order of the services
so force update of the service list.

12 years agoservice: Add function to update the service list order
Jukka Rissanen [Thu, 5 Apr 2012 09:00:50 +0000 (12:00 +0300)]
service: Add function to update the service list order

12 years agoservice: Save/load split routing information for VPN
Jukka Rissanen [Thu, 5 Apr 2012 09:00:49 +0000 (12:00 +0300)]
service: Save/load split routing information for VPN

12 years agoservice: Allow user to do split routing for VPN services
Jukka Rissanen [Thu, 5 Apr 2012 09:00:48 +0000 (12:00 +0300)]
service: Allow user to do split routing for VPN services

The split routing is done when user moves the services and it is only
done if there are routes defined for that specific VPN provider.

12 years agoprovider: Check if there are any routes for the provider
Jukka Rissanen [Thu, 5 Apr 2012 09:00:47 +0000 (12:00 +0300)]
provider: Check if there are any routes for the provider

12 years agoprovider: Allow user to set routes when creating provider
Jukka Rissanen [Thu, 5 Apr 2012 09:00:46 +0000 (12:00 +0300)]
provider: Allow user to set routes when creating provider

12 years agoprovider: Save and load user specified routes
Jukka Rissanen [Thu, 5 Apr 2012 09:00:45 +0000 (12:00 +0300)]
provider: Save and load user specified routes

12 years agoprovider: Add support for user defined routes
Jukka Rissanen [Thu, 5 Apr 2012 09:00:44 +0000 (12:00 +0300)]
provider: Add support for user defined routes

Allow user to add routes when setting up VPN. This is useful if
the VPN cannot be configured to setup additional routes itself.

12 years agoupdate Gustavo's email address
Gustavo Padovan [Wed, 4 Apr 2012 03:49:56 +0000 (00:49 -0300)]
update Gustavo's email address

The old one is not valid anymore.

12 years agoofono: Fix NULL pointer access in set_disconnect()
Daniel Wagner [Fri, 30 Mar 2012 14:16:55 +0000 (16:16 +0200)]
ofono: Fix NULL pointer access in set_disconnect()

oFono sends several ConnectionContext.PropertyChanged("Active", False)
after it was told to disconnect.

After studying the oFono part, it looks like that serveral CREGS updates
could trigger oFono to send us the same flag over and over again
(see ofono_gprs_status_notify()).

Even though oFono might missbehave, ConnMan should not crash so
easily. Luckely, the fix is very simple. We should just check if we still
have a valid network pointer before accessing it.

Fixes BMC#25026

12 years agodnsproxy: Refactor request destroy code
Daniel Wagner [Mon, 26 Mar 2012 06:54:17 +0000 (08:54 +0200)]
dnsproxy: Refactor request destroy code

Move common code into a function for destroying the request data.

12 years agoprovider: Free provider when destructing it
Jukka Rissanen [Tue, 20 Mar 2012 12:20:01 +0000 (14:20 +0200)]
provider: Free provider when destructing it

Valgrind reports memory leak here.

12 years agovpn: Unref provider properly
Jukka Rissanen [Tue, 20 Mar 2012 10:37:57 +0000 (12:37 +0200)]
vpn: Unref provider properly

The provider can be unreffed in vpn_died() or in vpn_disconnect().
We must do the unref only once.

12 years agodnsproxy: Remove pending requests before destroying the channel
Julien Massot [Wed, 14 Mar 2012 08:59:07 +0000 (08:59 +0000)]
dnsproxy: Remove pending requests before destroying the channel

This fixes a segfault in request_timeout when disabling tethering.

12 years agogweb: workaround for setsockopt failure
Sébastien Bianti [Tue, 20 Mar 2012 11:09:47 +0000 (12:09 +0100)]
gweb: workaround for setsockopt failure

Setting socket option BINDTODEVICE requires CAP_NET_RAW capability.

12 years agoTODO: Create tasks for main.conf variables
Patrik Flykt [Mon, 19 Mar 2012 12:36:25 +0000 (14:36 +0200)]
TODO: Create tasks for main.conf variables

12 years agoset-ipv6-method: The arguments have to be wrapped into a variant
Daniel Wagner [Mon, 19 Mar 2012 13:03:28 +0000 (14:03 +0100)]
set-ipv6-method: The arguments have to be wrapped into a variant

Fixes BMC#24986

12 years agoset-ipv4-method: The arguments have to be wrapped into a variant
Daniel Wagner [Mon, 19 Mar 2012 13:03:27 +0000 (14:03 +0100)]
set-ipv4-method: The arguments have to be wrapped into a variant

Fixes BMC#24986

12 years agolist-services: Print only identifier instead of path
Daniel Wagner [Mon, 19 Mar 2012 13:03:26 +0000 (14:03 +0100)]
list-services: Print only identifier instead of path

test-connman services also reports the identifier only. This makes
copy&paste with the mouse a bit simpler.

12 years agoservice: Fix refcount leak on ipconfigs
Daniel Wagner [Mon, 19 Mar 2012 12:50:41 +0000 (13:50 +0100)]
service: Fix refcount leak on ipconfigs

In __connman_service_connect() we call __connman_ipconfig_enable()
which takes a ref on the ipconfig object. Later when the service
state machine is updated service takes another ref.

When the device disapears during operation (the user didn't call
Service.Disconnect()), we do not call __connman_ipconfig_disable()
anymore which would drop one ref.

12 years agoipconfig: Disable IPv6 for new interfaces
Daniel Wagner [Mon, 19 Mar 2012 12:50:40 +0000 (13:50 +0100)]
ipconfig: Disable IPv6 for new interfaces

We don't have yet an ipconfig for this interface, that means
the service.c does not yet know this interface. In order to
be able to get into sync we disable IPv6 auto connection at this point.

If the service state machine decides to connect, it will enable it
again.

12 years agoipconfig: Track ipconfigs enabled/disabled state
Daniel Wagner [Mon, 19 Mar 2012 12:50:39 +0000 (13:50 +0100)]
ipconfig: Track ipconfigs enabled/disabled state

12 years agoipconfig: Do not enable IPv6 ipconfigs when loading the properties
Daniel Wagner [Mon, 19 Mar 2012 12:50:38 +0000 (13:50 +0100)]
ipconfig: Do not enable IPv6 ipconfigs when loading the properties

When enabling IPv6 when loading the Service properties, the Service
state machine gets out of sync when AutoConnect is disabled.

At this point we should only load the properties and let the
Service state machine decide when to enable the ipconfigs.
And the good news is that the core handles this already.

12 years agoservice: Enable AutoConnect for new ethernet services
Daniel Wagner [Mon, 19 Mar 2012 12:50:37 +0000 (13:50 +0100)]
service: Enable AutoConnect for new ethernet services

We need also to set the Favorite flag to true in order to let
the services to be auto connected.

12 years agoservice: Load/store AutoConnect and Favorite properties for ethernet
Daniel Wagner [Mon, 19 Mar 2012 12:50:36 +0000 (13:50 +0100)]
service: Load/store AutoConnect and Favorite properties for ethernet

12 years agoethernet: Do not connect network on LOWER_UP
Daniel Wagner [Mon, 19 Mar 2012 12:50:35 +0000 (13:50 +0100)]
ethernet: Do not connect network on LOWER_UP

Ethernet networks should honor the AutoConnect feature as the rest
of the network types.

Just register the network object at the core when we get LOWER_UP.
Then the core can decide when to connect to the network.

There is no behavior change when AutoConnect is enabled, So if the
user plugs the cable the ethernet network will automatically connect
as it was before.

If AutoConnect is disabled, the core will not connect to the network
automatically.

12 years agovpn: Remove wrong include of <glib/ghash.h>
Marcel Holtmann [Mon, 19 Mar 2012 23:13:09 +0000 (16:13 -0700)]
vpn: Remove wrong include of <glib/ghash.h>

12 years agowispr: do not take care about http_proxy
Tomasz Bursztyka [Thu, 15 Mar 2012 08:49:16 +0000 (10:49 +0200)]
wispr: do not take care about http_proxy

12 years agowispr: do not lookup for proxy if service does not provide any
Tomasz Bursztyka [Thu, 15 Mar 2012 08:49:15 +0000 (10:49 +0200)]
wispr: do not lookup for proxy if service does not provide any

12 years agoconnection: Try to avoid having two default gateways
Jukka Rissanen [Wed, 14 Mar 2012 15:28:59 +0000 (17:28 +0200)]
connection: Try to avoid having two default gateways

It is possible that because the rtnl messages arrive
asynchronously, we might end up having two default gateways
that are both active at the same time. If that happens, we try
to downgrade the one that is not yet active.

12 years agoconnection: Remove obsolete routes for VPN
Jukka Rissanen [Wed, 14 Mar 2012 15:28:58 +0000 (17:28 +0200)]
connection: Remove obsolete routes for VPN

12 years agoconnection: Check all active gateways in update
Jukka Rissanen [Wed, 14 Mar 2012 15:28:57 +0000 (17:28 +0200)]
connection: Check all active gateways in update

There can be multiple active gateways in the system at the same
time so we must check them all when updating gateway info.

12 years agoconnection: Get correct VPN phy link data
Jukka Rissanen [Wed, 14 Mar 2012 15:28:56 +0000 (17:28 +0200)]
connection: Get correct VPN phy link data

VPN could be using wrong phy link data if there are multiple
active links.

12 years agoconnection: Do not set host routes in VPN case
Jukka Rissanen [Wed, 14 Mar 2012 15:28:55 +0000 (17:28 +0200)]
connection: Do not set host routes in VPN case

These routes are not needed.

12 years agoconnection: Avoid stale memory access
Jukka Rissanen [Wed, 14 Mar 2012 15:28:54 +0000 (17:28 +0200)]
connection: Avoid stale memory access

Get the active gateway pointer only after the gateway hash
has been manipulated by add_gateway(). It is possible that
we are accessing stale pointer otherwise.

12 years agoservice: Check redundant default changed notify
Jukka Rissanen [Wed, 14 Mar 2012 15:28:53 +0000 (17:28 +0200)]
service: Check redundant default changed notify

Notify default service changed only if we actually changed
the default service.

12 years agoservice: Allow removing only certain type nameservers
Jukka Rissanen [Wed, 14 Mar 2012 15:28:52 +0000 (17:28 +0200)]
service: Allow removing only certain type nameservers

When nameserver are removed by __connman_connection_gateway_remove()
then remove only certain type nameserver (IPv4 or IPv6). This is
needed so that we do not loose IPv4 routes if only IPv6 nameservers
are to be removed. This is needed when there are multiple connected
services.

12 years agoconnection: Remove nameserver routes only once
Jukka Rissanen [Wed, 14 Mar 2012 15:28:51 +0000 (17:28 +0200)]
connection: Remove nameserver routes only once

12 years agoconnection: Trigger service updates only after setting gateways
Jukka Rissanen [Wed, 14 Mar 2012 15:28:50 +0000 (17:28 +0200)]
connection: Trigger service updates only after setting gateways

This is needed so that gateways are set properly when service
triggers online checks.

12 years agoconnection: Fix debugging prints
Jukka Rissanen [Wed, 14 Mar 2012 15:28:49 +0000 (17:28 +0200)]
connection: Fix debugging prints

12 years agoinet: Fix debugging prints
Jukka Rissanen [Wed, 14 Mar 2012 15:28:48 +0000 (17:28 +0200)]
inet: Fix debugging prints

12 years agoRelease 0.79 0.79
Marcel Holtmann [Tue, 6 Mar 2012 18:23:11 +0000 (10:23 -0800)]
Release 0.79

12 years agotest: test-session does not exit any more when catching dbus exceptions
Tomasz Bursztyka [Tue, 6 Mar 2012 13:04:45 +0000 (15:04 +0200)]
test: test-session does not exit any more when catching dbus exceptions

Fixes BMC#24964

12 years agotest: Support the possibility to input multiple parameters into simple-agent
Tomasz Bursztyka [Tue, 6 Mar 2012 12:45:14 +0000 (14:45 +0200)]
test: Support the possibility to input multiple parameters into simple-agent

Fixes BMC#24965

12 years agotest: Add support of hidden service input into simple-agent
Tomasz Bursztyka [Tue, 6 Mar 2012 12:45:13 +0000 (14:45 +0200)]
test: Add support of hidden service input into simple-agent

12 years agoofono: Remove network whenever context is removed
Jussi Kukkonen [Thu, 1 Mar 2012 14:13:44 +0000 (16:13 +0200)]
ofono: Remove network whenever context is removed

Fixes BMC#24942

12 years agoofono: fix modem lookup in cm_context_added()
Jussi Kukkonen [Thu, 1 Mar 2012 14:13:43 +0000 (16:13 +0200)]
ofono: fix modem lookup in cm_context_added()

12 years agoipconfig: Fix broken attempt to handle {IPv4,IPv6}.Configuration
Marcel Holtmann [Mon, 5 Mar 2012 04:45:54 +0000 (20:45 -0800)]
ipconfig: Fix broken attempt to handle {IPv4,IPv6}.Configuration

12 years agoservice: Fix two small style issues
Marcel Holtmann [Mon, 5 Mar 2012 04:45:33 +0000 (20:45 -0800)]
service: Fix two small style issues

12 years agocore: Add extra checks for set property methods
Marcel Holtmann [Mon, 5 Mar 2012 04:34:19 +0000 (20:34 -0800)]
core: Add extra checks for set property methods

12 years agoclock: Revert change to accept variant of variant
Marcel Holtmann [Mon, 5 Mar 2012 04:33:57 +0000 (20:33 -0800)]
clock: Revert change to accept variant of variant

12 years agoAUTHORS: Metion Tim's contribution
Daniel Wagner [Thu, 1 Mar 2012 12:37:20 +0000 (13:37 +0100)]
AUTHORS: Metion Tim's contribution

12 years agoAUTHORS: Mention Otavio's contribution
Daniel Wagner [Thu, 1 Mar 2012 12:23:56 +0000 (13:23 +0100)]
AUTHORS: Mention Otavio's contribution

12 years agoipconfig: Accept variant types in __connman_ipconfig_set_config()
Tim Sander [Thu, 1 Mar 2012 12:35:32 +0000 (13:35 +0100)]
ipconfig: Accept variant types in __connman_ipconfig_set_config()

According the D-Bus API, the Service interface accepts
variant types.

12 years agoclock: Accept variant types in SetProperty
Tim Sander [Thu, 1 Mar 2012 12:29:44 +0000 (13:29 +0100)]
clock: Accept variant types in SetProperty

According the D-Bus API, the Clock interface accepts
variant types.

12 years agoservice: Fix ServiceRemoved signals
Patrik Flykt [Wed, 29 Feb 2012 14:25:44 +0000 (16:25 +0200)]
service: Fix ServiceRemoved signals

Removed services hash table need not be consulted when sending
ServicesAdded signals as the service structures have already been
deleted. Also clean up both added and removed hash tables after the
signals have been sent.

12 years agoinet: Ensure data->channel exist before accessing it
Otavio Salvador [Wed, 29 Feb 2012 08:20:24 +0000 (05:20 -0300)]
inet: Ensure data->channel exist before accessing it

Log of segfault:
...
connmand[676]: src/network.c:check_dhcpv6() reply (nil)
connmand[676]: src/network.c:check_dhcpv6() re-send router solicitation 3
connmand[676]: src/inet.c:__connman_inet_ipv6_send_rs()
connmand[676]: Aborting (signal 11) [connmand]

12 years agotechnology: Enable tech if device is already powered
Alok Barsode [Fri, 24 Feb 2012 14:17:59 +0000 (16:17 +0200)]
technology: Enable tech if device is already powered

connman_technology_add_device() calls __connman_device_enable()
but since the device is already enabled, the calls does not propagate
through to __connman_technology_enabled via connman_device_set_powered.

12 years agocore: Change coding style for passing NULL to time
Grant Erickson [Tue, 28 Feb 2012 17:55:53 +0000 (09:55 -0800)]
core: Change coding style for passing NULL to time

Pass NULL rather than 0 when calling time(2) to follow prefered
stylistic convention.

12 years agodhcpv4-client: Change coding style for passing NULL to time
Grant Erickson [Tue, 28 Feb 2012 17:55:52 +0000 (09:55 -0800)]
dhcpv4-client: Change coding style for passing NULL to time

Pass NULL rather than 0 when calling time(2) to follow prefered
stylistic convention.

12 years agogdhcp: set secs in a RFC 951- and 2131-compliant manner
Grant Erickson [Tue, 28 Feb 2012 16:30:00 +0000 (08:30 -0800)]
gdhcp: set secs in a RFC 951- and 2131-compliant manner

This patch sets the BOOTP secs field in a RFC 951- and 2131-compliant
manner for DHCPv4 DISCOVER and REQUEST/SELECT packets.

Certain DHCP servers, such as that implemented in Mac OS X (< 10.7)
for its "Internet Sharing" feature, refuse to issue a DHCP lease to
clients that have not set a non-zero value in their DISCOVER or
REQUEST packets. In fact, based on http://hints.macworld.com/article.php?
story=20071223001432304, it's not non-zero but a value greater than four (4)
seconds to allow another "authoritative" DHCP server on the subnet to reply
first.

Side-by-side packet analysis of Mac OS X, iOS, Android, ISC and
Windows clients show that these clients set the BOOTP 'secs' field and
are successfully issued a DHCP lease by Mac OS X. By contrast, a
connman-based client will issue 10 back-to-back DISCOVER packets and
will not be returned a DHCP OFFER from the server.

12 years agoAUTHORS: Mention Mario's contributions
Daniel Wagner [Tue, 28 Feb 2012 12:40:39 +0000 (13:40 +0100)]
AUTHORS: Mention Mario's contributions

12 years agoippool: Fix NULL pointer access
Mario Domenech Goulart [Tue, 28 Feb 2012 12:29:12 +0000 (09:29 -0300)]
ippool: Fix NULL pointer access

Not all allocated blocks info data structure have a pool associated.

12 years agoippool: Fix typo in error message
Mario Domenech Goulart [Tue, 28 Feb 2012 12:29:11 +0000 (09:29 -0300)]
ippool: Fix typo in error message

12 years agoofono: Remove obsolete DUN comment
Daniel Wagner [Tue, 28 Feb 2012 09:23:31 +0000 (10:23 +0100)]
ofono: Remove obsolete DUN comment