Patrik Flykt [Wed, 1 Feb 2012 14:43:54 +0000 (16:43 +0200)]
device: Return -EOPNOTSUPP if the device does not support scanning
Patrik Flykt [Wed, 1 Feb 2012 14:43:53 +0000 (16:43 +0200)]
wifi: Always set scanning to FALSE in scan callback
By always setting scanning to FALSE in the scan callback,
information for a stopped scan will be processed in
device.c.
Jukka Rissanen [Fri, 3 Feb 2012 11:31:28 +0000 (13:31 +0200)]
vpn: Reference of provider not taken
VPN plugin hooks itself into rtnl newlink watch and gives
provider pointer as user data. We must take reference of the
user data pointer as otherwise we might access invalid pointer
if provider is already removed when rtnl watch is triggered.
This seems to be a rare issue but I had one valgrind crash
because of this.
Tomasz Bursztyka [Wed, 1 Feb 2012 14:38:18 +0000 (16:38 +0200)]
iptables: add capability to check for an existing rule
Tomasz Bursztyka [Wed, 1 Feb 2012 14:38:17 +0000 (16:38 +0200)]
iptables: refactor how an existing rule is found
Tomasz Bursztyka [Wed, 1 Feb 2012 14:38:16 +0000 (16:38 +0200)]
test: adding a fonction to compare a rule against the actual ones
Tomasz Bursztyka [Wed, 1 Feb 2012 14:38:15 +0000 (16:38 +0200)]
test: refactoring rule finding part into iptables-test
Daniel Wagner [Fri, 27 Jan 2012 14:32:01 +0000 (15:32 +0100)]
TODO: Remove IP ranges allocation and check entry
Daniel Wagner [Fri, 27 Jan 2012 14:10:58 +0000 (15:10 +0100)]
ipconfig: Add/del IP address from IP pool
Guillaume Zajac [Mon, 29 Aug 2011 09:32:36 +0000 (11:32 +0200)]
tethering: Add notification callback implementation
Daniel Wagner [Thu, 26 Jan 2012 14:07:45 +0000 (15:07 +0100)]
test-ippool: Add collision unit test
Daniel Wagner [Thu, 26 Jan 2012 13:30:17 +0000 (14:30 +0100)]
ippool: Add API to notify when IP is externally assigned
Guillaume Zajac [Mon, 29 Aug 2011 09:32:34 +0000 (11:32 +0200)]
tethering: Use IP pool API with DHCP
Guillaume Zajac [Mon, 29 Aug 2011 09:32:33 +0000 (11:32 +0200)]
tethering: Use IP pool API with private network
Daniel Wagner [Thu, 26 Jan 2012 15:03:32 +0000 (16:03 +0100)]
test-ippool: Add unit test for ippool
Daniel Wagner [Thu, 26 Jan 2012 15:46:37 +0000 (16:46 +0100)]
ippool: Add IP pool layer
This is based on Guillaume Zajac intial IP pool patches.
Daniel Wagner [Mon, 30 Jan 2012 14:46:16 +0000 (15:46 +0100)]
vpnc: Fix compiler warning
Assignment discards ‘const’ qualifier from pointer target type.
Daniel Wagner [Tue, 31 Jan 2012 15:41:51 +0000 (16:41 +0100)]
session: Send SessionMode property change message
Alok Barsode [Wed, 25 Jan 2012 12:16:41 +0000 (14:16 +0200)]
technology: Fix technology refcounting
technology_add_device and technology_add_rfkill should increment
technology refcount. The refcount denotes the total number of devices
and rfkill switches in the technology. Similarly technology_remove_device
and technology_remove_rfkill should decrement technology refcount.
Once the refcount is 0, which means that there are no devices and rfkill
switches in this technology, technology should be freed.
Alok Barsode [Mon, 30 Jan 2012 10:23:58 +0000 (12:23 +0200)]
technology: Create a list for technology orphaned rfkill switches
If we get a rfkill switch before the technology driver was registered we
would lose track of it as we currently ignoed it. Adding a global rfkill
hash table which can keep a track of technologyless switches untill the
driver for them is loaded. If the driver is not compiled in the switches
will remain in the hash but will not be handled by connman.
Alok Barsode [Mon, 30 Jan 2012 10:16:25 +0000 (12:16 +0200)]
technology: Create a list for technology orphaned devices
If we get a device before the technology driver was registered we
would lose track of it as we ignoed it. Adding a device list which
can keep a track of technologyless devices untill the driver for
them is loaded. If the driver is not compiled in the devices will
remain in the list.
Samuel Ortiz [Fri, 27 Jan 2012 10:49:38 +0000 (11:49 +0100)]
AUTHORS: Mention Guillaume Zajac's contributions
Daniel Wagner [Fri, 27 Jan 2012 10:46:15 +0000 (11:46 +0100)]
oFono: Update documentation
Explain how the plugin works for a GSM modem.
Daniel Wagner [Fri, 20 Jan 2012 13:27:46 +0000 (14:27 +0100)]
show-introspection: Fix technology introspection
Patrik Flykt [Wed, 25 Jan 2012 11:49:45 +0000 (13:49 +0200)]
provider: Don't remove a provider on error
When a provider indicates error, set the corresponding
service error but don't remove the provider.
Patrik Flykt [Wed, 25 Jan 2012 11:49:44 +0000 (13:49 +0200)]
provider: Load providers at provider driver registration time
Load all saved providers that have the same type as the provider
driver being registered. While looking through the storage dir
for directory entries starting with 'provider_', the respective
settings file needs to be opened in order to check the type.
Since the settings file is already opened, load all other settings
as well with the help of the previously factored out functions.
Patrik Flykt [Wed, 25 Jan 2012 11:49:43 +0000 (13:49 +0200)]
provider: Handle connman_provider_load() in provider_create()
Load provider data in provider_create() if provider_register()
returns success.
Patrik Flykt [Wed, 25 Jan 2012 11:49:42 +0000 (13:49 +0200)]
provider: Factor out service creation
Factor out the creation of a service when given a provider.
Patrik Flykt [Wed, 25 Jan 2012 11:49:41 +0000 (13:49 +0200)]
provider: Factor out keyfile loading
Factor out keyfile loading from connman_provider_load() into
a fuction of its own.
Patrik Flykt [Wed, 25 Jan 2012 11:49:40 +0000 (13:49 +0200)]
provider: Don't set provider->name when creating provider struct
Don't unnecessarily set provider->name to the value of the provider
identifier in connman_provider_get() since it's going to be reset
immediately to the supplied provider name.
Patrik Flykt [Wed, 25 Jan 2012 11:49:39 +0000 (13:49 +0200)]
vpn: Add check for properly initialized driver_hash
Patrik Flykt [Wed, 25 Jan 2012 11:49:38 +0000 (13:49 +0200)]
storage: Function to fetch all saved providers
Implement __connman_storage_get_providers() to fetch all stored
providers.
Daniel Wagner [Wed, 25 Jan 2012 09:14:48 +0000 (10:14 +0100)]
AUTHORS: Mention Daniel's contributions
Daniel Mack [Wed, 21 Dec 2011 10:18:20 +0000 (11:18 +0100)]
iptables: Avoid NULL pointer dereference in table_cleanup()
Patrik Flykt [Fri, 20 Jan 2012 14:30:39 +0000 (16:30 +0200)]
technology: Remove 'State' property from Technology
Patrik Flykt [Fri, 20 Jan 2012 14:30:38 +0000 (16:30 +0200)]
technology: Add 'Connected' Technology property
Set Technology property 'Connected' to true if at least one service
for the Technology is connected; false otherwise.
Jukka Rissanen [Fri, 20 Jan 2012 10:01:49 +0000 (12:01 +0200)]
network: Add caller information to ref/unref debug prints.
Jukka Rissanen [Fri, 20 Jan 2012 10:01:48 +0000 (12:01 +0200)]
device: Add caller information to ref/unref debug prints.
Jukka Rissanen [Fri, 20 Jan 2012 10:01:47 +0000 (12:01 +0200)]
provider: Add caller information to ref/unref debug prints.
Jukka Rissanen [Fri, 20 Jan 2012 10:01:46 +0000 (12:01 +0200)]
ipconfig: Add caller information to ref/unref debug prints.
Jukka Rissanen [Fri, 20 Jan 2012 10:01:45 +0000 (12:01 +0200)]
service: Add caller information to ref/unref debug prints.
This helps to pin point the exact line/function who is taking the reference.
Patrik Flykt [Fri, 20 Jan 2012 12:01:28 +0000 (14:01 +0200)]
test-connman: Use Powered property to enable/disable Technologies
Daniel Wagner [Fri, 20 Jan 2012 08:05:12 +0000 (09:05 +0100)]
technology: Add object path to TechnologyAdded signal
As it is described in the manager-api.txt document.
Jukka Rissanen [Fri, 20 Jan 2012 07:53:58 +0000 (09:53 +0200)]
dnsproxy: Check that cache is valid before accessing it.
The cache can become invalid by just disconnecting a service.
In that case we must not access the cache hash.
Jukka Rissanen [Tue, 10 Jan 2012 09:22:01 +0000 (11:22 +0200)]
network: Avoid double network disconnect.
Jukka Rissanen [Tue, 10 Jan 2012 09:22:00 +0000 (11:22 +0200)]
network: Refactor set_connected() function.
The set_connected() is split to two parts, the disconnect
part is in set_disconnected() function.
Daniel Wagner [Thu, 19 Jan 2012 10:24:16 +0000 (11:24 +0100)]
ofono: Cancel pending SetProperty
If the cellular technolgy is disabled while ConnMan is connected
to a cellular network, the plugin gets first a network_disconnect()
call and shortly after that a modem_disable(). network_disconnect()
will set org.ofono.ConnectionContext.Active to false while this call
is pending modem_disable() tries to set org.ofono.Modem.Online to false.
There is no point in waiting for the first call to succeed or fail.
Just cancel it and set the modem offline.
Fixes BMC#24651.
Jukka Rissanen [Thu, 19 Jan 2012 14:31:44 +0000 (16:31 +0200)]
provider: Remove provider from the hash properly
We must not just do connman_provider_unref(provider) as that will
leave the provider to the provider_hash and we will get free memory
access error. We can just remove the provider from the hash and
that will unref the provider automagically.
Jukka Rissanen [Thu, 19 Jan 2012 14:31:43 +0000 (16:31 +0200)]
provider: VPN service can be null
Alok Barsode [Wed, 18 Jan 2012 15:13:49 +0000 (15:13 +0000)]
technology: Fix g_dbus_emit_signal argument
Fixes BMC#24636
Patrik Flykt [Thu, 19 Jan 2012 12:27:51 +0000 (14:27 +0200)]
technology: Remove unused notifier functions
Patrik Flykt [Thu, 19 Jan 2012 12:27:50 +0000 (14:27 +0200)]
notifier: Remove unused technology notifiers
Since there only user of __connman_notifier_is_enabled()
and __connman_notifier_is_register() was removed with the
technology method calls in Manager, remove the now unnecessary
support functions.
Patrik Flykt [Thu, 19 Jan 2012 12:27:49 +0000 (14:27 +0200)]
technology: Add 'Powered' Technology property
Remove __connman_technology_enable/disable functions but reuse
their contents for 'Powered' property implementation. As a result
move code around as the new functions are now static.
Patrik Flykt [Thu, 19 Jan 2012 12:27:48 +0000 (14:27 +0200)]
manager: Remove EnableTechnology and DisableTechnology
Remove EnableTechnology and DisableTechnology D-Bus method calls
from Manager API.
Patrik Flykt [Wed, 18 Jan 2012 13:06:28 +0000 (15:06 +0200)]
test-manager: Pretty-print SessionMode as 'true'/'false'
Patrik Flykt [Wed, 18 Jan 2012 13:06:27 +0000 (15:06 +0200)]
test-manager: Update test-manager with Technology changes
test-manager now gets the full set of technology paths and
properties from Manager GetTechnologies() D-Bus method call.
Fixes BMC#24637
Jukka Rissanen [Wed, 18 Jan 2012 10:48:35 +0000 (12:48 +0200)]
ipconfig: Possible to have double unref
Because we do not check that origin pointer is not this ipconfig,
it is possible that we might try to unref the ipconfig one time
too many.
Something like this was seen in the log file:
connmand[19208]: src/ipconfig.c:enable_ipv6()
connmand[19208]: src/ipconfig.c:__connman_ipconfig_unref() ipconfig 0x47502f0 refcount 0
connmand[19208]: src/ipconfig.c:__connman_ipconfig_disable() ipconfig 0x47502f0
connmand[19208]: src/ipconfig.c:disable_ipv6()
connmand[19208]: src/ipconfig.c:__connman_ipconfig_unref() ipconfig 0x47502f0 refcount -1
Jukka Rissanen [Wed, 18 Jan 2012 14:46:37 +0000 (16:46 +0200)]
proxy: Service was saved but not referenced
Jukka Rissanen [Wed, 18 Jan 2012 14:46:36 +0000 (16:46 +0200)]
connection: Only take service ref when saving service
The fix
b68795352dd5a9ac41eab31c765ade0c88329a6e was only partly
working. We must only take the ref when we are saving stuff
to hash (no need to take ref if we are only modifying value
in the hash). This patch reverts the commit b68795
Jukka Rissanen [Wed, 18 Jan 2012 14:46:35 +0000 (16:46 +0200)]
service: Properly ref/unref the network
We only took reference to network when the network was
created by service. This needs to be changed as the network
might disappear while service is using network pointer.
So now we take network ref when necessary and release it
when service is removed or if underlaying network is changed.
Jukka Rissanen [Wed, 18 Jan 2012 14:46:34 +0000 (16:46 +0200)]
service: Refactor the service unref function
Jukka Rissanen [Wed, 18 Jan 2012 14:46:33 +0000 (16:46 +0200)]
service: Add ref counting debug
Jukka Rissanen [Wed, 18 Jan 2012 14:46:32 +0000 (16:46 +0200)]
service: Cleanup of already removed functionality
The commit
87318d768c9bf6842ec4dc74f03220ee8b6a9c72 removed
code from service but left the network_created flag intact.
This patch removes the useless flag.
Jukka Rissanen [Wed, 18 Jan 2012 13:25:02 +0000 (15:25 +0200)]
dhcpv6: Do not start release if we are not connected
We do not need to start the RELEASE procedure if we have not
yet contacted the server.
Jukka Rissanen [Wed, 18 Jan 2012 13:25:01 +0000 (15:25 +0200)]
network: Do not start IPv6 autoconfiguration if already pending
Jukka Rissanen [Wed, 18 Jan 2012 13:25:00 +0000 (15:25 +0200)]
dhcpv6: Prevent user from starting DHCPv6 multiple times
We must make sure that user cannot start DHCPv6 many times
for a given network.
Jukka Rissanen [Wed, 18 Jan 2012 13:24:59 +0000 (15:24 +0200)]
network: Add more debug prints
Jukka Rissanen [Wed, 18 Jan 2012 13:24:58 +0000 (15:24 +0200)]
network: Verify we are connected before starting DHCPv6
Jukka Rissanen [Wed, 18 Jan 2012 13:24:57 +0000 (15:24 +0200)]
dhcpv6: Add more debug prints
Jukka Rissanen [Wed, 18 Jan 2012 13:24:56 +0000 (15:24 +0200)]
dhcpv6: Do not wait answer to RELEASE message
We do not want to wait the answer to release message that
was sent to the DHCPv6 server because the reply from server
might take some time and we must continue the network
disconnect procedure. So we just inform the server that we
are done with the addresses but ignore server reply as there
is nothing to be done anyway after sending the release.
Daniel Wagner [Thu, 19 Jan 2012 08:03:47 +0000 (09:03 +0100)]
ofono: Register technology driver
With
e1d92d253c5db96bdc8fe2a21e463fc730570311 we need to register a driver
for each technology.
Fixes BMC#24702.
Alok Barsode [Thu, 12 Jan 2012 13:13:41 +0000 (15:13 +0200)]
technology: Register a technology is there's a driver for it
Connman should not handle technologies whose drivers are not compiled in.
This patch also avoids connman controlling the rfkill switches for
technologies not compiled in.
Fixes BMC#24549.
Alok Barsode [Thu, 12 Jan 2012 13:13:40 +0000 (15:13 +0200)]
ethernet: Add technology driver for handling ethernet
Alok Barsode [Thu, 12 Jan 2012 13:13:39 +0000 (15:13 +0200)]
technology: Assign driver to technology at creation time
No need to assign driver to technolog during driver registration.
Daniel Wagner [Mon, 16 Jan 2012 08:18:12 +0000 (09:18 +0100)]
dnsproxy: Fix invalid hash table cleanup
The remove_listener() should not call __connman_dnsproxy_remove_listener
because that function will modify the hash table.
Daniel Wagner [Fri, 13 Jan 2012 16:45:02 +0000 (17:45 +0100)]
ipconfig: Move connman_ipaddress declaration to connman.h
Daniel Wagner [Fri, 13 Jan 2012 16:39:08 +0000 (17:39 +0100)]
ipconfig: Rename previously public functions
Prefix them with a "__".
Daniel Wagner [Fri, 13 Jan 2012 16:39:07 +0000 (17:39 +0100)]
ipconfig: Move connman_ipconfig_* to connman.h
Non of those function are used in the plugins.
Let's move them to connman.h.
Daniel Wagner [Fri, 13 Jan 2012 15:05:31 +0000 (16:05 +0100)]
technology: Add missing args termination
Open argument list has to be terminated.
Tomasz Bursztyka [Fri, 13 Jan 2012 08:37:20 +0000 (10:37 +0200)]
test: Fixes enable/disable tethering script according to new API
Fixes BMC#24644
Samuel Ortiz [Fri, 13 Jan 2012 15:25:09 +0000 (16:25 +0100)]
gdhcp: Fix build failure
<inet.h> doesn't exist.
Yu A Wang [Mon, 19 Dec 2011 08:00:17 +0000 (03:00 -0500)]
connection: Fix service refcount
Service may be refcount two times when add_gateway for both ipv4 and
ipv6, we need to unref the service twice according when we have both
ipv6 and ipv4 gateway
Danny Jeongseok Seo [Fri, 13 Jan 2012 15:11:26 +0000 (16:11 +0100)]
service: Fix reply_pending in __connman_service_connect
Sébastien Bianti [Tue, 10 Jan 2012 09:49:16 +0000 (10:49 +0100)]
gweb: process_send_file after HTTP Header is sent
Daniel Wagner [Tue, 10 Jan 2012 13:30:38 +0000 (14:30 +0100)]
session: Undo empty D-Bus message check
This check is wrong.
Daniel Wagner [Tue, 10 Jan 2012 13:29:26 +0000 (14:29 +0100)]
provider: Undo empty D-Bus message check
This check is wrong.
Daniel Wagner [Tue, 10 Jan 2012 13:27:54 +0000 (14:27 +0100)]
agent: Undo empty D-Bus message check
This check is wrong.
Daniel Wagner [Tue, 10 Jan 2012 12:42:45 +0000 (13:42 +0100)]
AUTHORS: Mention Arjan's contributions
Daniel Wagner [Tue, 10 Jan 2012 12:39:23 +0000 (13:39 +0100)]
dnsproxy: Empty lines cleanup
Add and remove some empty lines.
Arjan van de Ven [Tue, 10 Jan 2012 00:08:56 +0000 (16:08 -0800)]
dnsproxy: Add cache refreshing logic
This patch adds logic to the DNS cache where it will refresh, rather than purge,
popular DNS entries when they expire. This will cut down latency for the user,
since he doesn't have to wait for a DNS resolve for his popular entries.
It also makes changing DNS servers (say, when joining a VPN) less expensive,
since the popular entries from the cache will be refreshed after the join,
rather than just being dropped
Arjan van de Ven [Tue, 10 Jan 2012 00:08:53 +0000 (16:08 -0800)]
dnsproxy: Add a "invalidate cache" function
When something changes in the network topology, we need to invalidate the cache.
This first implementation will delete all entries (which could have been done
more efficiently), but in later patches in this series we'll enhance this logic
to only delete the cached data, not the names. With keeping the names,
we can then re-lookup popular data in the new topology.
Arjan van de Ven [Tue, 10 Jan 2012 00:08:49 +0000 (16:08 -0800)]
dnsproxy: Deal nicer with a cache-full situation
Now that we have hit counts for the cache, we can make the cache-full
handling slightly smarter; if we can't make space freeing expired entries,
we can now make space freeing entries that have a very low use count.
Arjan van de Ven [Tue, 10 Jan 2012 00:08:45 +0000 (16:08 -0800)]
dnsproxy: Track cache hit statistics
For various decisions (which entries to prune, which entries to refresh)
and for debugging, it's useful to track how many hits a cache entry
gets.
This patch adds the basic counting for this; the only tricky aspect
is that we serve DNS entries out of the cache, even in case of a miss,
so we need to compensate for that by subtracting a hit first.
Arjan van de Ven [Tue, 10 Jan 2012 00:08:42 +0000 (16:08 -0800)]
dnsproxy: Have a minimum cache TTL
some DNS servers return an extremely short TTL causing all kinds of fun.
This patch ensures that we just enforce a minimum TTL of 30 seconds.
Arjan van de Ven [Tue, 10 Jan 2012 00:08:37 +0000 (16:08 -0800)]
dnsproxy: Cache negative IPv6 entries for the case where we have an IPv4 entry already
It's very common for a client to ask for both IPv4 and IPv6 entries for a name,
however until now, Connman would only cache the IPv4 entry. The result is that the
client app still has the full latency of a lookup, the one for the AAAA record.
This patch will cause Connman to cache negative IPv6 entries, but only if a valid
IPv4 entry is already in the cache. The TTL for this negative entry is set to
the TTL of the existing IPv4 entry, with the rationale that these entries go together
anyway.
Arjan van de Ven [Tue, 10 Jan 2012 00:08:33 +0000 (16:08 -0800)]
dnsproxy: Send the correct TTL to our clients
When we send a cached entry to our clients, it won't do to report the TTL
from the original request to our client. The time that an entry has lived
in our cache needs to be subtracted from the TTL that we report to our client.
This patch adds a function to adjust the TTL of a response that we send,
and uses the newly stored "valid_until" value to compute the remaining TTL.
Arjan van de Ven [Tue, 10 Jan 2012 00:08:29 +0000 (16:08 -0800)]
dnsproxy: Start tracking the end time of the TTL
In order to be able to report an accurate TTL to our client (see next patch
to actually do that), we are going to need to track the end point in time
for this TTL. This also allows us to track separately how long an entry
is valid versus how long we want to cache the entry.
This patch also adds some logic to group end times of the various
cache entries to logical boundaries (10 and 30 seconds); this will
cause cache entries to expire together, which is more efficient in
power/performance, and also later when we add refreshing logic.
Arjan van de Ven [Tue, 10 Jan 2012 00:08:25 +0000 (16:08 -0800)]
dnsproxy: Delete expired cache entries when they expire
The DNS cache has logic to never replace cached data if it already exists.
However, this only works well if we actually delete the data parts
of the cache entries as they expire.
This patch creates a cache_enforce_validity() function, which will
delete the data portion of cache entries if they are expired.
With this in place, consecutive lookups of the same name can get
cached again.
Arjan van de Ven [Tue, 10 Jan 2012 00:08:21 +0000 (16:08 -0800)]
dnsproxy: Make sure "rr" is not NULL
I've caught some crashes with connman where "rr" ended up being NULL;
easy to add a check for this and prevent the crash.
Daniel Wagner [Tue, 10 Jan 2012 12:19:37 +0000 (13:19 +0100)]
test-connman: Remove unsupported passphrase support