platform/upstream/connman.git
11 years agopptp: Use PPPD prefix for pppd specific options
Jukka Rissanen [Mon, 18 Feb 2013 15:23:34 +0000 (17:23 +0200)]
pptp: Use PPPD prefix for pppd specific options

For backward compatibility purposes, support also the PPTP prefix
for PPPD options.

11 years agol2tp: Use PPPD prefix for pppd specific options
Jukka Rissanen [Mon, 18 Feb 2013 15:23:33 +0000 (17:23 +0200)]
l2tp: Use PPPD prefix for pppd specific options

For backward compatibility purposes, support also the L2TP prefix
for PPPD options.

11 years agol2tp: Add rx and tx bps pppd options
Jukka Rissanen [Mon, 18 Feb 2013 15:23:32 +0000 (17:23 +0200)]
l2tp: Add rx and tx bps pppd options

11 years agol2tp: Fixed the nodeflate pppd option name
Jukka Rissanen [Mon, 18 Feb 2013 15:23:31 +0000 (17:23 +0200)]
l2tp: Fixed the nodeflate pppd option name

11 years agoconfig: Read only wifi config
Jukka Rissanen [Mon, 18 Feb 2013 15:23:30 +0000 (17:23 +0200)]
config: Read only wifi config

11 years agoconfig: Remove obsolete definition
Jukka Rissanen [Mon, 18 Feb 2013 15:23:29 +0000 (17:23 +0200)]
config: Remove obsolete definition

11 years agoiptables: Cannot flush all rules without API to set them
Patrik Flykt [Mon, 18 Feb 2013 08:40:49 +0000 (10:40 +0200)]
iptables: Cannot flush all rules without API to set them

Currently there exists no API where iptables rules can be set. The flush
code does not touch the default chain policy at the moment. Any pre-
existing iptables rules setting default policy to reject and relying on
individual iptables rules allowing packets going through will prevent
all IP communication. Removing all iptables rules on startup can expose
the device to unwanted traffic as well.

For the time being disable iptables flush on init. Please be careful
with iptables rules and the masquerading ones ConnMan sets when
tethering.

11 years agogresolv: Optimize the response parser
Tomasz Bursztyka [Fri, 15 Feb 2013 10:30:29 +0000 (12:30 +0200)]
gresolv: Optimize the response parser

It will check first if the response belongs to a query,
before interpreting any of its content (rcode, count...).

11 years agogresolv: Do not remove a query on failure if other results are pending
Tomasz Bursztyka [Fri, 15 Feb 2013 10:30:19 +0000 (12:30 +0200)]
gresolv: Do not remove a query on failure if other results are pending

Fixes BMC#25973

In the case one of the resolving failed, the query is removed and
destroyed from the queue. So the responses of the requests sent to
the other namerservers - which might be successful - will thus be
lost since they cannot be matched anymore to their initial request.

11 years agogsupplicant: Return zero for max scan SSID parameter
Patrik Flykt [Thu, 14 Feb 2013 21:37:23 +0000 (23:37 +0200)]
gsupplicant: Return zero for max scan SSID parameter

A driver can return a valid max scan SSID value of zero. Thus no fast
scans can be done, so the code falls back to a simple scan instead.

A value of zero is properly handled in plugins/wifi.c. An active scan
for a hidden SSID adds only the SSID parameter to the wpa_supplicant
D-Bus method call, which wpa_supplicant then handles properly.

Some drivers also report a max scan SSID value of one. In some of the
cases that value is bogus, the driver will not be able to do a fast
scan anyway. In addition, it is questionable why only one SSID can be
fast scanned as the feature would not differ much from an active scan
for a hidden network. Thus we set the limit to two, i.e. zero or one
is treated as zero, two or more is reported as is.

Thanks to Grant Erickson and Tomasz Bursztyka for finding and
pinpointing this issue.

Fixes BMC#25971

11 years agogdbus: Add g_dbus_proxy_set_removed_watch
Denis Kenzior [Thu, 7 Feb 2013 16:22:57 +0000 (10:22 -0600)]
gdbus: Add g_dbus_proxy_set_removed_watch

11 years agounit: Fix wrong format identifier for size_t
Marcel Holtmann [Thu, 14 Feb 2013 21:43:23 +0000 (22:43 +0100)]
unit: Fix wrong format identifier for size_t

