Daniel Wagner [Wed, 7 Jul 2010 16:03:15 +0000 (18:03 +0200)]
Start/stop statistics depending on LOWER_UP state
The statistic counters should be updated as soon the
interface enters LOWER_UP state ('cable' connected).
Therefore we do not depend on the state of the
Service object, which fixes also the shortcoming
we have currently with private connections. Those
services do not enter the ONLINE state.
At least for ethernet the lower_up callback
has not been called because the service was
created 'too late'.
Daniel Wagner [Wed, 7 Jul 2010 12:43:38 +0000 (14:43 +0200)]
Initialize offset counters
The Service object needs the the first update of
the statistic counters to know the offset for its
calculation. Until now, the first timeout of timer
was used to update this values. This fix triggers
an update only for initialiting the offset values
and does not notify the counter clients.
Marcel Holtmann [Tue, 6 Jul 2010 15:47:36 +0000 (12:47 -0300)]
Remove the udev based RFKILL switch processing
Marcel Holtmann [Mon, 5 Jul 2010 13:23:21 +0000 (10:23 -0300)]
Make .mailmap rule simpler
Marcel Holtmann [Mon, 5 Jul 2010 13:17:55 +0000 (10:17 -0300)]
Add .mailmap file to fix Luiz's name spelling in git shortlog
Marcel Holtmann [Sat, 3 Jul 2010 08:21:52 +0000 (10:21 +0200)]
Add initial bits and pieces for Tethering support
Daniel Wagner [Wed, 30 Jun 2010 17:22:55 +0000 (19:22 +0200)]
Update service statistics
Instead of collecting statistics on interface name base and storing it
local in counter.c, update the Service object.
counter.c maps interface names to Service objects.
The assumption is made that there is a 1:1 mapping between Service objects
and interface name.
A Counter object will only show Service object statistics for services in
the ready state. There is no interface (yet) for retrieving information on
Service objects in idle/failure/configuration/.. state.
Daniel Wagner [Wed, 30 Jun 2010 11:59:51 +0000 (13:59 +0200)]
Add service statistic data structure
The static values are maintained in the Service object and exposed
through simple accessors.
When a Service object enters the ready state it registers itself at
Counter.
If the Service object is leaving the ready state it will de-register
itself from Counter and consequently it will not be updated anymore.
The user can shorten the update interval when he registers a Counter
object with a shorter interval value.
The statistic is stored in the profile file.
Only the current value is stored, no history.
If there is not Counter object the stats wont be upated. This short
coming will be addressed by the 'data threshold netfilter module'
patches.
Daniel Wagner [Wed, 30 Jun 2010 11:59:50 +0000 (13:59 +0200)]
Centralize rntl update timers
Instead of creating a new rntl trigger for each Counter object move this
part to the rtnl core. Only one update trigger will be registered at RTNL.
The minimum interval will used for the timeout callback.
Samuel Ortiz [Fri, 25 Jun 2010 15:36:12 +0000 (17:36 +0200)]
Set the network roaming toggle according to oFono status
oFono's NetworkRegistration interface gives a status propery indicating
(among other things) if we're roaming or not.
Samuel Ortiz [Fri, 25 Jun 2010 13:05:14 +0000 (15:05 +0200)]
Add the -g option to ntpd
This allows for setting the clock regardless of the time offset.
Samuel Ortiz [Fri, 25 Jun 2010 12:56:05 +0000 (14:56 +0200)]
Create service ipconfig only when it's NULL
If a service already has an allocated ipconfig layer but the corresponding
network index is negative, the only thing left to do is to set the ipconfig
index properly.
The oFono plugin toggles the network index between connection while the
service ipconfig layer stays alive.
Samuel Ortiz [Thu, 24 Jun 2010 13:57:02 +0000 (15:57 +0200)]
More realistic TODO list
Expand the TODO list with more tasks along with their priorities and
complexity. A more detailed task description is still missing.
Marcel Holtmann [Thu, 17 Jun 2010 12:47:06 +0000 (14:47 +0200)]
Release 0.54
Samuel Ortiz [Wed, 16 Jun 2010 21:42:46 +0000 (23:42 +0200)]
Use the network_update() routine for propagating strenght changes
Samuel Ortiz [Wed, 16 Jun 2010 21:41:30 +0000 (23:41 +0200)]
Add helper for network update
This is cleaner and more readable than going through the
network_set_group() routine.
Samuel Ortiz [Wed, 16 Jun 2010 15:06:58 +0000 (17:06 +0200)]
Track strength changes from oFono's registration interface
Samuel Ortiz [Wed, 16 Jun 2010 14:22:33 +0000 (16:22 +0200)]
Remove magic constants from dns request parsing code
Samuel Ortiz [Wed, 16 Jun 2010 14:01:01 +0000 (16:01 +0200)]
Support root requests with EDNS0 OPT records
A DNS request with a 0 length QNAME and an additional record (e.g. an
EDNS0 one) is a valid one. A root nameservers request sent by a client
requesting for EDNS0 is one of those.
So label_count can potentially be left at 0 with the EDNS0 record still
to be parsed. In that case label_ptr should just be moved one byte forward,
instead of staying at NULL. The latter will cause segmentation fault when
trying to dereference it from the EDNS0 record parsing code.
Kalle Valo [Mon, 14 Jun 2010 23:17:36 +0000 (01:17 +0200)]
Support for ppp default route setting
When gateway is NULL, we need to properly set our connection and element
string to 0.0.0.0 so that the interface is the default route.
Marcel Holtmann [Tue, 15 Jun 2010 07:26:14 +0000 (09:26 +0200)]
Mention Kalle's contributions
Kalle Valo [Fri, 11 Jun 2010 13:30:06 +0000 (16:30 +0300)]
ofono: Follow registration name changes
As the Name property in org.ofono.NetworkRegistration is sometimes empty
while the network is created, follow the property changes in
org.ofono.NetworkRegistration interface and set network name if the name
changes. Also the network name might change in certain rare cases,
so this needs to be handled in connman side.
Kalle Valo [Fri, 11 Jun 2010 13:29:59 +0000 (16:29 +0300)]
Send signal when service name changes
Needed for operator name changes in ofono.
Samuel Ortiz [Mon, 14 Jun 2010 20:09:42 +0000 (22:09 +0200)]
Use dedicated code path for fixed IP settings
Marcel Holtmann [Sat, 12 Jun 2010 12:57:30 +0000 (14:57 +0200)]
Fix invalid D-Bus path with finished scans without hidden SSIDs
Samuel Ortiz [Fri, 11 Jun 2010 23:13:21 +0000 (01:13 +0200)]
Enable hidden blocks only when hidden SSIDs are around
Samuel Ortiz [Fri, 11 Jun 2010 22:06:37 +0000 (00:06 +0200)]
Prevent wpa_supplicant from automatically associating to our hidden blocks
wpa_supplicant will never match a network block with an invalid BSSID
and an actual scan results, and thus will not select the latter for
association.
Samuel Ortiz [Fri, 11 Jun 2010 13:32:17 +0000 (15:32 +0200)]
Remove IPv4 element registration from the oFono plugin
This is no longer needed with the manual setting path adding the nameserver
as well.
Samuel Ortiz [Fri, 11 Jun 2010 13:24:10 +0000 (15:24 +0200)]
Add nameserver settings to the manual configuration setting
This is needed for ofono when the modem sends fixed IP settings, along
with namesevers.
Kalle Valo [Fri, 11 Jun 2010 06:12:06 +0000 (09:12 +0300)]
ofono: do not use context path as network group identifier
The ofono plugin was using context path as network group identifier
which caused service path to end something like this:
/profile/default/cellular_244053111242822_huawei2_primarycontext1
But the problem here is that with certain modems (like my Huawei E1552)
the path will change every time the modem in replugged. This meant
that a new connman service was created everytime and I had to
enter APN everytime, instead of using the stored service which already
had APN correctly set.
Fix this by using only the last part from path, for example in this
case primarycontext1:
/profile/default/cellular_244053111242822_primarycontext1
Now with huawei modems the service id stays always the same as it should.
Marcel Holtmann [Thu, 10 Jun 2010 23:57:22 +0000 (16:57 -0700)]
Return an error for invalid transaction on immutable services
Marcel Holtmann [Thu, 10 Jun 2010 23:24:26 +0000 (16:24 -0700)]
Only scan for hidden SSIDs from your favorites
Marcel Holtmann [Thu, 10 Jun 2010 14:46:26 +0000 (07:46 -0700)]
Fix potential uninitilized variable usage
Marcel Holtmann [Thu, 10 Jun 2010 14:42:53 +0000 (07:42 -0700)]
Prefer to use err instead of ret for variable names
Samuel Ortiz [Tue, 8 Jun 2010 19:43:58 +0000 (21:43 +0200)]
Set default gateway when route deletion fails
When del_routes fails, no gateway deletion event is sent and thus the
connection layer doesn't set a proper default gateway.
Samuel Ortiz [Mon, 7 Jun 2010 17:00:04 +0000 (19:00 +0200)]
Add some more portal plugin debug strings
Samuel Ortiz [Mon, 7 Jun 2010 15:03:13 +0000 (17:03 +0200)]
Update the configuration file documentation
The configuration file names should be *.config.
Samuel Ortiz [Thu, 3 Jun 2010 22:46:42 +0000 (00:46 +0200)]
Active scan hidden networks
A network block is added for all known SSIDs from the active profile. Then
those blocks are enabled one by one so that they're actively scanned. The
blocks are removed whenever their SSID appear in the scan results.
Samuel Ortiz [Thu, 3 Jun 2010 17:55:23 +0000 (19:55 +0200)]
wifi routine to fetch the saved SSIDs from the active profile
Kalle Valo [Fri, 4 Jun 2010 10:54:12 +0000 (13:54 +0300)]
Fix make clean
Running make clean twice in a row fails with error:
make: *** No rule to make target `include/connman', needed by `clean-local'.
Stop.
Fix it by moving the target as an argument for rm.
Marcel Holtmann [Thu, 3 Jun 2010 08:41:39 +0000 (01:41 -0700)]
Add support for ASCII based WEP keys
Marcel Holtmann [Thu, 3 Jun 2010 06:53:02 +0000 (23:53 -0700)]
Mention the IPv4.Method = fixed setting
Samuel Ortiz [Tue, 1 Jun 2010 00:16:35 +0000 (02:16 +0200)]
Remove default ntpd server
Default ntpd servers should be defined by plugins. Now the MeeGo one
sets a default server instead of hardcoding it from the ntpd plugin.
Samuel Ortiz [Mon, 31 May 2010 23:58:17 +0000 (01:58 +0200)]
Fix timeserver API
We want to keep the server pointer constant.
Samuel Ortiz [Mon, 31 May 2010 13:09:28 +0000 (15:09 +0200)]
ntpd plugin
The ntpd plugin triggers an ntpd -q task whenever a service goes online.
It either uses the meego ntp service or the one it potentially fetches
from a DHCP response.
Samuel Ortiz [Mon, 31 May 2010 13:05:58 +0000 (15:05 +0200)]
Complete timeserver API
The timeserver API now includes a sync() call in order to separate
timeserver peer addition from actual time syncing.
Marcel Holtmann [Fri, 28 May 2010 08:29:38 +0000 (10:29 +0200)]
Don't filter out interfaces within IP configuration
Marcel Holtmann [Tue, 25 May 2010 12:04:58 +0000 (14:04 +0200)]
Release 0.53
Marcel Holtmann [Tue, 25 May 2010 10:32:21 +0000 (12:32 +0200)]
Remove implemented items from the TODO list
Marcel Holtmann [Tue, 25 May 2010 09:06:03 +0000 (11:06 +0200)]
Break function declaration down to two lines
Gustavo F. Padovan [Tue, 25 May 2010 08:12:39 +0000 (05:12 -0300)]
Bring back -d option without need for argument
Daniel Wagner [Sat, 22 May 2010 17:57:22 +0000 (19:57 +0200)]
Add configuration file option for passphrase
Daniel Wagner [Thu, 20 May 2010 20:43:04 +0000 (22:43 +0200)]
Adapt to new MCC and MNC properties from oFono
Since oFono version 0.20 and later MobileNetworkCodeLength has been
deprecated. MobileCountryCode and MobileNetworkCode have to be used
instead.
Samuel Ortiz [Tue, 18 May 2010 21:37:42 +0000 (23:37 +0200)]
Use helper for checking rtnl message validity
Samuel Ortiz [Tue, 18 May 2010 21:13:36 +0000 (23:13 +0200)]
Fix set_property() indentation
Fix indentation errors introduced by the IPv4 setting code.
Samuel Ortiz [Tue, 18 May 2010 10:48:13 +0000 (12:48 +0200)]
Clear and set IPv4 settings when connected
If changed while connected, the IPv4 settings should be applied without
clients needing to go through a disconnect->connect cycle.
Samuel Ortiz [Tue, 18 May 2010 10:33:16 +0000 (12:33 +0200)]
network API for setting and clearing IPv4 settings on the fly
Samuel Ortiz [Tue, 18 May 2010 10:18:13 +0000 (12:18 +0200)]
Support RTPROT_KERNEL when adding/deleting routes
RTM_*ROUTE messages can come with an RTPROT_KERNEL protocol when setting
route after bringing the interface up.
Samuel Ortiz [Tue, 18 May 2010 10:13:51 +0000 (12:13 +0200)]
Unregister element's children by type
Add a new element API to be able to unregister an element's children
of a certain type.
Marcel Holtmann [Mon, 17 May 2010 07:26:17 +0000 (09:26 +0200)]
Fix memory leak with nameserver and domain configuration
Marcel Holtmann [Mon, 17 May 2010 07:17:38 +0000 (09:17 +0200)]
Add some extra comments for IPv4 and nameserver configuration
Marcel Holtmann [Sun, 16 May 2010 11:38:57 +0000 (13:38 +0200)]
Add example test tool for DNS resolver client
Samuel Ortiz [Fri, 14 May 2010 16:55:09 +0000 (18:55 +0200)]
Notify for technology disabling when removing a device
By not doing so the technology_enabled[] counter for the corresponding
service type is not decreased. Next time the device is plugged back any
client trying to switch the technology off will fail as the counter will
never go back to 0.
Marcel Holtmann [Fri, 14 May 2010 13:35:47 +0000 (15:35 +0200)]
Add some simple commands to cm utility
Marcel Holtmann [Thu, 13 May 2010 16:18:51 +0000 (18:18 +0200)]
Fix wrong return type of LookupService message
Marcel Holtmann [Thu, 13 May 2010 15:29:31 +0000 (17:29 +0200)]
Minor whitespace versus tab change
Marcel Holtmann [Thu, 13 May 2010 15:09:08 +0000 (17:09 +0200)]
Add method to retrieve sorted list of tuples for services
Marcel Holtmann [Thu, 13 May 2010 12:24:32 +0000 (14:24 +0200)]
Add initial support for LookupService helper method
Marcel Holtmann [Thu, 13 May 2010 11:59:11 +0000 (13:59 +0200)]
Internal functions should not have a __connman prefix
Marcel Holtmann [Thu, 13 May 2010 11:47:33 +0000 (13:47 +0200)]
Add error for not unique situations
Marcel Holtmann [Thu, 13 May 2010 11:10:02 +0000 (13:10 +0200)]
Fix massive amount of whitespace usage in configure.ac
Marcel Holtmann [Thu, 13 May 2010 11:08:32 +0000 (13:08 +0200)]
Check for dhclient hostname support
Marcel Holtmann [Thu, 13 May 2010 10:39:03 +0000 (12:39 +0200)]
Add support for setting per service domain list
Samuel Ortiz [Wed, 12 May 2010 22:28:05 +0000 (00:28 +0200)]
Portal check for Bluetooth, WiMAX and cellular networks
By not checking for a portal with those networks, they were left in a
connected state, never moving to online.
Samuel Ortiz [Wed, 12 May 2010 17:42:36 +0000 (19:42 +0200)]
Watch for Bluez network change signal
When a PANU server goes away, bluez sends a network change signal which
allows for a proper network disconnection. Without trapping this signal,
the PAN network state will stay in connected state.
Marcel Holtmann [Wed, 12 May 2010 18:13:31 +0000 (20:13 +0200)]
Add support for setting manual DNS server configuration
Marcel Holtmann [Wed, 12 May 2010 18:03:47 +0000 (20:03 +0200)]
Set system gateway correctly so it can be exported
Marcel Holtmann [Wed, 12 May 2010 17:16:37 +0000 (19:16 +0200)]
Add support for retrieving system hostname
Marcel Holtmann [Wed, 12 May 2010 17:15:13 +0000 (19:15 +0200)]
Send system hostname with dhclient execution
Marcel Holtmann [Wed, 12 May 2010 17:14:46 +0000 (19:14 +0200)]
Add support for getting current system hostname
Marcel Holtmann [Wed, 12 May 2010 16:37:03 +0000 (18:37 +0200)]
Export IPv4 gateway properly information if available
Marcel Holtmann [Wed, 12 May 2010 15:09:20 +0000 (17:09 +0200)]
Ignore invalid hostname provided by DHCP server
Forest Bond [Wed, 12 May 2010 00:56:06 +0000 (20:56 -0400)]
Fail immediately enabling/disabling unregistered technology
Previously, calling EnableTechnology or DisableTechnology with an
unregistered technology type caused the call to fail silently and
eventually timeout. With this patch, a "Not Registered" error is
returned immediately instead.
Martin Xu [Mon, 10 May 2010 07:25:36 +0000 (15:25 +0800)]
Check ssid_len before set WiFi.SSID of network
wpa_s 0.7.1 reports hidden network SSID as NULL, during scan. Conseqently,
the ssid of hidden network (which is set by user before) may be cleared,
and can not be connected anymore.
Marcel Holtmann [Sat, 8 May 2010 11:01:41 +0000 (13:01 +0200)]
Mention Forest's contributions
Marcel Holtmann [Sat, 8 May 2010 10:58:30 +0000 (12:58 +0200)]
Minor coding style update
Forest Bond [Thu, 6 May 2010 17:35:33 +0000 (13:35 -0400)]
Add support multiple nameservers in /etc/resolv.conf
Nameservers are appended to a local entry list. The MAXNS most recently
appended nameservers are written to /etc/resolv.conf in reverse order
(the most recently appended entry becomes the primary nameserver).
Martin Xu [Fri, 7 May 2010 08:39:48 +0000 (16:39 +0800)]
Export Gateway from service properties IPv4
Marcel Holtmann [Thu, 6 May 2010 05:49:25 +0000 (07:49 +0200)]
Update the Nameservers and Domains property description
Kalle Valo [Wed, 5 May 2010 14:02:50 +0000 (17:02 +0300)]
Remove set_powered() calls based on IFF_UP
wpa_supplicant 0.7.2+ (from git) didn't connect automatically to a wifi
network. I found out that this because of two calls to
connman_device_set_powered(), from wifi_newlink() and get_interface_reply().
The former was called first and causing the latter call not to trigger a
scan.
Because wpa_supplicant is initialised only in get_interface_reply(), and I
wasn't able to find a reason for the set_powered() call in wifi_newlink(),
the call in wifi_newlink() can be removed. Now connman will work with
both 0.6 and 0.7 versions of wpa_supplicant.
Also the supplicant_scan() is not needed, calling connman_device_set_powered()
in get_interface_reply() will trigger a scan.
Martin Xu [Wed, 5 May 2010 15:26:59 +0000 (23:26 +0800)]
Call __connman_notifier_connect() only when state is READY
If we call it at READY or ONLINE state, The function will be called
twice and connected times is set as two. And StateChanged signal "offline"
will never be emitted.
Commit
59a8daa3 ("ONLINE and LOGIN are also "connected" states.") added
a check for also state CONNMAN_SERVICE_STATE_LOGIN in
__connman_service_indicate_state(). But this meant that
__connman_notifier_connect() was called twice for each service, first in
READY state and then in LOGIN state. This broke refcounting in notifier.c
and caused a bug that Manager interface would always clame to be in
online state after a first successful connection even if all services were
disconnected.
Daniel Wagner [Thu, 29 Apr 2010 15:43:32 +0000 (17:43 +0200)]
Append Ethernet dictionary to cellular service properties
Martin Xu [Wed, 28 Apr 2010 10:25:45 +0000 (18:25 +0800)]
Set network associating to FALSE in pan_disconnect()
Otherwise, connman_network_set_connected() takes normal service
disconnect as connecting failure.
Martin Xu [Tue, 27 Apr 2010 09:49:12 +0000 (17:49 +0800)]
Check error before call dbus_message_get_args to acquire arguments
Function dbus_message_get_args just checks the signature which may
happens to be s(string), then it will just return TRUE, and the error
message is treated as return value.
So dbus_set_error_from_message is used to check the error, before
call dbus_message_get_args.
Mohamed Abbas [Tue, 20 Apr 2010 22:05:47 +0000 (15:05 -0700)]
Clean all VPN added host and gateway entries on VPN disconnect
When VPN disconnect we need to clean all gateway and host entries
correctly. VPN will add a gatway into active physical interface,
this entries need to be delete on VPN disconnect.
This patch fixes the issue of more than one defaut gateway showing up.
VPN gateway needs extra work to clean and set the gateway since it needs
a physical interface to set the host/gateway correctly.
Mohamed Abbas [Tue, 20 Apr 2010 22:05:46 +0000 (15:05 -0700)]
Fix issue with two default gateways when using VPN
This patch fixes the issue of more than one defaut gateway showing up.
This caused because VPN gatway was added but an active flag never
been set, which lead to two active gateway can be registered.
Forest Bond [Thu, 22 Apr 2010 19:56:12 +0000 (15:56 -0400)]
Split DHCP-provided nameserver string.
The DHCP-provided nameserver string is split up into separate nameservers.
Currently, only one nameserver can be stored in the connman_element.ipv4
structure, so all but the first of the DHCP-provided nameservers are thrown
out.
Johan Hedberg [Thu, 29 Apr 2010 22:23:45 +0000 (01:23 +0300)]
Fix parent path introspection data invalidation for multiple levels
In the case that parent path data needs to be invalidated we shouldn't
stop at the immediate parent if it doesn't have our own handler
registered but should continue upwards in the tree until we reach root
or our own handler.
Johan Hedberg [Thu, 29 Apr 2010 21:27:54 +0000 (00:27 +0300)]
Fix memory leak in g_dbus_register_interface
Daniel Wagner [Tue, 20 Apr 2010 14:30:17 +0000 (16:30 +0200)]
Fix typo: store password into service->password field