platform/upstream/connman.git
4 months agoImported Upstream version 1.42 68/302268/1 upstream upstream/1.42
Anjali Nijhara [Tue, 5 Dec 2023 03:30:23 +0000 (09:00 +0530)]
Imported Upstream version 1.42

Change-Id: Ib8320153c783db22181c568b14353d2b9651c1bc

13 months agoImported Upstream version 1.41 86/289886/1 upstream/1.41
Anjali Nijhara [Wed, 15 Mar 2023 06:29:53 +0000 (11:59 +0530)]
Imported Upstream version 1.41

Change-Id: Ida2a62a81c771f833353d1a9a77604e6f2b06b88

2 years agoImported Upstream version 1.40 64/271064/1 upstream/1.40
Niraj Kumar Goit [Tue, 15 Feb 2022 04:53:07 +0000 (10:23 +0530)]
Imported Upstream version 1.40

Change-Id: Id3e405d088ee3fb19fd0ca049e1cb7f812b40fca
Signed-off-by: Niraj Kumar Goit <niraj.g@samsung.com>
3 years agoImported Upstream version 1.38 91/245691/1 upstream/1.38
Nishant Chaprana [Wed, 14 Oct 2020 08:29:23 +0000 (13:59 +0530)]
Imported Upstream version 1.38

Change-Id: I7cada2367329445e1d200055e21d96e7e9c05047
Signed-off-by: Nishant Chaprana <n.chaprana@samsung.com>
4 years agoImported Upstream version 1.37 02/209302/1 upstream/1.37
Nishant Chaprana [Thu, 4 Jul 2019 12:11:09 +0000 (17:41 +0530)]
Imported Upstream version 1.37

Change-Id: Ib5957e7ee3a9315ee86a331189bc3e9e71751ee8
Signed-off-by: Nishant Chaprana <n.chaprana@samsung.com>
6 years agoImported Upstream version 1.35 22/166122/1 upstream/1.35
Seonah Moon [Mon, 8 Jan 2018 04:42:54 +0000 (13:42 +0900)]
Imported Upstream version 1.35

Change-Id: I174854914d9fd06a813270b57d1f7bc2bac63c6a
Signed-off-by: Seonah Moon <seonah1.moon@samsung.com>
8 years agoImported Upstream version 1.29 90/67290/1 upstream/1.29
taesubkim [Tue, 26 Apr 2016 06:47:01 +0000 (15:47 +0900)]
Imported Upstream version 1.29

Change-Id: I2958446c35966d9ed72df0120b80561be7d89f54
Signed-off-by: Taesub Kim <taesub.kim@samsung.com>
9 years agoImported Upstream version 1.26 upstream/1.26
Zhang zhengguang [Wed, 29 Oct 2014 03:03:47 +0000 (11:03 +0800)]
Imported Upstream version 1.26

9 years agoImported Upstream version 1.24 upstream/1.24
Zhang zhengguang [Thu, 17 Jul 2014 02:37:39 +0000 (10:37 +0800)]
Imported Upstream version 1.24

10 years agoclient: Fix passphrase handling
Patrik Flykt [Wed, 12 Jun 2013 13:54:32 +0000 (16:54 +0300)]
client: Fix passphrase handling

An empty passphrase means that WPS is to be tried next. If WPS is not
supported by the service, passphrase can not be left empty.

10 years agoclient: Implement VPN Agent API RequestInput method call
Patrik Flykt [Wed, 12 Jun 2013 13:54:31 +0000 (16:54 +0300)]
client: Implement VPN Agent API RequestInput method call

Instead of having a global agent_input struct, make the structure a
member of the agent_data structure that gets passed around when
handling the RequestInput method call.

With this modification agent_data is self-contained with all needed
information and the RequestInput handling code can be shared between
ConnMan and VPN agent implementations.

10 years agoclient: Add vpnagent command to register and unregister VPN Agent
Patrik Flykt [Wed, 12 Jun 2013 13:54:30 +0000 (16:54 +0300)]
client: Add vpnagent command to register and unregister VPN Agent