11 years agounit: Add test cases for SHA-1 based PBKDF2 and PRF
Marcel Holtmann [Thu, 14 Feb 2013 21:32:23 +0000 (22:32 +0100)]
unit: Add test cases for SHA-1 based PBKDF2 and PRF

11 years agoshared: Add helpers for SHA-1 based HMAC, PBKDF2 and PRF
Marcel Holtmann [Thu, 14 Feb 2013 21:27:33 +0000 (22:27 +0100)]
shared: Add helpers for SHA-1 based HMAC, PBKDF2 and PRF

11 years agoshared: Add generic debug and hexdump helpers
Marcel Holtmann [Thu, 14 Feb 2013 15:24:41 +0000 (16:24 +0100)]
shared: Add generic debug and hexdump helpers

11 years agogdbus: Fix missing PropertiesChanged signal
Vinicius Costa Gomes [Thu, 7 Feb 2013 17:40:31 +0000 (14:40 -0300)]
gdbus: Fix missing PropertiesChanged signal

If D-Bus ObjectManager is not supported, InterfacesAdded signal
checking needs to be ignored otherwise PropertiesChanged signal
will never be sent.

11 years agosystemd: Force daemon restart on failure
Jukka Rissanen [Thu, 24 Jan 2013 08:08:56 +0000 (10:08 +0200)]
systemd: Force daemon restart on failure

Important if you have a headless system.

11 years agoiptables: Update the hook entries correctly in iptables_delete_rule()
Daniel Wagner [Tue, 12 Feb 2013 09:19:55 +0000 (10:19 +0100)]
iptables: Update the hook entries correctly in iptables_delete_rule()

The builtin value is only valid in the chain head entry and not
in any other entry. That means we need to lookup the head entry
and use that builtin value (== hook id) and then update all
references which follow that chain.

11 years agoiptables: Test if match and target arguments are also the same
Daniel Wagner [Tue, 12 Feb 2013 09:19:54 +0000 (10:19 +0100)]
iptables: Test if match and target arguments are also the same

We need to verify that also the arguments are the same, e.g.
if we have two rules like

-t filter -A INPUT -m mark --mark 1 -j LOG
-t filter -A INPUT -m mark --mark 2 -j LOG

then the matcher and the target would be the same without looking
at '1' or '2'.

When deleting a rule, we would always remove the first
rule which matches the 'match' type and target type, so let's have a
look also on the arguments. iptables does it the same way.

11 years agotest-iptables: Add chain add remove tests
Daniel Wagner [Tue, 12 Feb 2013 09:19:53 +0000 (10:19 +0100)]
test-iptables: Add chain add remove tests

11 years agoiptables: Fix fallthrough rules
Daniel Wagner [Tue, 12 Feb 2013 09:19:52 +0000 (10:19 +0100)]
iptables: Fix fallthrough rules

11 years agotest-iptables: Add fallthrough unit test
Daniel Wagner [Tue, 12 Feb 2013 09:19:51 +0000 (10:19 +0100)]
test-iptables: Add fallthrough unit test

A fallthrough rule is a one which does not have a verdict, e.g.
ACCEPT, DROP etc.

11 years agoiptables: Remove unused __connman_iptables_command()
Daniel Wagner [Tue, 12 Feb 2013 09:19:50 +0000 (10:19 +0100)]
iptables: Remove unused __connman_iptables_command()

11 years agonat: Use new iptables API
Daniel Wagner [Tue, 12 Feb 2013 09:19:49 +0000 (10:19 +0100)]
nat: Use new iptables API

11 years agotest-nat: Move tests to test-iptables
Daniel Wagner [Tue, 12 Feb 2013 09:19:48 +0000 (10:19 +0100)]
test-nat: Move tests to test-iptables

These are iptables related tests. So let's move them over.

11 years agotest-iptables: Add unit test for the new API
Daniel Wagner [Tue, 12 Feb 2013 09:19:47 +0000 (10:19 +0100)]
test-iptables: Add unit test for the new API

11 years agoiptables: Add split out iptables commands
Daniel Wagner [Tue, 12 Feb 2013 09:19:46 +0000 (10:19 +0100)]
iptables: Add split out iptables commands

Instead of having a pure string based API, we add two new
main functions, __connman_iptables_append() and
__connman_iptables_remove(). The missing commands will be added later.

