Daniel Wagner [Tue, 17 Apr 2012 12:59:01 +0000 (14:59 +0200)]
service: Update notifier on ONLINE state
Daniel Wagner [Tue, 17 Apr 2012 12:58:36 +0000 (14:58 +0200)]
notifier: Add __connman_notifier_online()
For indicating the we entered the ONLINE state.
Daniel Wagner [Tue, 17 Apr 2012 12:57:24 +0000 (14:57 +0200)]
notifier: Add old state to __connman_notifier_disconnect()
The old state helps to distinguish between the transissionts
from CONNECTED -> DISCONNECTED or ONLINE -> DISCONNECTED.
Marcel Holtmann [Tue, 17 Apr 2012 13:23:39 +0000 (15:23 +0200)]
doc: Add missing property for service timeservers
Marcel Holtmann [Tue, 17 Apr 2012 12:48:55 +0000 (14:48 +0200)]
doc: Mention the special offline handling for state property
Marcel Holtmann [Mon, 16 Apr 2012 09:31:32 +0000 (11:31 +0200)]
doc: Update global state property details
Marcel Holtmann [Tue, 17 Apr 2012 12:35:39 +0000 (14:35 +0200)]
notifier: Remove extra empty line
Marcel Holtmann [Tue, 17 Apr 2012 12:31:35 +0000 (14:31 +0200)]
log: Remove D-Bus iterators for debug properties
Marcel Holtmann [Tue, 17 Apr 2012 12:30:55 +0000 (14:30 +0200)]
manager: Remove experimental debug properties
Marcel Holtmann [Tue, 17 Apr 2012 12:28:39 +0000 (14:28 +0200)]
test: Remove handling of no longer existing properties
Marcel Holtmann [Tue, 17 Apr 2012 12:25:18 +0000 (14:25 +0200)]
manager: Make two global variables static
Daniel Wagner [Tue, 17 Apr 2012 11:31:49 +0000 (13:31 +0200)]
network: Remove unused function
Tomasz Bursztyka [Tue, 17 Apr 2012 10:54:24 +0000 (13:54 +0300)]
device: use g_hash_table_replace instead of insert function
Tomasz Bursztyka [Tue, 17 Apr 2012 10:54:23 +0000 (13:54 +0300)]
nat: use g_hash_table_replace instead of insert function
Tomasz Bursztyka [Tue, 17 Apr 2012 10:54:22 +0000 (13:54 +0300)]
task: use g_hash_table_replace instead of insert function
Tomasz Bursztyka [Tue, 17 Apr 2012 10:54:21 +0000 (13:54 +0300)]
vpn: use g_hash_table_replace instead of insert function
Tomasz Bursztyka [Tue, 17 Apr 2012 10:54:20 +0000 (13:54 +0300)]
bluetooth: use g_hash_table_replace instead of insert function
Jukka Rissanen [Tue, 17 Apr 2012 09:32:22 +0000 (12:32 +0300)]
service: Default service notifier is called too many times
The default service notifier is invoked even when the default
service has not been changed. This causes unnecessary dbus
signal traffic.
Fixes BMC#25030
Tomasz Bursztyka [Tue, 17 Apr 2012 09:27:41 +0000 (12:27 +0300)]
service: Use g_hash_table_replace instead of insert function
Tomasz Bursztyka [Tue, 17 Apr 2012 08:18:02 +0000 (11:18 +0300)]
service: Fix service_send_changed abort signal while cleaning up
Tomasz Bursztyka [Tue, 17 Apr 2012 07:10:07 +0000 (10:10 +0300)]
service: Schedule auto connect procedure to be ran on its own
Tomasz Bursztyka [Mon, 16 Apr 2012 13:21:38 +0000 (16:21 +0300)]
service: Do not autoconnect if service is getting removed
While unplugging ethernet cable,
__connman_service_remove_from_network() is called since
related network is getting cleaned up. Therefore ethernet
service goes from online/ready to disconnected, and end
to idle state. However, at that state auto_connect() is
called (even if this service is "planned" to disappear
due to network getting cleaned up) adn we end up with
ethernet network not disappearing, nor its related
service. We only need to set the service as "ignored", so
auto_connect will ignore that particular service.
Julien Massot [Fri, 13 Apr 2012 13:09:03 +0000 (13:09 +0000)]
supplicant: Remove trailing whitespace
Julien Massot [Fri, 13 Apr 2012 15:16:35 +0000 (15:16 +0000)]
service: Move setting of WPS input from agent to service.
Julien Massot [Fri, 13 Apr 2012 15:16:34 +0000 (15:16 +0000)]
service: Add function to check the WPS PIN validity
Julien Massot [Fri, 13 Apr 2012 15:16:33 +0000 (15:16 +0000)]
service: request_input_cb handle wps setting
Julien Massot [Fri, 13 Apr 2012 15:16:32 +0000 (15:16 +0000)]
network: Avoid connection to a network with invalid key
Julien Massot [Fri, 13 Apr 2012 15:16:31 +0000 (15:16 +0000)]
service: Check the passphrase validity
A WPA passphrase is 8..63 char length.
A WPA raw key is always 64 hex digit.
A Wep passphrase is either 5 or 13 characters
A WEP key is 10 or 26 hex digit.
Julien Massot [Fri, 13 Apr 2012 15:16:30 +0000 (15:16 +0000)]
gsupplicant: Interpret "invalid message format" as invalid-key error
If gsupplicant sends a malformed passphrase,
wpa_supplicant return an error "invalid message format",
parsing this error avoids future usage of this passphrase.
Patrik Flykt [Thu, 12 Apr 2012 11:45:05 +0000 (14:45 +0300)]
main.conf: Document main.conf options
Jukka Rissanen [Wed, 4 Apr 2012 08:38:40 +0000 (11:38 +0300)]
test: Remove set-address script
The script is quite useless because it changes the IP address
settings of all found services. The IP settings will be the same
for every service which is probably not what the user wants.
The set-ipv4-method and set-ipv6-method scripts can be used by
the user instead of set-address because those two scripts
will only change settings of one service.
Jukka Rissanen [Thu, 12 Apr 2012 11:30:50 +0000 (14:30 +0300)]
config: Warn user if no configuration is found
This is useful so that user gets information that he needs to
fix the config file.
Marcel Holtmann [Mon, 16 Apr 2012 15:57:08 +0000 (17:57 +0200)]
gdbus: Remove unneeded NEED_DBUS_WATCH_GET_UNIX_FD check
Marcel Holtmann [Mon, 16 Apr 2012 15:56:45 +0000 (17:56 +0200)]
build: Require D-Bus 1.4 or later
Patrik Flykt [Thu, 12 Apr 2012 09:54:32 +0000 (12:54 +0300)]
service: Check for settings list being non-NULL
Patrik Flykt [Wed, 11 Apr 2012 13:29:03 +0000 (16:29 +0300)]
TODO: Mark FallbackNameservers and FallbackTimeservers done
Patrik Flykt [Wed, 11 Apr 2012 13:29:02 +0000 (16:29 +0300)]
resolver: Append fallback nameservers
Append fallback nameservers, if any. Remove functions for adding
removing public nameservers since they are not used anymore.
Patrik Flykt [Wed, 11 Apr 2012 13:29:01 +0000 (16:29 +0300)]
main: Implement 'FallbackNameservers' main.conf option
Implement 'FallbackNameservers' main.conf configuration file
option. While parsing the list of nameservers, use only the ones
in numeric format.
Patrik Flykt [Wed, 11 Apr 2012 13:29:00 +0000 (16:29 +0300)]
google: Remove google nameserver plugin
Jukka Rissanen [Tue, 10 Apr 2012 07:28:20 +0000 (10:28 +0300)]
timeserver: Nameserver array was not freed
Jukka Rissanen [Tue, 10 Apr 2012 07:28:18 +0000 (10:28 +0300)]
timeserver: Timeserver array was not freed
Jukka Rissanen [Tue, 3 Apr 2012 11:07:24 +0000 (14:07 +0300)]
provider: Disconnect VPN when phy service is disconnected
If the VPN is connected and the underlaying service is
disconnected, then we must also disconnect the VPN if it
is still connected.
Patrik Flykt [Tue, 3 Apr 2012 09:13:36 +0000 (12:13 +0300)]
service: Schedule ServicesChanged signal to be sent
Whenever the sort order is updated, schedule ServicesChanged
signal to be sent.
Patrik Flykt [Tue, 3 Apr 2012 09:13:35 +0000 (12:13 +0300)]
service: Add ServicesChanged signal
Send ServicesChanged signal instead of consecutive ServicesAdded and
ServicesRemoved signals.
Marcel Holtmann [Fri, 30 Mar 2012 05:24:33 +0000 (07:24 +0200)]
doc: Remove ServicesAddedd and ServiceRemoved signals
Marcel Holtmann [Fri, 30 Mar 2012 05:24:32 +0000 (07:24 +0200)]
doc: Add ServicesChanged signal to manager API
Julien Massot [Wed, 4 Apr 2012 17:08:29 +0000 (17:08 +0000)]
test: Remove provision service
This script have to be removed since the provision API no longer exist.
Patrik Flykt [Wed, 11 Apr 2012 13:41:19 +0000 (16:41 +0300)]
Makefile: Remove test/provision-service from Makefile.am
Patrik Flykt [Thu, 5 Apr 2012 19:38:46 +0000 (22:38 +0300)]
TODO: Mark PreferredTechnologies (PriorityTechnologies) done
Patrik Flykt [Thu, 5 Apr 2012 19:38:45 +0000 (22:38 +0300)]
service: Update ordering regarding connected preferred service
When a new service goes online, run the service ordering check.
If the return value is -EAGAIN, neither service was preferred
and a new autoconnection attempt is done to find a preferred
service.
When a new service goes to ready state, run the service
ordering check similarly as with the online state. Since online
check will be run next, only re-attempt autoconnection when the
online check is known to have failed and the service will
stay at ready state.
Patrik Flykt [Thu, 5 Apr 2012 19:38:44 +0000 (22:38 +0300)]
service: Function for checking and updating service ordering
Update the service order checking with a lookup of preferred
technologies. If the new service is found to be preferred,
switch the order of the current default and the new service.
Do the same checks for the default service as currently in
online state default service checking; if the current default
service stays as default, return -EALREADY.
When neither service was found to be preferred, return -EAGAIN.
Patrik Flykt [Thu, 5 Apr 2012 19:38:43 +0000 (22:38 +0300)]
service: Try preferred technologies first, then normal autoconnect
When autoconnecting, try first with the list of preferred
technologies. If none can be connected or there are no preferred
technologies, do a normal autoconnect.
When autoconnecting preferred services, skip any non-favorite and
online ones in the list instead of ending the autoconnect procedure.
Patrik Flykt [Thu, 5 Apr 2012 19:38:42 +0000 (22:38 +0300)]
service: Factor out code for switching two services
Patrik Flykt [Thu, 5 Apr 2012 19:38:41 +0000 (22:38 +0300)]
service: Create preferred technology list
Look up services from the service list according to their types
using the entries in the 'PreferredTechnologies' string array.
Return the newly allocated service sequence to the caller.
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().
Patrik Flykt [Thu, 5 Apr 2012 19:38:39 +0000 (22:38 +0300)]
main: Free g_key_file config immediately after use
Patrik Flykt [Thu, 5 Apr 2012 19:38:35 +0000 (22:38 +0300)]
TODO: Mark DefaultAutoConnectTechnologies done
Patrik Flykt [Thu, 5 Apr 2012 19:38:34 +0000 (22:38 +0300)]
service: Set autoconnect according to configured preferences
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.
Patrik Flykt [Thu, 5 Apr 2012 19:38:32 +0000 (22:38 +0300)]
service: Add __connman_service_string2type() function
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.
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.
Alok Barsode [Thu, 5 Apr 2012 10:20:23 +0000 (13:20 +0300)]
main: Parse FallbackTimeservers list from main.conf
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.
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.
Alok Barsode [Thu, 5 Apr 2012 10:20:20 +0000 (13:20 +0300)]
doc: Add Timeserves.Configuration service property
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).
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.
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.
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.
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.
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.
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.
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.
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.
Syam Sidhardhan [Sun, 26 Jun 2011 21:56:04 +0000 (03:26 +0530)]
gdbus: Fix white space coding style issue
- corrected the space before '{'
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.
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
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)
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.
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.
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.
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.
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
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.
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.
Jukka Rissanen [Thu, 5 Apr 2012 09:00:54 +0000 (12:00 +0300)]
todo: Mark split tunneling/routing done
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.
Jukka Rissanen [Thu, 5 Apr 2012 09:00:52 +0000 (12:00 +0300)]
service: Return service split routing status
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.
Jukka Rissanen [Thu, 5 Apr 2012 09:00:50 +0000 (12:00 +0300)]
service: Add function to update the service list order
Jukka Rissanen [Thu, 5 Apr 2012 09:00:49 +0000 (12:00 +0300)]
service: Save/load split routing information for VPN
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.
Jukka Rissanen [Thu, 5 Apr 2012 09:00:47 +0000 (12:00 +0300)]
provider: Check if there are any routes for the provider
Jukka Rissanen [Thu, 5 Apr 2012 09:00:46 +0000 (12:00 +0300)]
provider: Allow user to set routes when creating provider
Jukka Rissanen [Thu, 5 Apr 2012 09:00:45 +0000 (12:00 +0300)]
provider: Save and load user specified 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.
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.
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
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.