10 years agoclient: Implement support for queueing Agent messages
Patrik Flykt [Wed, 12 Jun 2013 13:54:29 +0000 (16:54 +0300)]
client: Implement support for queueing Agent messages

ConnMan and ConnMan VPN daemon both send only one Agent message at
a time. Since they are two different daemons, they can be sending
messages at the same time independent of each other.

Implement a check for an agent request from the other daemon being
already processed and if so store the message for later. When the
current agent request has been processed, check if there are
pending requests from the other daemon and re-run the pending
function.

In order to support arbitrary queueing, make all method call
implementations asynchronous.

10 years agoclient: Add VPN Agent support for Release, Cancel and ReportError
Patrik Flykt [Wed, 12 Jun 2013 13:54:28 +0000 (16:54 +0300)]
client: Add VPN Agent support for Release, Cancel and ReportError

Create a new agent data structure for the VPN Agent and add the needed
minor modifications to Release, Cancel and ReportError method calls in
order to get them working both for Agent and VPN Agent.

Create new register and unregister functions for the VPN Agent code.

10 years agoclient: Create agent data structure and pass it in function callbacks
Patrik Flykt [Wed, 12 Jun 2013 13:54:27 +0000 (16:54 +0300)]
client: Create agent data structure and pass it in function callbacks

Collect the agent variables into a data structure and update the agent
functionality to pass this data structure around as function callback
user data.

Update the agent mode input functionality to store both the callback
function and user data pointers. Notice that only only one input
callback can be handled at any one time due to the input handling itself
and the simple storing of callback and user data pointers.

10 years agoclient: Don't handle Agent messages in monitor code
Patrik Flykt [Wed, 12 Jun 2013 13:54:26 +0000 (16:54 +0300)]
client: Don't handle Agent messages in monitor code

Agent messages need to be handled in the agent code, ignore them when
they get captured in the monitor code.

10 years agoclient: Fix DBUS_TYPE_UINT16 pretty-printing
Patrik Flykt [Wed, 12 Jun 2013 13:54:25 +0000 (16:54 +0300)]
client: Fix DBUS_TYPE_UINT16 pretty-printing

The previous pretty-printing fix causes another change to be
made for DBUS_TYPE_UINT16.

10 years agodhcpv6: Send domain list option to server
Jukka Rissanen [Wed, 12 Jun 2013 11:43:24 +0000 (14:43 +0300)]
dhcpv6: Send domain list option to server

OPTION_DOMAIN_LIST(24) was not sent to server.

10 years agounit: Multiple collisions with different pools
Jukka Rissanen [Wed, 12 Jun 2013 08:02:59 +0000 (11:02 +0300)]
unit: Multiple collisions with different pools

Existing tests did not test this scenario:
* new address is registered to 192.168.0.2
* new address is registered to 192.168.1.2
* ippool is created to 192.168.2.1 (no collision)
* ippool is created to 192.168.3.1 (no collision)
* new address is registered to 192.168.3.1 (collision detected)

10 years agounit: Test ippool collision differently
Jukka Rissanen [Wed, 12 Jun 2013 08:02:58 +0000 (11:02 +0300)]
unit: Test ippool collision differently

Existing tests did not test this scenario:
* new address is registered to 192.168.1.2
* ippool is created to 192.168.0.1 (no collision)
* ippool is created to 192.168.2.1 (there is a collision and the
  code should skip the 192.168.1.1 range)

10 years agoippool: Clear allocated block pointer at cleanup
Jukka Rissanen [Wed, 12 Jun 2013 08:02:57 +0000 (11:02 +0300)]
ippool: Clear allocated block pointer at cleanup

Without this the unit tests might core dump as the allocated_block
pointer would point to already freed memory.

10 years agoippool: Private address check was incorrect
Jukka Rissanen [Wed, 12 Jun 2013 08:02:56 +0000 (11:02 +0300)]
ippool: Private address check was incorrect

Fixes BMC#25993

10 years agoservice: Send proxy properties when connected or disconnected
Jukka Rissanen [Fri, 7 Jun 2013 13:49:34 +0000 (16:49 +0300)]
service: Send proxy properties when connected or disconnected

Fixes BMC#26019