To simplify the whole code, the __connman_iptables_command() code
is refactored into smaller pieces: parse_rule_spec() calls a few
functions such as clear_tables_flags() and parse_xt_modules()
which should make the reading of the main parser loop simpler.

Also added a few comments on the parser which is really tricky.

11 years agonat: No need to 'nat' table anymore
Daniel Wagner [Tue, 12 Feb 2013 09:19:45 +0000 (10:19 +0100)]
nat: No need to 'nat' table anymore

This is done in iptables.c directly.

11 years agoiptables: Flush 'filter' 'mangle' and 'nat' table
Daniel Wagner [Tue, 12 Feb 2013 09:19:44 +0000 (10:19 +0100)]
iptables: Flush 'filter' 'mangle' and 'nat' table

The implementation is ugly but there is not much we can do about it, the
iptables API is being just plain stupid here.

11 years agoiptables: Add CONNMAN_IPTABLES_DEBUG environment variable
Daniel Wagner [Tue, 12 Feb 2013 09:19:43 +0000 (10:19 +0100)]
iptables: Add CONNMAN_IPTABLES_DEBUG environment variable

If CONNMAN_IPTABLES_DEBUG is set, then print the table when it is loaded
and print it the table which will be written.

Also use DBG() instead of connman_info().

11 years agoiptables: Remove dependency on table in iterator_entries_cb_t
Daniel Wagner [Tue, 12 Feb 2013 09:19:42 +0000 (10:19 +0100)]
iptables: Remove dependency on table in iterator_entries_cb_t

With removing the table argument the callback can now either
iterate over buffer we get from the kernel or the one we write
to the kernel.

11 years agoiptables: Do not pass table into dump_match() and dump_target()
Daniel Wagner [Tue, 12 Feb 2013 09:19:41 +0000 (10:19 +0100)]
iptables: Do not pass table into dump_match() and dump_target()

11 years agoiptables: Get rid of the iterator macro
Daniel Wagner [Tue, 12 Feb 2013 09:19:40 +0000 (10:19 +0100)]
iptables: Get rid of the iterator macro

Instead implement the iterator loop directly. Since both dump_entry()
and add_entry() have calculated 'builtin' and 'offset' let's pass in
them in as well.

In the next step we are able to remove also the table argument
which will allow us to unify the parsing the table we get
from IPT_SO_GET_ENTRIES and the table we will pass in to the kernel
via IPT_SO_SET_REPLACE.

11 years agoiptables: Clear global parser flags
Daniel Wagner [Tue, 12 Feb 2013 09:19:39 +0000 (10:19 +0100)]
iptables: Clear global parser flags

That allows the parser to be reentrantable.

11 years agoiptables: Make string arguments const
Daniel Wagner [Tue, 12 Feb 2013 09:19:38 +0000 (10:19 +0100)]
iptables: Make string arguments const

11 years agoiptables: Add some documentation
Daniel Wagner [Tue, 12 Feb 2013 09:19:37 +0000 (10:19 +0100)]
iptables: Add some documentation

These are some random notes but should give the next person to debug
iptables some introduction.

11 years agotest-iptables: Add unit test for iptables
Daniel Wagner [Tue, 12 Feb 2013 09:19:36 +0000 (10:19 +0100)]
test-iptables: Add unit test for iptables

11 years agogdbus: Don't call property changed callback during client init
Marcel Holtmann [Mon, 11 Feb 2013 19:19:10 +0000 (20:19 +0100)]
gdbus: Don't call property changed callback during client init

When the client uses ObjectManager to init properties, do not call
property changed callbacks. They should only be called once the proxy
added has been successfully signaled since the proxy itself provides
a full copy of available properties.

11 years agogdhcp: DHCP server IP address is stored in host order
Patrik Flykt [Mon, 11 Feb 2013 07:26:35 +0000 (09:26 +0200)]
gdhcp: DHCP server IP address is stored in host order

This change affects unicasted DHCP renew and release messages.
A DHCP server receiving packets via a raw socket will get all
packets destined to port 67. If the DHCP server checks the
intended server IP address, the request will fail. If the server
does not care about the IP address being used, it will send a
reply. The reply is not recognized by ConnMan since it is coming
from another IP address than what it was sent to. ConnMan will
retry quite a few times, but eventually settle down and use the
address even without a proper response from the server.

11 years agoipconfig: Use proper address structure when appending IPv4 info
Patrik Flykt [Mon, 4 Feb 2013 14:37:57 +0000 (16:37 +0200)]
ipconfig: Use proper address structure when appending IPv4 info

