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
Daniel Wagner [Tue, 10 Jan 2012 08:12:23 +0000 (09:12 +0100)]
AUTHORS: Mention Flávio's contributions
Daniel Wagner [Mon, 9 Jan 2012 16:50:48 +0000 (17:50 +0100)]
session: Handle empty D-Bus message
Daniel Wagner [Mon, 9 Jan 2012 16:50:36 +0000 (17:50 +0100)]
provider: Handle empty D-Bus message
Daniel Wagner [Mon, 9 Jan 2012 16:50:20 +0000 (17:50 +0100)]
agent: Handle empty D-Bus message
In case the agent sends wrongly an empty reply.
Jukka Rissanen [Mon, 9 Jan 2012 12:14:22 +0000 (14:14 +0200)]
dnsproxy: Check compress flag properly.
Alok Barsode [Thu, 5 Jan 2012 12:41:13 +0000 (14:41 +0200)]
clock: Emit property changed signal when time property is channged.
Fixes BMC#23740.
Alok Barsode [Thu, 5 Jan 2012 12:41:12 +0000 (14:41 +0200)]
technology: There is no need for add_interface to refcount technology.
Alok Barsode [Thu, 5 Jan 2012 12:41:11 +0000 (14:41 +0200)]
technology: return a reply even if there are no devices in the technology list.
Alok Barsode [Thu, 5 Jan 2012 12:41:10 +0000 (14:41 +0200)]
inotify: Change inotify mask.
Use IN_CLOSE_WRITE instead of IN_MODIFY so the notifier
is called once only after all the changes are written.
Fixes BMC#23741.
Jukka Rissanen [Thu, 5 Jan 2012 10:55:10 +0000 (12:55 +0200)]
device: Disconnect service when disabling device
We should disconnect service instead of disconnecting network
when device is disabled. Otherwise service might still have
a pointer to network that is no longer valid.
Fixes BMC#24592
Jukka Rissanen [Thu, 5 Jan 2012 11:38:15 +0000 (13:38 +0200)]
dhcpv6: Allow address setting in IPv6 auto mode.
The DHCPv6 is used when doing autoconfiguration so we must allow
address setting/unsetting in auto mode.
Jukka Rissanen [Thu, 5 Jan 2012 11:38:14 +0000 (13:38 +0200)]
dhcpv6: Release message implemented.
Jukka Rissanen [Thu, 5 Jan 2012 11:38:13 +0000 (13:38 +0200)]
dhcpv6: Handle address expiration by restarting the stack.
Jukka Rissanen [Thu, 5 Jan 2012 11:38:12 +0000 (13:38 +0200)]
dhcpv6: Rebind message implemented.
Jukka Rissanen [Thu, 5 Jan 2012 11:38:11 +0000 (13:38 +0200)]
dhcpv6: Renew message implemented.
Jukka Rissanen [Thu, 5 Jan 2012 11:38:10 +0000 (13:38 +0200)]
dhcpv6: Request message implemented.
Jukka Rissanen [Thu, 5 Jan 2012 11:38:09 +0000 (13:38 +0200)]
dhcpv6: Initial stateful DHCPv6 support.
This patch contains solicitation message support.
Jukka Rissanen [Thu, 5 Jan 2012 11:38:08 +0000 (13:38 +0200)]
ipconfig: Return IPv6 privacy status.
Jukka Rissanen [Thu, 5 Jan 2012 11:38:07 +0000 (13:38 +0200)]
inet: Get router advertisement prefix option information.
Jukka Rissanen [Thu, 5 Jan 2012 11:38:06 +0000 (13:38 +0200)]
inet: Return router advertisement packet length in callback.
The length of the RA packet must be returned in callback,
otherwise callback cannot check RA options. The prefix length
RA option is needed in stateful DHCPv6 implementation.
Jukka Rissanen [Thu, 5 Jan 2012 09:42:08 +0000 (11:42 +0200)]
dhcpv6: Support stateless DHCPv6
See relevant parts from these RFCs:
RFC 3315 - DHCP for IPv6
RFC 3646 - DNS configuration options for DHCP for IPv6
RFC 3736 - Stateless DHCP service for IPv6
RFC 4075 - SNTP configuration option for DHCPv6
The patch does not support authenticated information messages.
Jukka Rissanen [Thu, 5 Jan 2012 09:42:07 +0000 (11:42 +0200)]
gdhcp: Generic stateless DHCPv6 support.
The patch adds support for information-request DHCPv6 message.
Yu A Wang [Thu, 5 Jan 2012 06:52:34 +0000 (01:52 -0500)]
ofono: Fix network name is null for CDMA network
Yu A Wang [Thu, 5 Jan 2012 06:52:26 +0000 (01:52 -0500)]
ofono: Fix no ip settings for CDMA network
When we add cdma network, we alloc the context for the modem, due
to add_network logic needs, then we need extract ip settings even
context is not NULL
Yu A Wang [Thu, 5 Jan 2012 06:52:14 +0000 (01:52 -0500)]
ofono: Create device for CDMA modem
For cdma modem, the property change for serial may after interfaces,
then we need to create device for cdma modem when we get serial property
Patrik Flykt [Thu, 5 Jan 2012 08:14:22 +0000 (10:14 +0200)]
manager: Remove manager 'Technologies' property
Remove 'Technologies' property from Manager API and the
code updating the property.
Patrik Flykt [Thu, 5 Jan 2012 08:14:21 +0000 (10:14 +0200)]
technology: Implement Manager API GetTechnologies method call
Patrik Flykt [Thu, 5 Jan 2012 08:14:20 +0000 (10:14 +0200)]
technology: Add 'TechnologyAdded' and 'TechnologyRemoved' signals
Jukka Rissanen [Tue, 3 Jan 2012 12:36:28 +0000 (14:36 +0200)]
service: Return all system defined nameservers when asked
The connman_service_get_nameservers() is changed to return
all system defined nameservers. This means that the function
now returns an allocated array of all nameservers and caller
must deallocate the returned array.
The change is needed so that we can combine the nameservers
that are set by DHCP code and the IPv6 nameservers that are
set by router advertisements.
Jukka Rissanen [Tue, 3 Jan 2012 12:36:27 +0000 (14:36 +0200)]
wispr: Retry online check for IPv6
Because IPv6 RA messages can come at any point when connection is
established, we might do wispr check before possible IPv6 DNS RA
is received so in that case wispr check could fail.
If wispr check fails for IPv6 we try to do the check once (after
waiting one second timeout) in a hope that system is configured
properly during that period.
Jukka Rissanen [Tue, 3 Jan 2012 12:36:26 +0000 (14:36 +0200)]
ipconfig: Have separate callbacks for route changes.
Route changes should not trigger ip_bound or ip_release callbacks
in service.c as that can cause too early transition into IPv6 ready state.
The ip_bound (in __connman_ipconfig_newaddr()) and ip_release (in
__connman_ipconfig_deladdr()) are enough to trigger a transition
in IPv6 state.
This also prevents too many notifier calls in session as we only
notify session when address changes.
Jukka Rissanen [Tue, 3 Jan 2012 12:31:28 +0000 (14:31 +0200)]
ipconfig: Address list for duplicates does not need gateway info.
The ipdevice address list is only used for detecting duplicate
addresses so there is no need to copy the gateway information
into the list. The same gateway data was actually used in every
list element which is not a correct thing to do as there would
be different gateways in IPv4 and IPv6 anyway.
Flávio Ceolin [Thu, 29 Dec 2011 17:48:40 +0000 (15:48 -0200)]
iptables: Small improvements on ipatables_init()
Just returning NULL instead of go to "err:" when
"table" is NULL, also removing a duplicated
g_free(module).
It's avoiding, at least, a "goto" + "g_free()" +
"table_cleanup()".
Tomasz Bursztyka [Thu, 29 Dec 2011 11:02:22 +0000 (13:02 +0200)]
wispr: using only the nameservers from requested service
Tomasz Bursztyka [Thu, 29 Dec 2011 11:02:21 +0000 (13:02 +0200)]
wispr: fixing a possible memory leak if interface index cannot be retrieved
Flavio Ceolin [Thu, 5 Jan 2012 10:01:45 +0000 (11:01 +0100)]
storage: Using the right free func
Fixing a segfault when it fails to store an information,
just using g_error_free instead of g_free.
Patrik Flykt [Thu, 22 Dec 2011 13:35:49 +0000 (15:35 +0200)]
manager: Remove DefaultTechnology and associated function
Patrik Flykt [Thu, 22 Dec 2011 13:35:48 +0000 (15:35 +0200)]
manager: Remove ConnectedTechnologies and associated function