10 years agotechnology: Offlinemode could not be disabled if no technology was powered
Jukka Rissanen [Fri, 7 Jun 2013 12:15:29 +0000 (15:15 +0300)]
technology: Offlinemode could not be disabled if no technology was powered

If all the technologies were powered off, then offline mode could
not be disabled.

Fixes BMC#26018

10 years agoTODO: Mark GSequence removal done
Daniel Wagner [Fri, 7 Jun 2013 11:41:13 +0000 (13:41 +0200)]
TODO: Mark GSequence removal done

10 years agoservice: Use GList instead of GSequence for service list
Daniel Wagner [Fri, 7 Jun 2013 11:41:12 +0000 (13:41 +0200)]
service: Use GList instead of GSequence for service list

The hash table is now the owner of the service entry instead of the
service list.

10 years agosession: Use GList instead of GSequence for service list
Daniel Wagner [Fri, 7 Jun 2013 11:41:11 +0000 (13:41 +0200)]
session: Use GList instead of GSequence for service list

The hash table is now the owner of the service entry instead of
the service list.

10 years agosession: Use service iterator instead of match/creation callbacks
Daniel Wagner [Fri, 7 Jun 2013 11:41:10 +0000 (13:41 +0200)]
session: Use service iterator instead of match/creation callbacks

When a new session is created we need to get the initial list
of services which match the session AllowedBearers criteria. As soon
the session is running add or removed services are tracked via the
notifier interface.

We concluded that exposing all the services is not really necessary
and therefore we are using currently two callbacks to get the initial
list. That exposes implementation details from session to service, that
is GSequence. We also need to expose the type 'struct service_entry'.

Instead doing so we are using an iterator and keep all the
implementation details in session.c.

10 years agoservice: Initialize tech_data
Daniel Wagner [Fri, 7 Jun 2013 11:41:09 +0000 (13:41 +0200)]
service: Initialize tech_data

tech_data is allocated on the stack and is therefore not initilized
with NULL.

10 years agoclient: Avoid printing extra prompt on RequestInput
Patrik Flykt [Fri, 7 Jun 2013 06:58:33 +0000 (09:58 +0300)]
client: Avoid printing extra prompt on RequestInput

10 years agoclient: Read D-Bus string type only if argument is 'Type'
Patrik Flykt [Fri, 7 Jun 2013 05:25:25 +0000 (08:25 +0300)]
client: Read D-Bus string type only if argument is 'Type'

A basic type was always read independent of the argument type which
on some systems lead to a crash and on others only to a warning
printout.

10 years agoclient: Pretty-print D-Bus signed integers
Patrik Flykt [Mon, 3 Jun 2013 10:11:38 +0000 (13:11 +0300)]
client: Pretty-print D-Bus signed integers

To keep it more logical, rename the unsigned variable in the code.

10 years agoclient: Add VPN monitoring support
Patrik Flykt [Mon, 3 Jun 2013 10:04:19 +0000 (13:04 +0300)]
client: Add VPN monitoring support

When adding VPN monitoring capabilities, also clean up the monitor code.

10 years agoclient: Add support for displaying VPN connections
Patrik Flykt [Mon, 3 Jun 2013 07:59:56 +0000 (10:59 +0300)]
client: Add support for displaying VPN connections

Show a list of VPN connections known to the VPN daemon.

Also allow D-Bus path names to start with numbers, as it is fine with
the D-Bus library to define such path names. Fix up help command
pretty-printing as the VPN command is slightly longer.

10 years agoclient: Add VPN connection helper function
Patrik Flykt [Mon, 3 Jun 2013 07:49:23 +0000 (10:49 +0300)]
client: Add VPN connection helper function

Add helper function for printing VPN connections. Show also configuration
and failure states using 'C' and 'F' as configuration might take some
time and failure conveys practical information to the user.

10 years agoclient: Add parameter to specify D-Bus service for method call
Patrik Flykt [Mon, 3 Jun 2013 07:27:38 +0000 (10:27 +0300)]
client: Add parameter to specify D-Bus service for method call

10 years agoclient: Add missing header file boilerplate
Patrik Flykt [Mon, 3 Jun 2013 07:20:20 +0000 (10:20 +0300)]
client: Add missing header file boilerplate