11 years agoservice: Validate the IP addresses before use
Patrik Flykt [Mon, 4 Feb 2013 14:37:56 +0000 (16:37 +0200)]
service: Validate the IP addresses before use

When setting IP address information via D-Bus, first create a new ipconfig
structure to hold the values. If the values were validated correctly, update
the service ipconfig structure with the new values. In order to achieve
this, refactor the existing code.

Fixes BMC#25930

11 years agoservice: Factor out ipconfig creation
Patrik Flykt [Mon, 4 Feb 2013 14:37:55 +0000 (16:37 +0200)]
service: Factor out ipconfig creation

The caller has to set the created ipconfig into its data structures.

11 years agoipconfig: Add checks for invalid IPv4/IPv6 addresses
Patrik Flykt [Mon, 4 Feb 2013 14:37:54 +0000 (16:37 +0200)]
ipconfig: Add checks for invalid IPv4/IPv6 addresses

Also fine tune returned errors.

11 years agotest: Fix simple-agent so it can run even if service files are missing
Tomasz Bursztyka [Mon, 4 Feb 2013 08:48:53 +0000 (10:48 +0200)]
test: Fix simple-agent so it can run even if service files are missing

Fixes BMC#25964

11 years agoipconfig: Do not overwrite gateway address
Jukka Rissanen [Fri, 1 Feb 2013 10:21:06 +0000 (12:21 +0200)]
ipconfig: Do not overwrite gateway address

If we have already received gateway address via newroute rtnl
message, then do not overwrite it when receiving newaddr message.

Fixes BMC#25931

11 years agogdbus: Fix unpublished interface signal emission
Johan Hedberg [Fri, 1 Feb 2013 15:03:22 +0000 (09:03 -0600)]
gdbus: Fix unpublished interface signal emission

If we haven't published an interface yet (i.e. it's in the data->added
list), we should just ignore any property changed indications as the
values for the properties will anyway be part of the InterfacesAdded
signal.

11 years agoRelease 1.11 1.11 upstream/1.11
Marcel Holtmann [Fri, 1 Feb 2013 08:10:47 +0000 (09:10 +0100)]
Release 1.11

11 years agodundee: Set network available is needed only when scanning
Patrik Flykt [Wed, 30 Jan 2013 12:09:57 +0000 (14:09 +0200)]
dundee: Set network available is needed only when scanning

11 years agoofono: Set network available is needed only when scanning
Patrik Flykt [Wed, 30 Jan 2013 12:09:41 +0000 (14:09 +0200)]
ofono: Set network available is needed only when scanning

11 years agoethernet: Set network available is needed only when scanning
Patrik Flykt [Wed, 30 Jan 2013 12:08:33 +0000 (14:08 +0200)]
ethernet: Set network available is needed only when scanning

11 years agoREADME: Add kernel options needed for tethering
Patrik Flykt [Wed, 30 Jan 2013 12:49:44 +0000 (14:49 +0200)]
README: Add kernel options needed for tethering

11 years agoTODO: Update TODO with Bluez 4.x removal task
Patrik Flykt [Tue, 29 Jan 2013 08:24:52 +0000 (10:24 +0200)]
TODO: Update TODO with Bluez 4.x removal task

11 years agobluetooth: Implement tethering for the Bluez 5 bluetooth plugin
Patrik Flykt [Mon, 28 Jan 2013 15:44:46 +0000 (17:44 +0200)]
bluetooth: Implement tethering for the Bluez 5 bluetooth plugin

11 years agotechnology: Support multiple technology drivers
Patrik Flykt [Mon, 28 Jan 2013 15:44:45 +0000 (17:44 +0200)]
technology: Support multiple technology drivers

As tethering is enabled on the technology level, both the bluetooth and
the bluetooth_legacy plugin need to register technology drivers for
CONNMAN_SERVICE_TYPE_BLUETOOTH. Modify the technology code to create
a list of registered technology drivers instead of a single technology
driver pointer.

11 years agobluetooth: Connect and disconnect a PAN NAP network
Patrik Flykt [Mon, 28 Jan 2013 15:44:44 +0000 (17:44 +0200)]
bluetooth: Connect and disconnect a PAN NAP network

Implement connect and disconnect functionality for a ConnMan network.
On network creation check the connection status of the Bluez 5 Network1
object and set the network to connected when needed.