10 years agodhcpv6: Make sure release message is sent
Jukka Rissanen [Tue, 4 Jun 2013 09:34:37 +0000 (12:34 +0300)]
dhcpv6: Make sure release message is sent

Register an empty Release callback so that the message will be sent.

10 years agobuild: Add session policy format document
Daniel Wagner [Fri, 31 May 2013 12:13:55 +0000 (14:13 +0200)]
build: Add session policy format document

10 years agodoc: Document session policy file format
Daniel Wagner [Fri, 31 May 2013 07:13:38 +0000 (09:13 +0200)]
doc: Document session policy file format

10 years agosession-test: Add tests for session_policy_local
Daniel Wagner [Fri, 31 May 2013 07:13:37 +0000 (09:13 +0200)]
session-test: Add tests for session_policy_local

Use the UID as identification.

10 years agosession_policy_local: Set session identification method
Daniel Wagner [Fri, 31 May 2013 07:13:36 +0000 (09:13 +0200)]
session_policy_local: Set session identification method

For SELinux we need to store the complete context for iptables
to work.

10 years agosession: Add session identification method to config
Daniel Wagner [Fri, 31 May 2013 07:13:35 +0000 (09:13 +0200)]
session: Add session identification method to config

The session core needs to the know which kind of session
identification method has been selected in the plugin in order
to use the right iptables rules etc.

10 years agosession_policy_local: Retrieve UID/GID from session user
Daniel Wagner [Fri, 31 May 2013 07:13:34 +0000 (09:13 +0200)]
session_policy_local: Retrieve UID/GID from session user

When the session core ask to create a configuration, then we
first ask the D-Bus server which UID/GID the session belongs to.
If possible we also ask for the SELinux context. Then we try
to figure out which file containts the configuration for
SElinux, UID or GID identification.

The order of matching preference is SELinux, UID and finally GID.

10 years agosession_policy_local: Remove struct create_data
Daniel Wagner [Fri, 31 May 2013 07:13:33 +0000 (09:13 +0200)]
session_policy_local: Remove struct create_data

Use struct policy_data instead of struct create_data.

10 years agosession_policy_local: Rework policy file handling
Daniel Wagner [Fri, 31 May 2013 07:13:32 +0000 (09:13 +0200)]
session_policy_local: Rework policy file handling

The old assumption was that a config file is associtated
with one session only. With introducing UID/GID support a policy
might be used for several sessions. Furthermore, it was assumed
that the file name is the key/ident to identify a session and
a file containts exactly one policy.

Here are the new rules for writing a policy file.

- A valid file name contains letters or numbers and must have a '.policy'
  suffix.
- The file name has not semantical meaning
- A policy file may contain contain more than 1 policy
- Each policy entry starts with 'policy_'
- Each policy entry shall have one and exactly one valid key (e.g.
  selinux)

The implementation has two main hash tables, file_hash and session_hash
which owns 'the file' respectively the session config. Additionally there
is a hash table which connects a policy with a session (selinux_hash).

10 years agosession_policy_local: Add some more debug information
Daniel Wagner [Fri, 31 May 2013 07:13:31 +0000 (09:13 +0200)]
session_policy_local: Add some more debug information

10 years agosession_policy_local: Update session before unref policy
Daniel Wagner [Fri, 31 May 2013 07:13:30 +0000 (09:13 +0200)]
session_policy_local: Update session before unref policy

The update flag can be removed as it is no longer needed.

10 years agosession_policy_local: Refactor SELinux context parser
Daniel Wagner [Fri, 31 May 2013 07:13:29 +0000 (09:13 +0200)]
session_policy_local: Refactor SELinux context parser

g_strplit() will eventually strdup the tokens so no need to
strdup() 'context'. But we an ugly cast (from 'const unsigned char *'
to 'const char *') is needed for g_strsplit() to make the compiler happy.

10 years agosession_policy_local: Do not handle small allocation
Daniel Wagner [Fri, 31 May 2013 07:13:28 +0000 (09:13 +0200)]
session_policy_local: Do not handle small allocation

Let's remove the small allocations error path because glib will
abort on memory exhausting anyway. Basically we remove dead code.

10 years agosession: Do not access stale entry pointers
Daniel Wagner [Fri, 31 May 2013 07:13:27 +0000 (09:13 +0200)]
session: Do not access stale entry pointers

When removing the entry clear all references towards it.

10 years agosession: Add session argument to create_service_entry_cb
Daniel Wagner [Fri, 31 May 2013 07:13:26 +0000 (09:13 +0200)]
session: Add session argument to create_service_entry_cb

Remember which session this struct service_entry belongs to when
removing the entries again.

10 years agoTODO: Support other time sources
Patrik Flykt [Wed, 29 May 2013 10:28:40 +0000 (13:28 +0300)]
TODO: Support other time sources

10 years agotimeserver: Periodically wake up to recheck timeservers
Patrik Flykt [Tue, 21 May 2013 10:32:14 +0000 (13:32 +0300)]
timeserver: Periodically wake up to recheck timeservers

The current situation is that a failed timeserver name resolution
removes the timeserver immediately from the list of used timeservers
and failing to connect to the nameserver IP address removes the
timeserver after a 2 second delay. Currently no mechanism exists to
re-create the list of nameservers once the list has been exhausted or
the more preferred timeservers have been removed from it.

This implementation combats both problems where less used timeservers
further away end up being used despite a more optimal closer one
becoming available as well as the problem of exhausting the
nameserver list. This is done by periodially waking up and checking
the timeserver in use. If the timeserver in use is not the most
preferred one or the list of timeservers is empty, the timeserver
list is recreated and the timeserver polling procedure is restarted.

10 years agoiptables: Fix memory leak when invoking xtables_find_match
Daniel Wagner [Fri, 24 May 2013 13:27:01 +0000 (15:27 +0200)]
iptables: Fix memory leak when invoking xtables_find_match

xtables_find_match() returns two different kind of pointers.
The first type is pointing to the function pointer table loaded
via dlopen(). The second type is a copy (via plain malloc) of the
first type. xtables_find_match() marks the copies/clones with
m == m->next. So we need to free the struct xtables_match which
point back to themself.

Also fix the issue that we didn't handle multple match instances
at the same time.

The memory leak is only visible when having more than one match
of a kind.

10 years agoRelease 1.15 1.15 upstream/1.15
Marcel Holtmann [Fri, 31 May 2013 01:15:29 +0000 (10:15 +0900)]
Release 1.15

10 years agoconfig: Remove code implementing Protected config file setting
Patrik Flykt [Wed, 29 May 2013 13:21:16 +0000 (16:21 +0300)]
config: Remove code implementing Protected config file setting

The code was relevant only for Manager.ProvisionService method call
which was removed a long time ago.

10 years agodoc: Remove Protected description
Patrik Flykt [Wed, 29 May 2013 13:21:15 +0000 (16:21 +0300)]
doc: Remove Protected description

The Protected setting was relevant only for Manager.ProvisionService
method call which was removed a long time ago.

10 years agovpn-config: Log a warning if the provider ident already exists
Patrik Flykt [Wed, 29 May 2013 13:21:14 +0000 (16:21 +0300)]
vpn-config: Log a warning if the provider ident already exists

Also set the returned value appropriately when removing or adding
configuration files.

10 years agovpn-config: Remove obsolete protected code
Patrik Flykt [Wed, 29 May 2013 13:21:13 +0000 (16:21 +0300)]
vpn-config: Remove obsolete protected code

For VPN connections created via configuration files the immutable flag
is set and it ensures no modifications are allowed. The protected
feature implementation was a left-over from service configuration code.

Removing the code fixes a bug where only VPN entries of different types
can be provisioned in the same provisioning file.

10 years agotest-ippool: Shortcut exhausting allocation test
Daniel Wagner [Wed, 29 May 2013 08:00:30 +0000 (10:00 +0200)]
test-ippool: Shortcut exhausting allocation test

Instead really trying to allocate all possible 69888 blocks, let's
reserve the first two IP pools and then we only need to allocate
255 blocks. That should bring down the runtime considerable.