11 years agoservice: Must not return NULL with a synchronous GDBus method call
Patrik Flykt [Mon, 28 Jan 2013 15:44:43 +0000 (17:44 +0200)]
service: Must not return NULL with a synchronous GDBus method call

If NULL is returned, GDBus will call the registered function repeatedly.

11 years agobluetooth: Expose Bluez 5 org.bluez.Network1 objects as networks
Patrik Flykt [Mon, 28 Jan 2013 15:44:42 +0000 (17:44 +0200)]
bluetooth: Expose Bluez 5 org.bluez.Network1 objects as networks

Create ConnMan networks for those Bluez 5 org.bluez.Network1/Device1
objects that support PAN NAP. A network is created or removed in response
to the Network1/Device1 being created or when the Device1 object's UUID
changed.

The ConnMan network struct is added to and removed from the ConnMan
device when the device is created, enabled or disabled.

11 years agonetwork: Allow more than one network driver register the same type
Patrik Flykt [Mon, 28 Jan 2013 15:44:41 +0000 (17:44 +0200)]
network: Allow more than one network driver register the same type

Allowing more than one network driver to register the same network type
requires the network driver to properly identify which networks belong
to it in the network driver probe function.

11 years agobluetooth_legacy: Check network in probe function
Patrik Flykt [Mon, 28 Jan 2013 15:44:40 +0000 (17:44 +0200)]
bluetooth_legacy: Check network in probe function

The network probed can belong to the new Bluez 5 bluetooth plugin or to
this plugin. Check if this plugin created the network and proceed
accordingly.

11 years agobluetooth: Keep track of Bluez 5 org.bluez.Network1 objects
Patrik Flykt [Mon, 28 Jan 2013 15:44:39 +0000 (17:44 +0200)]
bluetooth: Keep track of Bluez 5 org.bluez.Network1 objects

Set up functions monitoring Bluez 5 org.bluez.Network1 objects being
added and removed. Add a GDBusProxy for the org.bluez.Device1 object
that corresponds to the Network1 object. Set up functions monitoring
Network1 'Connected' and Device1 'UUID' properties.

11 years agobluetooth: Expose Bluez 5 adapters as ConnMan devices
Patrik Flykt [Mon, 28 Jan 2013 15:44:38 +0000 (17:44 +0200)]
bluetooth: Expose Bluez 5 adapters as ConnMan devices

Set up functions monitoring Bluez 5 objects being added and removed using
GDBusProxy. When an adapter appears, create a new device for it and set up
a watch function for the adapter's 'Powered' property.

Keep the adapter 'Powered' property in sync with the device state and if
they differ reset the adapter to the device state. Also update the Bluez 5
adapter 'Powered' property when the device is enabled or disabled.

11 years agotechnology: Enable/disable individual devices also with rfkill
Patrik Flykt [Mon, 28 Jan 2013 15:44:37 +0000 (17:44 +0200)]
technology: Enable/disable individual devices also with rfkill

In order to keep ConnMan devices in sync with Bluz 5 adapters, the
individual devices need to be enabled/disabled also when
unblocking/blocking them with rfkill. Thus enable devices after
unblocking and disable devices before blocking with rfkill.

11 years agobluetooth: Register technology driver
Patrik Flykt [Mon, 28 Jan 2013 15:44:36 +0000 (17:44 +0200)]
bluetooth: Register technology driver

11 years agobluetooth: Add new bluetooth plugin
Patrik Flykt [Mon, 28 Jan 2013 15:44:35 +0000 (17:44 +0200)]
bluetooth: Add new bluetooth plugin

11 years agobluetooth: Rename bluetooth plugin to bluetooth_legacy
Patrik Flykt [Mon, 28 Jan 2013 15:44:34 +0000 (17:44 +0200)]
bluetooth: Rename bluetooth plugin to bluetooth_legacy

Set the plugin priority to CONNMAN_PLUGIN_PRIORITY_LOW and the technology
priority to -10. Update strings to "bluetooth_legacy" and use ordinary
string instead of ident.

11 years agotechnology: Check technology driver probe function before calling
Patrik Flykt [Mon, 28 Jan 2013 15:44:33 +0000 (17:44 +0200)]
technology: Check technology driver probe function before calling