10 years agoservice: Update Domains property when Domains.Configuration changes
Patrik Flykt [Wed, 29 May 2013 06:25:58 +0000 (09:25 +0300)]
service: Update Domains property when Domains.Configuration changes

Domains property was not updated when Domains.Configuration was changed.
If Domains.Configuration is for example set to empty when using DHCP,
the Domains property is to be updated with the value configured via DHCP.

Fixes BMC#26010

10 years agoservice: Check service type before fetching interface index
Patrik Flykt [Wed, 29 May 2013 06:52:49 +0000 (09:52 +0300)]
service: Check service type before fetching interface index

For VPNs, the index is available from provider, for other services from
network.

Fixes BMC#26009

10 years agoipconfig: Use system set addresses for IPv4 property in 'manual' mode
Patrik Flykt [Fri, 24 May 2013 11:38:01 +0000 (14:38 +0300)]
ipconfig: Use system set addresses for IPv4 property in 'manual' mode

Addresses and gateway for the service IPv4 property being used in the
system are available from ipconfig->system when the property is set to
'manual'.

10 years agoclient: Accept correctly spelled option name
Patrik Flykt [Fri, 24 May 2013 11:58:07 +0000 (14:58 +0300)]
client: Accept correctly spelled option name

Accept also correctly spelled version of 'preferred' option.

10 years agoclient: Fix minor issues in D-Bus path name checking
Patrik Flykt [Wed, 22 May 2013 09:21:36 +0000 (12:21 +0300)]
client: Fix minor issues in D-Bus path name checking

10 years agoclient: Fix index for IPv6 configuration option
Patrik Flykt [Wed, 22 May 2013 09:21:35 +0000 (12:21 +0300)]
client: Fix index for IPv6 configuration option

10 years agoclient: Reserve space for trailing NULL in the array
Patrik Flykt [Wed, 22 May 2013 09:21:34 +0000 (12:21 +0300)]
client: Reserve space for trailing NULL in the array

10 years agosession: Fix service2bearer to return a correct match all rule
Daniel Wagner [Tue, 21 May 2013 11:45:59 +0000 (13:45 +0200)]
session: Fix service2bearer to return a correct match all rule

10 years agodoc: Remove documentation for Technology IdleTimeout property
Patrik Flykt [Tue, 21 May 2013 18:14:03 +0000 (21:14 +0300)]
doc: Remove documentation for Technology IdleTimeout property

IdleTimeout hasn't so far been implemented in any release and will be
handled by other means if needed.

10 years agoservice: Restart timeserver polling only for the default service
Patrik Flykt [Mon, 20 May 2013 12:37:23 +0000 (15:37 +0300)]
service: Restart timeserver polling only for the default service

When timeservers are set, recreate timeserver polling list only if the
service is the the default one.

10 years agodoc: Document the deprecated RemoveProvider method call
Patrik Flykt [Mon, 20 May 2013 09:56:29 +0000 (12:56 +0300)]
doc: Document the deprecated RemoveProvider method call

Fixes BMC#25958

10 years agotest: Add test script for Clock API
Patrik Flykt [Fri, 17 May 2013 11:08:57 +0000 (14:08 +0300)]
test: Add test script for Clock API

10 years agoclock: Implement load and save for Clock API properties
Patrik Flykt [Fri, 17 May 2013 10:20:45 +0000 (13:20 +0300)]
clock: Implement load and save for Clock API properties

Load and save TimeUpdates and TimezoneUpdates Clock API properties.
Clock API Timeservers property is already handled by the timeserver
code.

Fixes BMC#25988

10 years agotimeserver: Check the time update method
Patrik Flykt [Fri, 17 May 2013 07:40:30 +0000 (10:40 +0300)]
timeserver: Check the time update method

If the time update method is manual, no NTP time servers are returned.

10 years agoclock: Export information about time update method
Patrik Flykt [Fri, 17 May 2013 07:37:54 +0000 (10:37 +0300)]
clock: Export information about time update method

10 years agoTODO: Add Clock API support for connmanctl
Patrik Flykt [Fri, 17 May 2013 12:02:45 +0000 (15:02 +0300)]
TODO: Add Clock API support for connmanctl