11 years agotechnology: Remove technology driver by pointer
Patrik Flykt [Mon, 28 Jan 2013 15:44:32 +0000 (17:44 +0200)]
technology: Remove technology driver by pointer

Compare the technology driver pointer to the driver being unregistered
as the function is supposed to remove only the given driver.

Also check if the driver has a remove function before calling it.

11 years agotechnology: Remove unnecessary comparison and goto
Patrik Flykt [Mon, 28 Jan 2013 15:44:31 +0000 (17:44 +0200)]
technology: Remove unnecessary comparison and goto

11 years agoofono: Use ordinary string instead of ident
Patrik Flykt [Mon, 28 Jan 2013 15:44:30 +0000 (17:44 +0200)]
ofono: Use ordinary string instead of ident

The string is only used for debugging purposes.

11 years agodundee: Use ordinary string instead of ident
Patrik Flykt [Mon, 28 Jan 2013 15:44:29 +0000 (17:44 +0200)]
dundee: Use ordinary string instead of ident

The string is only used for debugging purposes.

11 years agonetwork: Unset driver on failed match
Patrik Flykt [Tue, 29 Jan 2013 09:43:00 +0000 (11:43 +0200)]
network: Unset driver on failed match

11 years agogresolv: Destroy query at the relevant place when parsing the response
Tomasz Bursztyka [Mon, 28 Jan 2013 13:43:11 +0000 (15:43 +0200)]
gresolv: Destroy query at the relevant place when parsing the response

parse_response() will eventually call sort_and_return_results() which in turn
will call the result function. But the result function might cancel the gresolv.
At that point all queries belonging to this gresolv are destroyed. Returning back
to parse_response(), it calls again destroy_query() on an already destroyed one.
Thus leading to a crash.

Same issue with query_timeout()

Reported by Daniel Wagner

11 years agoservice: Notify leaving online state when downgrading it to ready
Tomasz Bursztyka [Mon, 21 Jan 2013 10:46:19 +0000 (12:46 +0200)]
service: Notify leaving online state when downgrading it to ready

Fixes BMC#25862

11 years agoipconfig: IPv6 was enabled too early
Jukka Rissanen [Mon, 21 Jan 2013 12:39:31 +0000 (14:39 +0200)]
ipconfig: IPv6 was enabled too early

When enabling IPv6 ipconfig, we enable kernel IPv6 support too early.
The ipconfig might get unreffed which will disable ipconfig and
thus disable kernel IPv6 support. By moving kernel IPv6 enabling
after the ipconfig unref call, we make sure that IPv6 kernel support
is properly enabled.
This is related to fix in commit d479904ecaa2bd9

11 years agogdbus: Check for valid path before handling properties
Marcel Holtmann [Mon, 21 Jan 2013 02:25:12 +0000 (18:25 -0800)]
gdbus: Check for valid path before handling properties

11 years agodnsproxy: DNS response answer count was incorrectly set
Jukka Rissanen [Fri, 18 Jan 2013 12:11:32 +0000 (14:11 +0200)]
dnsproxy: DNS response answer count was incorrectly set

We set the answer count in host byte order instead of network
byte order when sending cached AAAA record. This problem is only
seen in special case when an AAAA record is generated by us when
there is IPv4 address in cache but no IPv6 address for the host.

11 years agonetwork: Do not report any error when removing a connecting network
Tomasz Bursztyka [Wed, 16 Jan 2013 10:57:14 +0000 (12:57 +0200)]
network: Do not report any error when removing a connecting network

When connecting a network, if it's related technology is disabled, this network
will raise an error through the agent. Leading to a possible retry request from
the user, then to a crash if the user does so.
Thus, we prevent any error to be raised in such situation and silently disconnect
the connecting network instead.

11 years agonetwork: Move up code about set_connected() and set_disconnected
Tomasz Bursztyka [Wed, 16 Jan 2013 10:57:13 +0000 (12:57 +0200)]
network: Move up code about set_connected() and set_disconnected

11 years agoservice: Trigger autoconnect when AutoConnect flag is enabled
Jukka Rissanen [Tue, 15 Jan 2013 14:47:43 +0000 (16:47 +0200)]
service: Trigger autoconnect when AutoConnect flag is enabled

11 years agoipconfig: Do not disable IPv6 in lower up state
Jukka Rissanen [Tue, 15 Jan 2013 14:11:26 +0000 (16:11 +0200)]
ipconfig: Do not disable IPv6 in lower up state

Disabling IPv6 in lower up causes problems in IPv6 connectivity.
The interface IPv6 status can stay in disabled state because of
races. So this patch reverts the commit 4ce90440a70abce7de537777
and lets service IPv6 state go to READY when we get an auto
configured address for the interface.

Fixes BMC#25929

11 years agoservice: Update notifier state when relevant while getting ready
Tomasz Bursztyka [Tue, 15 Jan 2013 08:20:44 +0000 (10:20 +0200)]
service: Update notifier state when relevant while getting ready

When getting 1 service to online, and disonnecting it: Manager state
stays at 'ready'. This is due to service updating the notifier about
its state 'ready' 2 times. Once when connecting: idle -> ready, and
once when disconnecting: online -> ready.

11 years agoagent: Keep track of the driver to unref user context relevantly
Tomasz Bursztyka [Tue, 15 Jan 2013 12:57:38 +0000 (14:57 +0200)]
agent: Keep track of the driver to unref user context relevantly

Fixes BMC#25884

11 years agogweb: Make sure to destroy the lookup before calling any result function
Tomasz Bursztyka [Fri, 11 Jan 2013 12:37:05 +0000 (14:37 +0200)]
gweb: Make sure to destroy the lookup before calling any result function

Program received signal SIGSEGV, Segmentation fault.
Backtrace:
0  0x00000000004219fe in _debug (resolv=0x75f9a0, file=0x497267 "gweb/gresolv.c",
    caller=0x497598 "destroy_lookup",
    format=0x497278 "lookup %p id %d ipv4 %p ipv6 %p") at gweb/gresolv.c:136
1  0x0000000000421ac5 in destroy_lookup (lookup=0x760e40) at gweb/gresolv.c:154
2  0x00000000004224ce in sort_and_return_results (lookup=0x760e40) at gweb/gresolv.c:520
3  0x0000000000422597 in query_timeout (user_data=0x760510) at gweb/gresolv.c:542
4  0x00007ffff7b1b26b in g_timeout_dispatch (source=0x760ea0, callback=<optimized out>,
    user_data=<optimized out>) at gmain.c:4095
5  0x00007ffff7b1a643 in g_main_dispatch (context=0x6f5110) at gmain.c:2784
6  g_main_context_dispatch (context=0x6f5110) at gmain.c:3288
7  0x00007ffff7b1a988 in g_main_context_iterate (dispatch=1, block=<optimized out>,
    context=0x6f5110, self=<optimized out>) at gmain.c:3359
8  g_main_context_iterate (context=0x6f5110, block=<optimized out>, dispatch=1,
    self=<optimized out>) at gmain.c:3296
9  0x00007ffff7b1ade5 in g_main_loop_run (loop=0x6f4fe0) at gmain.c:3553
10 0x0000000000442a5f in main (argc=1, argv=0x7fffffffdea8) at src/main.c:705

Reported by Daniel Wagner

11 years agogsupplicant: Return max SSIDs to scan given by wpa_supplicant
Patrik Flykt [Tue, 8 Jan 2013 09:32:51 +0000 (11:32 +0200)]
gsupplicant: Return max SSIDs to scan given by wpa_supplicant

Although it seems wpa_supplicant can handle 4 SSIDs in version 0.7.x
and 16 starting with 0.8.x, in practise this does not work. Return the
value reported without relying on wpa_supplicant internals to handle
the situation. In order for hidden scans to work properly, the minimum
value needs to be 1.

11 years agobuild: Do not use deprecated AM_CONFIG_HEADER
Julien Massot [Tue, 8 Jan 2013 09:34:37 +0000 (10:34 +0100)]
build: Do not use deprecated AM_CONFIG_HEADER

The long-obsoleted AM_CONFIG_HEADER macro was removed in automake 1.13.
Use AC_CONFIG_HEADERS instead.

11 years agoinet: Fix error handling when bridging interfaces
Forest Bond [Mon, 7 Jan 2013 14:24:55 +0000 (09:24 -0500)]
inet: Fix error handling when bridging interfaces

Functions that add and remove interfaces to and from bridges now return
an appropriate error code.

11 years agoinet: Fix error handling when adding/removing routes
Forest Bond [Mon, 7 Jan 2013 14:24:26 +0000 (09:24 -0500)]
inet: Fix error handling when adding/removing routes