10 years agowifi: Scan all stored hidden networks
Tomasz Bursztyka [Fri, 17 May 2013 08:26:57 +0000 (11:26 +0300)]
wifi: Scan all stored hidden networks

Previously the number of scanned hidden WiFi networks was
restricted by the fast scan limit of the WiFi driver. This
patch takes into account the driver fast scan limit and will
scan for all configured hidden WiFi networks.

Thanks to Jukka for testing this.

10 years agoREADME: Update information about wpa_supplicant configuration
Tomasz Bursztyka [Fri, 17 May 2013 11:45:00 +0000 (14:45 +0300)]
README: Update information about wpa_supplicant configuration

10 years agoTODO: DHCPv6 DECLINE message support
Jukka Rissanen [Thu, 16 May 2013 09:22:24 +0000 (12:22 +0300)]
TODO: DHCPv6 DECLINE message support

10 years agogdhcp: Handle dhcp_client->type == G_DHCP_IPV4LL
Justin Maggard [Mon, 13 May 2013 20:13:35 +0000 (13:13 -0700)]
gdhcp: Handle dhcp_client->type == G_DHCP_IPV4LL

Clean up several places where dhcp_client->type == G_DHCP_IPV4LL is unhandled.

10 years agoshared: Add helper for looking up debugfs mount point
Marcel Holtmann [Sun, 12 May 2013 07:17:17 +0000 (09:17 +0200)]
shared: Add helper for looking up debugfs mount point

10 years agogdbus: Fix using NULL DBusPendingCall when disconnected from D-Bus
Anderson Lizardo [Sat, 4 May 2013 19:39:43 +0000 (15:39 -0400)]
gdbus: Fix using NULL DBusPendingCall when disconnected from D-Bus

From D-Bus documentation for dbus_connection_send_with_reply():

"Warning: if the connection is disconnected or you try to send Unix file
descriptors on a connection that does not support them, the
DBusPendingCall will be set to NULL, so be careful with this."

Fix these errors when killing D-Bus daemon with the client still
running:

process 5712: arguments to dbus_pending_call_set_notify() were
incorrect, assertion "pending != NULL" failed in file
../../dbus/dbus-pending-call.c line 596.
This is normally a bug in some application using the D-Bus library.
process 5712: arguments to dbus_pending_call_unref() were incorrect,
assertion "pending != NULL" failed in file
../../dbus/dbus-pending-call.c line 572.
This is normally a bug in some application using the D-Bus library.

10 years agogdbus: Fix segfault when D-Bus daemon exits
Anderson Lizardo [Sat, 4 May 2013 19:39:42 +0000 (15:39 -0400)]
gdbus: Fix segfault when D-Bus daemon exits

Fix this crash if D-Bus exits while the client is still connected to it:

==5570== Invalid read of size 1
==5570==    at 0x402D28E: strcmp (in
/usr/lib/valgrind/vgpreload_memcheck-x86-linux.so)
==5570==    by 0x4070E22: g_str_equal (ghash.c:1704)
==5570==    by 0x8055F61: message_filter (client.c:1123)
==5570==    by 0x4141500: dbus_connection_dispatch (in
/lib/i386-linux-gnu/libdbus-1.so.3.5.8)
==5570==    by 0x80506F7: message_dispatch (mainloop.c:76)
==5570==    by 0x4081A7E: g_timeout_dispatch (gmain.c:3882)
==5570==    by 0x4080D85: g_main_context_dispatch (gmain.c:2539)
==5570==    by 0x4081124: g_main_context_iterate.isra.21 (gmain.c:3146)
==5570==    by 0x408156A: g_main_loop_run (gmain.c:3340)
==5570==    by 0x41BF4D2: (below main) (libc-start.c:226)
==5570==  Address 0x0 is not stack'd, malloc'd or (recently) free'd
==5570==
==5570==

10 years agoclient: Do service name syntax check when a name is specified
Patrik Flykt [Wed, 8 May 2013 06:59:23 +0000 (09:59 +0300)]
client: Do service name syntax check when a name is specified

10 years agoFix gcc compiler warning with -Wformat-security.
Justin Maggard [Tue, 7 May 2013 22:34:42 +0000 (15:34 -0700)]
Fix gcc compiler warning with -Wformat-security.

Cosmetic fix.

10 years agoRelease 1.14 1.14
Marcel Holtmann [Tue, 7 May 2013 08:21:39 +0000 (01:21 -0700)]
Release 1.14

10 years agoTODO: Update connmanctl entry
Patrik Flykt [Mon, 6 May 2013 13:02:52 +0000 (16:02 +0300)]
TODO: Update connmanctl entry

Agent mode is mostly done, update the entry with Session mode and VPN
Agent support.

10 years agoclient: Check that strings passed to D-Bus to contain valid chars
Jukka Rissanen [Mon, 6 May 2013 12:18:27 +0000 (15:18 +0300)]
client: Check that strings passed to D-Bus to contain valid chars

D-Bus aborts if we feed invalid characters to it. So do some sanity
check before that.

10 years agoclient: Newline missing after printing scan error message
Jukka Rissanen [Mon, 6 May 2013 11:38:00 +0000 (14:38 +0300)]
client: Newline missing after printing scan error message

10 years agodhcpv6: Implement CONFIRM message support
Jukka Rissanen [Mon, 6 May 2013 10:06:34 +0000 (13:06 +0300)]
dhcpv6: Implement CONFIRM message support

See RFC 3315 Chapter 18.1.2. Creation and Transmission of Confirm
Messages for details

10 years agodhcpv6: Remember the last used IPv6 address
Jukka Rissanen [Mon, 6 May 2013 10:06:33 +0000 (13:06 +0300)]
dhcpv6: Remember the last used IPv6 address

This is required so that we can decide whether to send CONFIRM
or SOLICITATION message to server.

10 years agoipconfig: Save last used DHCPv6 address
Jukka Rissanen [Mon, 6 May 2013 10:06:32 +0000 (13:06 +0300)]
ipconfig: Save last used DHCPv6 address

This is needed when implementing CONFIRM message decision logic.

10 years agodhcpv6: Added initial MRD support
Jukka Rissanen [Mon, 6 May 2013 10:06:31 +0000 (13:06 +0300)]
dhcpv6: Added initial MRD support

MRD (Maximum Retransmission Duration) is the total duration of
of retransmission of the message. This will be used when sending
Confirm message.

10 years agogdhcp: Initialize message status code early
Jukka Rissanen [Mon, 6 May 2013 10:06:30 +0000 (13:06 +0300)]
gdhcp: Initialize message status code early

The message status code was initialized too late i.e., after
it was set so we lost the status code. This problem was seen
with wide-dhcpv6 server.

10 years agoclient: Fix for handling an unset callback
Patrik Flykt [Mon, 6 May 2013 10:28:32 +0000 (13:28 +0300)]
client: Fix for handling an unset callback

If there is no callback set, don't try to call readline function.

10 years agoclient: Fixes for handling Agent messages
Patrik Flykt [Mon, 6 May 2013 10:24:00 +0000 (13:24 +0300)]
client: Fixes for handling Agent messages

Properly handle agent confirmation input, unset the prompt when RequestInput
processing ends and set the passphrase only if it contains some text.

10 years agoman: Update connman.conf.5 manual page to use TetheringTechnologies
Patrik Flykt [Fri, 3 May 2013 14:15:11 +0000 (17:15 +0300)]
man: Update connman.conf.5 manual page to use TetheringTechnologies

10 years agomain: Rename AllowedTetheringTechnologies to TetheringTechnologies
Patrik Flykt [Mon, 29 Apr 2013 06:21:45 +0000 (09:21 +0300)]
main: Rename AllowedTetheringTechnologies to TetheringTechnologies

10 years agogdbus: Fix calling GetManagedObjects twice in a row
Luiz Augusto von Dentz [Thu, 18 Apr 2013 20:34:03 +0000 (23:34 +0300)]
gdbus: Fix calling GetManagedObjects twice in a row

Calling g_dbus_client_new followed by g_dbus_client_set_proxy_handlers
cause two calls to GetManagedObjects in a row as GetNameOwner reply is
asyncronously it triggers the second call because the handlers have
been set by g_dbus_client_set_proxy_handlers.