Functions that add and remove routes now return an appropriate error
code.  EEXIST and ESRCH are ignored when adding and removing routes
(respectively) to reduce spurious error messages in the logs.

11 years agovpn-provider: Check if providers list is NULL before using it
Patrik Flykt [Tue, 8 Jan 2013 11:57:03 +0000 (13:57 +0200)]
vpn-provider: Check if providers list is NULL before using it

11 years agogdbus: Fix memory leak on properties_set()
Anderson Lizardo [Sun, 6 Jan 2013 00:47:46 +0000 (20:47 -0400)]
gdbus: Fix memory leak on properties_set()

The pointer returned by dbus_message_iter_get_signature() must be freed
with dbus_free().

Fixes this memory leak:

==1857== 16 bytes in 1 blocks are definitely lost in loss record 104 of
251
==1857==    at 0x402BF52: realloc (in
/usr/lib/valgrind/vgpreload_memcheck-x86-linux.so)
==1857==    by 0x415E286: dbus_realloc (in
/lib/i386-linux-gnu/libdbus-1.so.3.5.8)
==1857==    by 0x415E70B: ??? (in
/lib/i386-linux-gnu/libdbus-1.so.3.5.8)
==1857==    by 0x415F17B: ??? (in
/lib/i386-linux-gnu/libdbus-1.so.3.5.8)
==1857==    by 0x414CB33: dbus_message_iter_get_signature (in
/lib/i386-linux-gnu/libdbus-1.so.3.5.8)
==1857==    by 0x8053239: properties_set (object.c:899)
==1857==    by 0x5FFFFF: ???
==1857==

11 years agogdbus: Check signature of property value before calling setter
Marcel Holtmann [Sat, 5 Jan 2013 04:28:07 +0000 (20:28 -0800)]
gdbus: Check signature of property value before calling setter

11 years agoTODO: Remove the storage migration task
Patrik Flykt [Fri, 14 Dec 2012 13:58:20 +0000 (15:58 +0200)]
TODO: Remove the storage migration task

11 years agostorage: Remove storage migration code
Patrik Flykt [Fri, 4 Jan 2013 11:12:53 +0000 (13:12 +0200)]
storage: Remove storage migration code

11 years agoTODO: Remove WiMAX removal task
Patrik Flykt [Tue, 11 Dec 2012 14:36:28 +0000 (16:36 +0200)]
TODO: Remove WiMAX removal task

11 years agodoc: Remove WiMAX info from documentation
Patrik Flykt [Tue, 11 Dec 2012 14:36:27 +0000 (16:36 +0200)]
doc: Remove WiMAX info from documentation

11 years agocore: Remove WiMAX definitions from code
Patrik Flykt [Tue, 11 Dec 2012 14:36:26 +0000 (16:36 +0200)]
core: Remove WiMAX definitions from code

11 years agoplugins: Remove WiMAX plugin files
Patrik Flykt [Tue, 11 Dec 2012 14:36:25 +0000 (16:36 +0200)]
plugins: Remove WiMAX plugin files

11 years agobuild: Remove WiMAX from configuration options
Patrik Flykt [Tue, 11 Dec 2012 14:36:24 +0000 (16:36 +0200)]
build: Remove WiMAX from configuration options

11 years agogdbus: Don't include just added interfaces in GetManagedObjects
Lucas De Marchi [Fri, 4 Jan 2013 03:33:44 +0000 (01:33 -0200)]
gdbus: Don't include just added interfaces in GetManagedObjects

If we received a call to ObjectManager.GetManagedObject we should not
include in the response the interfaces in data->added. This is because
it's not guaranteed that those interfaces will trigger an
InterfacesAdded signal, which is the case if the interface is removed in
the same mainloop iteration.

11 years agogdbus: Simplify generated introspection
Lucas De Marchi [Fri, 4 Jan 2013 01:21:04 +0000 (23:21 -0200)]
gdbus: Simplify generated introspection

The generated introspection is not supposed to be read as is by human,
so there's no point in printing the indentation or writing more code to
use auto-close tags.

If it's desired to read the raw xml file, user can always use other
tools to transform the output such as "xmllint --format".

This also fixes a missing </property> when property is deprecated.

11 years agotest: Fix simple-agent so it registers the right path
Tomasz Bursztyka [Wed, 2 Jan 2013 13:57:34 +0000 (15:57 +0200)]
test: Fix simple-agent so it registers the right path