platform/upstream/connman.git
11 years agoAUTHORS: Mention Ross' contributions
Daniel Wagner [Wed, 18 Jul 2012 10:56:10 +0000 (12:56 +0200)]
AUTHORS: Mention Ross' contributions

11 years agodoc: Add coding-style.txt
Samuel Ortiz [Wed, 18 Jul 2012 10:23:49 +0000 (12:23 +0200)]
doc: Add coding-style.txt

This is a copy of the oFono coding-style document, with oFono instances
replaced with ConnMan ones.
It's also in sync with the neard one.

11 years agostorage: check that the string isn't empty before splitting
Ross Burton [Wed, 18 Jul 2012 09:37:38 +0000 (10:37 +0100)]
storage: check that the string isn't empty before splitting

If the string was non-NULL but empty (str="\0"), the following \0 assignment
would write to str[-1] and thus cause memory corruption.

On PPC and MIPS, this was causing crashes in glibc.

11 years agodevice: Do not set regdom when device is not powered
Tomasz Bursztyka [Wed, 11 Jul 2012 06:59:40 +0000 (09:59 +0300)]
device: Do not set regdom when device is not powered

Fixes crash bug:
connmand[6761]: plugins/ofono.c:get_properties_reply() /huawei_0 path /huawei_0 org.ofono.NetworkRegistration
connmand[6761]: plugins/ofono.c:netreg_properties_reply() /huawei_0
connmand[6761]: plugins/ofono.c:netreg_update_regdom() /huawei_0 MobileContryCode 460
connmand[6761]: src/device.c:connman_device_ref_debug() 0x8686ac0 ref 3 by plugins/wifi.c:991:wifi_set_regdom()
connmand[6761]: Aborting (signal 11) [src/connmand]
connmand[6761]: ++++++++ backtrace ++++++++
connmand[6761]: #0  0xb7749400 in
connmand[6761]: #1  0x806aa0b in g_supplicant_interface_set_country() at nat.c:0
connmand[6761]: #2  0x8062297 in wifi_set_regdom() at wifi.c:0
connmand[6761]: #3  0x80a607d in connman_technology_set_regdom() at ??:0
connmand[6761]: #4  0x806fefb in netreg_update_regdom() at ofono.c:0
connmand[6761]: #5  0x8071f3b in netreg_properties_reply() at ofono.c:0
connmand[6761]: #6  0x806f747 in get_properties_reply() at ofono.c:0
connmand[6761]: #7  0x4a374b62 in /usr/lib/libdbus-1.so.3
connmand[6761]: #8  0x4a3602b7 in /usr/lib/libdbus-1.so.3
connmand[6761]: #9  0x4a3639f5 in /usr/lib/libdbus-1.so.3
connmand[6761]: #10 0x8054250 in message_dispatch() at mainloop.c:0
connmand[6761]: #11 0x49f3e9d7 in /lib/libglib-2.0.so.0
connmand[6761]: #12 0x49f3de38 in /lib/libglib-2.0.so.0
connmand[6761]: #13 0x49f3e13e in /lib/libglib-2.0.so.0
connmand[6761]: #14 0x49f3e5a6 in /lib/libglib-2.0.so.0
connmand[6761]: #15 0x8053ab6 in main() at nat.c:0
connmand[6761]: #16 0x49cfc4c4 in /lib/libc.so.6
connmand[6761]: +++++++++++++++++++++++++++

11 years agogdhcp: Set client state to INIT_SELECTING on restart
Forest Bond [Mon, 16 Jul 2012 13:09:01 +0000 (09:09 -0400)]
gdhcp: Set client state to INIT_SELECTING on restart

With the previous behavior, we would end up sending a discover message
and then ignoring the reply due to the client state mismatch, so a
restart would never result in successful acquisition of a lease.

RFC 2131 specifies that the client should return to INIT state in
various restart scenarios.  However, also note that it would not make
sense in any case to send a discover message and ignore the reply.

11 years agortnl: Support PPP connections
Forest Bond [Wed, 20 Jun 2012 21:06:28 +0000 (17:06 -0400)]
rtnl: Support PPP connections

The ARP header type for PPP connections is ARPHRD_PPP (512).

11 years agogresolv: Use predefined mnemonics rather than magic numbers
Grant Erickson [Mon, 16 Jul 2012 16:48:10 +0000 (09:48 -0700)]
gresolv: Use predefined mnemonics rather than magic numbers

Use predefined mnemonics from arpa/nameserv.h for the return value from
ns_msg_getflag rather than magic numbers.

11 years agogresolv: Do not update successful status with unsuccessful one
Grant Erickson [Mon, 16 Jul 2012 16:48:09 +0000 (09:48 -0700)]
gresolv: Do not update successful status with unsuccessful one

When performing a resolver lookup from timeserver or wpad, both perform
queries with an unspecified address family. This means that both A and
AAAA record queries are issued. In cases where a valid, successful A
response comes back but where the AAAA query results in a timeout, do
not smash the successful A status with the time out AAAA status;
otherwise, the timeserver or wpad will appear to fail to them when, in
fact, the A query was successful and more than satisfies its unspecified
address family requirement.

Partial fix for BMC#25486.

11 years agogresolve: Fix a typo in conditional check for returning results
Grant Erickson [Mon, 16 Jul 2012 16:48:08 +0000 (09:48 -0700)]
gresolve: Fix a typo in conditional check for returning results

In both parse_response and query_timeout there exists logic that checks
to ensure that both an A and AAAA lookups have either been responded to
or timed out before processing and returning results to the caller. In
query_timeout, there was a typo in the condition check such that it did
not match those conditions tested in parse_response.

11 years agontp: Add debug message when starting NTP against resolved server
Grant Erickson [Mon, 16 Jul 2012 16:48:07 +0000 (09:48 -0700)]
ntp: Add debug message when starting NTP against resolved server

This patch adds an analagous debug message when starting NTP against a
resolved server as when starting against a numbered server.

11 years agontp: Fixed a debug message typo
Grant Erickson [Mon, 16 Jul 2012 16:48:06 +0000 (09:48 -0700)]
ntp: Fixed a debug message typo

11 years agontp: Retry a given server address multiple times before falling back
Grant Erickson [Mon, 16 Jul 2012 16:48:05 +0000 (09:48 -0700)]
ntp: Retry a given server address multiple times before falling back

This patch causes the internal NTP client to retry a given server
address up to three times (four total attempts) at a two second interval
before falling back to another server name or server address.

11 years agontp: Use mnemonic when specifying the request precision
Grant Erickson [Mon, 16 Jul 2012 16:48:04 +0000 (09:48 -0700)]
ntp: Use mnemonic when specifying the request precision

This patch uses a mnemonic to specify the request precision and also
adds a comment how a future implementation might pass along the actual
system wall clock precision.

11 years agontp: Add mnemonics for common clock precisions
Grant Erickson [Mon, 16 Jul 2012 16:48:03 +0000 (09:48 -0700)]
ntp: Add mnemonics for common clock precisions

11 years agontp: Use mnemonics when checking reply flags
Grant Erickson [Mon, 16 Jul 2012 16:48:02 +0000 (09:48 -0700)]
ntp: Use mnemonics when checking reply flags

Use mnemonics when checking reply flags and print out information in
debug mode about why the reply flags were rejected.

11 years agontp: Specify leap-not-in-sync in flags
Grant Erickson [Mon, 16 Jul 2012 16:48:01 +0000 (09:48 -0700)]
ntp: Specify leap-not-in-sync in flags

This patch sets the non-in-sync flag of the leap subfield of the packet
flags field. This reflects behavior implemented by ntpdate or ntpd in
one-shot mode.

11 years agontp: Send a transmit time value that reflects current system time
Grant Erickson [Mon, 16 Jul 2012 16:48:00 +0000 (09:48 -0700)]
ntp: Send a transmit time value that reflects current system time

This sets the ntp request packet transmit time to the current system
time to reflect behavior implemented by ntpdate and ntpd in one-shot
mode.

11 years agontp: Use mnemonics rather than magic numbers
Grant Erickson [Mon, 16 Jul 2012 16:47:59 +0000 (09:47 -0700)]
ntp: Use mnemonics rather than magic numbers

Convert a magic number into equivalent mnemonics for the flags (leap,
version, mode) packet field.

11 years agontp: Add mnemonics for the flags (leap, version, mode) packet field
Grant Erickson [Mon, 16 Jul 2012 16:47:58 +0000 (09:47 -0700)]
ntp: Add mnemonics for the flags (leap, version, mode) packet field

11 years agotimeserver: Try all resolved timeserver IP addresses
Jukka Rissanen [Mon, 16 Jul 2012 08:00:47 +0000 (11:00 +0300)]
timeserver: Try all resolved timeserver IP addresses

If we get more than one IP address, then add those
server addresses to the time server list so that they
can be tried if the first entry fails.

11 years agontp: If the server cannot be contacted, try next one
Jukka Rissanen [Mon, 16 Jul 2012 08:00:46 +0000 (11:00 +0300)]
ntp: If the server cannot be contacted, try next one

This could happen if the network routes are not yet setup
so the sendto() could fail. In this case try next address and
hope for the best. This is a rare issue but I have seen it
couple of times.

11 years agoRevert "build: Use -Wshadow compiler option"
Marcel Holtmann [Mon, 16 Jul 2012 13:12:05 +0000 (10:12 -0300)]
Revert "build: Use -Wshadow compiler option"

11 years agobuild: Use -Wshadow compiler option
Marcel Holtmann [Sun, 15 Jul 2012 22:59:19 +0000 (19:59 -0300)]
build: Use -Wshadow compiler option

11 years agodnsproxy: Avoid multiple shadowing variables
Marcel Holtmann [Sun, 15 Jul 2012 22:58:46 +0000 (19:58 -0300)]
dnsproxy: Avoid multiple shadowing variables

11 years agotethering: Avoid shadowing connection variable
Marcel Holtmann [Sun, 15 Jul 2012 22:55:07 +0000 (19:55 -0300)]
tethering: Avoid shadowing connection variable

11 years agosession: Avoid shadowing hash table iterator
Marcel Holtmann [Sun, 15 Jul 2012 22:54:14 +0000 (19:54 -0300)]
session: Avoid shadowing hash table iterator

11 years agosession: Avoid shadowing session info variable
Marcel Holtmann [Sun, 15 Jul 2012 22:53:13 +0000 (19:53 -0300)]
session: Avoid shadowing session info variable

11 years agoconfig: Avoid shadowing config structure variable
Marcel Holtmann [Sun, 15 Jul 2012 22:51:11 +0000 (19:51 -0300)]
config: Avoid shadowing config structure variable

11 years agocounter: Avoid shadowing connection variable
Marcel Holtmann [Sun, 15 Jul 2012 22:50:29 +0000 (19:50 -0300)]
counter: Avoid shadowing connection variable

11 years agonotifier: Avoid shadowing connected variable
Marcel Holtmann [Sun, 15 Jul 2012 22:43:17 +0000 (19:43 -0300)]
notifier: Avoid shadowing connected variable

11 years agoagent: Avoid shadowing connection variable
Marcel Holtmann [Sun, 15 Jul 2012 22:41:18 +0000 (19:41 -0300)]
agent: Avoid shadowing connection variable

11 years agoservice: Avoid shadowing string variable
Marcel Holtmann [Sun, 15 Jul 2012 22:40:49 +0000 (19:40 -0300)]
service: Avoid shadowing string variable

11 years agotask: Avoid shadowing connection variable
Marcel Holtmann [Sun, 15 Jul 2012 22:39:51 +0000 (19:39 -0300)]
task: Avoid shadowing connection variable

11 years agoplugins: Avoid shadowing connection variable
Marcel Holtmann [Sun, 15 Jul 2012 22:39:24 +0000 (19:39 -0300)]
plugins: Avoid shadowing connection variable

11 years agogsupplicant: Avoid shadowing key variable
Marcel Holtmann [Sun, 15 Jul 2012 22:31:28 +0000 (19:31 -0300)]
gsupplicant: Avoid shadowing key variable

11 years agounit: Avoid shadowing session info variable
Marcel Holtmann [Sun, 15 Jul 2012 22:31:06 +0000 (19:31 -0300)]
unit: Avoid shadowing session info variable

11 years agotools: Avoid shadowing buffer variable
Marcel Holtmann [Sun, 15 Jul 2012 22:30:38 +0000 (19:30 -0300)]
tools: Avoid shadowing buffer variable

11 years agogdhcp: Avoid shadowing address string variable
Marcel Holtmann [Sun, 15 Jul 2012 22:29:26 +0000 (19:29 -0300)]
gdhcp: Avoid shadowing address string variable

11 years agoservice: Gateway IP address property is not sent
Jukka Rissanen [Thu, 12 Jul 2012 12:32:42 +0000 (15:32 +0300)]
service: Gateway IP address property is not sent

The address of the IP gateway is not sent when the IP
property changes. This was because of timing issues i.e.,
the gateway was not yet set when the other IP properties
were sent.

Fixes BMC#25471

11 years agowifi: Debug print fixed
Jukka Rissanen [Tue, 10 Jul 2012 15:13:49 +0000 (18:13 +0300)]
wifi: Debug print fixed

Convert a warn message to debug one because it is printed
too often to be usefull as a warning message.

11 years agowifi: Scan all hidden and provisioned AP
Jukka Rissanen [Tue, 10 Jul 2012 15:13:48 +0000 (18:13 +0300)]
wifi: Scan all hidden and provisioned AP

11 years agoconfig: Get configurations that are provisioned
Jukka Rissanen [Tue, 10 Jul 2012 15:13:47 +0000 (18:13 +0300)]
config: Get configurations that are provisioned

We need the list of provisioned services so that
all the hidden ones can be scanned.

11 years agoconfig: Read hidden AP information from config file
Jukka Rissanen [Tue, 10 Jul 2012 15:13:46 +0000 (18:13 +0300)]
config: Read hidden AP information from config file

11 years agodoc: Hidden AP provisioning information added
Jukka Rissanen [Tue, 10 Jul 2012 15:13:45 +0000 (18:13 +0300)]
doc: Hidden AP provisioning information added

11 years agoTODO: Remove task about wpspin as PreviousPassphrase type
Tomasz Bursztyka [Tue, 10 Jul 2012 14:45:14 +0000 (17:45 +0300)]
TODO: Remove task about wpspin as PreviousPassphrase type

11 years agodoc: Add necessary documentation about wpspin as a PreviousPassphrase type
Tomasz Bursztyka [Tue, 10 Jul 2012 14:45:13 +0000 (17:45 +0300)]
doc: Add necessary documentation about wpspin as a PreviousPassphrase type

11 years agoagent: Handle wpspin type as a PreviousPassphrase
Tomasz Bursztyka [Tue, 10 Jul 2012 14:45:12 +0000 (17:45 +0300)]
agent: Handle wpspin type as a PreviousPassphrase

11 years agoagent: Rewrite how PreviousPassphrase field is handled
Tomasz Bursztyka [Tue, 10 Jul 2012 14:45:11 +0000 (17:45 +0300)]
agent: Rewrite how PreviousPassphrase field is handled

This is a necessary rewrite to make it clearer and simpler, before implementing
wpspin type support.

11 years agodevice: Turn off all running interfaces at startup
Jukka Rissanen [Mon, 9 Jul 2012 09:24:48 +0000 (12:24 +0300)]
device: Turn off all running interfaces at startup

Turning off running interfaces that have IP address,
causes all routes related to those interfaces to be
removed by kernel. This way connman will get a fresh
start without any extra and obsolete routes around.

11 years agoinet: Return all running interfaces
Jukka Rissanen [Mon, 9 Jul 2012 09:24:47 +0000 (12:24 +0300)]
inet: Return all running interfaces

Add a function that returns all (except loopback)
interfaces that are up and running (have IP address).
This information is used in following patch to clean
up the routes that are left hanging around.

11 years agoservice: Make sure the pending reply is not lost
Jukka Rissanen [Wed, 4 Jul 2012 08:21:27 +0000 (11:21 +0300)]
service: Make sure the pending reply is not lost

The user data (pending reply) can be null if agent returns
an error. In this case do not overwrite the real pending reply.

11 years agodhcp: warn on invalid netmask
Julien Massot [Thu, 5 Jul 2012 14:12:53 +0000 (14:12 +0000)]
dhcp: warn on invalid netmask

11 years agomain: Dynamically allocate default blacklist array, free on exit
Patrik Flykt [Thu, 28 Jun 2012 11:20:57 +0000 (14:20 +0300)]
main: Dynamically allocate default blacklist array, free on exit

11 years agomain: Move default string arrays top of the file
Patrik Flykt [Thu, 28 Jun 2012 13:06:00 +0000 (16:06 +0300)]
main: Move default string arrays top of the file

11 years agotechnology: check validity of given properties for tethering
Julien Massot [Wed, 4 Jul 2012 16:09:03 +0000 (16:09 +0000)]
technology: check validity of given properties for tethering

A WPA2 passphrase is between 8 and 63 characters,
a SSID name is between 1 and 32 characters.

11 years agotechnology: return already enabled when tethering is enabled
Julien Massot [Wed, 4 Jul 2012 16:09:02 +0000 (16:09 +0000)]
technology: return already enabled when tethering is enabled

11 years agoTODO: Remove BackgroundScanning task
Tomasz Bursztyka [Wed, 4 Jul 2012 14:24:42 +0000 (17:24 +0300)]
TODO: Remove BackgroundScanning task

11 years agowifi: Add support for autoscan request
Tomasz Bursztyka [Wed, 4 Jul 2012 14:24:41 +0000 (17:24 +0300)]
wifi: Add support for autoscan request

11 years agogsupplicant: Add a function to handle autoscan method
Tomasz Bursztyka [Wed, 4 Jul 2012 14:24:40 +0000 (17:24 +0300)]
gsupplicant: Add a function to handle autoscan method

11 years agoTODO: Add what wifi legacy support should be removed about set_regdom
Tomasz Bursztyka [Wed, 4 Jul 2012 13:48:07 +0000 (16:48 +0300)]
TODO: Add what wifi legacy support should be removed about set_regdom

11 years agowifi: Add capability to set regulatory domain through device's interface
Tomasz Bursztyka [Wed, 4 Jul 2012 13:48:06 +0000 (16:48 +0300)]
wifi: Add capability to set regulatory domain through device's interface

Fixes BMC#25244

11 years agogsupplicant: Add a method to set interface's country property
Tomasz Bursztyka [Wed, 4 Jul 2012 13:48:05 +0000 (16:48 +0300)]
gsupplicant: Add a method to set interface's country property

11 years agogsupplicant: Adapt set country callback to return a result
Tomasz Bursztyka [Wed, 4 Jul 2012 13:48:04 +0000 (16:48 +0300)]
gsupplicant: Adapt set country callback to return a result

This is necessary for the next coming patches, to fix country setting by interface

11 years agotechnology: Set regulatory domain by device or fallback to technology based
Tomasz Bursztyka [Wed, 4 Jul 2012 13:48:03 +0000 (16:48 +0300)]
technology: Set regulatory domain by device or fallback to technology based

11 years agodevice: Add capability to notify on regulatory domain setting
Tomasz Bursztyka [Wed, 4 Jul 2012 13:48:02 +0000 (16:48 +0300)]
device: Add capability to notify on regulatory domain setting

11 years agotechnology: Notify the regulatory domain setting by device
Tomasz Bursztyka [Wed, 4 Jul 2012 13:48:01 +0000 (16:48 +0300)]
technology: Notify the regulatory domain setting by device

11 years agodevice: Add driver capability to set regulatory domain on device basis
Tomasz Bursztyka [Wed, 4 Jul 2012 13:48:00 +0000 (16:48 +0300)]
device: Add driver capability to set regulatory domain on device basis

11 years agodoc: Fix small typo
Marcel Holtmann [Wed, 4 Jul 2012 17:35:56 +0000 (19:35 +0200)]
doc: Fix small typo

11 years agoRelease 1.3 1.3
Marcel Holtmann [Mon, 2 Jul 2012 12:34:25 +0000 (14:34 +0200)]
Release 1.3

11 years agortnl: Fixed log for the type RTM_GETADDR
Paulo Pizarro [Mon, 2 Jul 2012 11:53:43 +0000 (08:53 -0300)]
rtnl: Fixed log for the type RTM_GETADDR

The connman prints an unknown type when sending a request RTM_GETADDR

11 years agotethering: Fix incorrect index value for private network
Wu Zheng [Mon, 2 Jul 2012 05:21:05 +0000 (13:21 +0800)]
tethering: Fix incorrect index value for private network

In __connman_private_network_request, pn->fd is used as the index value
and passed to __connman_ippool_create, which is not correct.
It result in the private network is block used externally.

11 years agounit: Watch for signals only on CONNMAN_SERVICE
Lucas De Marchi [Thu, 28 Jun 2012 14:20:54 +0000 (11:20 -0300)]
unit: Watch for signals only on CONNMAN_SERVICE

11 years agoofono: Watch for signals only on OFONO_SERVICE
Lucas De Marchi [Thu, 28 Jun 2012 14:20:53 +0000 (11:20 -0300)]
ofono: Watch for signals only on OFONO_SERVICE

11 years agodundee: Watch for signals only on DUNDEE_SERVICE
Lucas De Marchi [Thu, 28 Jun 2012 14:20:52 +0000 (11:20 -0300)]
dundee: Watch for signals only on DUNDEE_SERVICE

11 years agobluetooth: Watch for signals only on BLUEZ_SERVICE
Lucas De Marchi [Thu, 28 Jun 2012 14:20:51 +0000 (11:20 -0300)]
bluetooth: Watch for signals only on BLUEZ_SERVICE

11 years agogdbus: Fix removal of filter after last filter_data
Lucas De Marchi [Mon, 25 Jun 2012 15:44:40 +0000 (12:44 -0300)]
gdbus: Fix removal of filter after last filter_data

If there's a signal watch that's also watching for name
(data->name_watch) currently we are trying to remove the message_filter
twice since we may have the following call chain:

filter_data_remove_callback()
  filter_data_free()
    g_dbus_remove_watch()
      filter_data_remove_callback()
filter_data_free()
        dbus_connection_remove_filter()
  dbus_connection_remove_filter()

Because of this we can't currently watch for signals passing the bus
name. After this patch we don't have this issue anymore.

We fix it by removing the filter before calling filter_data_free() if we
are the last filter_data and thus avoid calling
dbus_connection_remove_filter() twice.

11 years agoofono: Fix potential crash
Guillaume Zajac [Wed, 27 Jun 2012 15:00:29 +0000 (17:00 +0200)]
ofono: Fix potential crash

If a dummy context is created, it might happen
that its index is equal to -1. In this particular case
the IP address has not been copied to context->address
during ipv4 extraction.
If we force from oFono a context activation, it will
make ConnMan crashing on set_connected().

11 years agoinet: Fix usage of getaddrinfo() return value
Patrik Flykt [Thu, 28 Jun 2012 08:24:53 +0000 (11:24 +0300)]
inet: Fix usage of getaddrinfo() return value

Fixes BMC#25304

11 years agowifi: Add wifi pointer NULL checks
Patrik Flykt [Thu, 28 Jun 2012 07:11:03 +0000 (10:11 +0300)]
wifi: Add wifi pointer NULL checks

Always check what connman_device_get_data() returns and act
accordingly.

11 years agomain: static-qualify default config values
Grant Erickson [Thu, 28 Jun 2012 00:21:18 +0000 (17:21 -0700)]
main: static-qualify default config values

The default configuration arrays default_auto_connect and
default_blacklist must be static-qualified. Otherwise, their
stack-allocated storage will go out of scope after parse_config
is finished and empty or commented-out DefaultAutoConnectTechnologies
or NetworkInterfaceBlacklist config entries will refer to
random stack data.

11 years agoTODO: Add WPS pin code task
Patrik Flykt [Wed, 27 Jun 2012 12:25:15 +0000 (15:25 +0300)]
TODO: Add WPS pin code task

11 years agoTODO: Remove DUN task, update WiFi scan owner
Patrik Flykt [Wed, 27 Jun 2012 12:24:26 +0000 (15:24 +0300)]
TODO: Remove DUN task, update WiFi scan owner

11 years agoRelease 1.2 1.2
Marcel Holtmann [Tue, 26 Jun 2012 21:56:09 +0000 (14:56 -0700)]
Release 1.2

11 years agogweb: Use g_try_realloc instead of g_realloc
Jukka Rissanen [Tue, 26 Jun 2012 08:29:05 +0000 (11:29 +0300)]
gweb: Use g_try_realloc instead of g_realloc

11 years agodoc: Document 'informational' value of Requirement field
Tomasz Bursztyka [Mon, 25 Jun 2012 10:16:37 +0000 (13:16 +0300)]
doc: Document 'informational' value of Requirement field

11 years agoagent: Fix how to provide PreviousPassphrase through D-Bus
Tomasz Bursztyka [Mon, 25 Jun 2012 10:16:36 +0000 (13:16 +0300)]
agent: Fix how to provide PreviousPassphrase through D-Bus

11 years agoipconfig: Save prefixlen only if not cleared
Julien Massot [Fri, 15 Jun 2012 13:15:31 +0000 (13:15 +0000)]
ipconfig: Save prefixlen only if not cleared

This commit fixes a bug when using manual ipv4 addressing.
The first time it works, but once the service is reconnected it uses
an invalid netmask: 255.255.255.255.

11 years agowifi: Check we have valid wifi pointer in autoscan
Jukka Rissanen [Thu, 21 Jun 2012 10:57:33 +0000 (13:57 +0300)]
wifi: Check we have valid wifi pointer in autoscan

The wifi pointer in device might be NULL if wpa_supplicant dies
between autoscans.

11 years agotechnology: Return proper error code when already disabled
Jukka Rissanen [Thu, 21 Jun 2012 10:39:17 +0000 (13:39 +0300)]
technology: Return proper error code when already disabled

Return AlreadyDisabled to the caller instead of InProgress if we
are already disabled.

11 years agotechnology: Return proper error code when already enabled
Jukka Rissanen [Thu, 21 Jun 2012 10:39:16 +0000 (13:39 +0300)]
technology: Return proper error code when already enabled

We do not call the generic error message function because
it maps EALREADY to EINPROGRESS. So instead we call correct
error return function which returns AlreadyEnabled to the
caller.

Fixes BMC#25306

11 years agomain.conf: Comment out example default values and add documentation
Patrik Flykt [Mon, 25 Jun 2012 06:24:15 +0000 (09:24 +0300)]
main.conf: Comment out example default values and add documentation

11 years agomain: Use 'NetworkInterfaceBlacklist' string everywhere
Patrik Flykt [Mon, 25 Jun 2012 06:23:03 +0000 (09:23 +0300)]
main: Use 'NetworkInterfaceBlacklist' string everywhere

11 years agortnl: Use filtered devices to determine blacklisted devices
Manfred Kober [Thu, 21 Jun 2012 07:40:33 +0000 (09:40 +0200)]
rtnl: Use filtered devices to determine blacklisted devices

Instead of hard-coding some selected devices to be ignored, the
blacklist check now uses the connman_device_isfiltered list.

11 years agodevice: Consider blacklisted interfaces from main.conf when filtering
Manfred Kober [Thu, 21 Jun 2012 07:40:32 +0000 (09:40 +0200)]
device: Consider blacklisted interfaces from main.conf when filtering

Interfaces blacklisted in main.conf are now also taken into account
by connman_device_isfiltered. This is done in addition to what gets
passed with -i or -I on the command line.

11 years agomain: Support NetworkInterfaceBlacklist from main.conf
Manfred Kober [Thu, 21 Jun 2012 07:40:31 +0000 (09:40 +0200)]
main: Support NetworkInterfaceBlacklist from main.conf

This adds a settings variable and a function for fetching that list

11 years agomain.conf: Add NetworkInterfaceBlacklist
Manfred Kober [Thu, 21 Jun 2012 07:40:30 +0000 (09:40 +0200)]
main.conf: Add NetworkInterfaceBlacklist

11 years agodnsproxy: Check cache for TCP request before connecting to server
Jukka Rissanen [Wed, 20 Jun 2012 10:38:40 +0000 (13:38 +0300)]
dnsproxy: Check cache for TCP request before connecting to server

It is not necessary to create TCP sockets to server if we have
the answer already in the cache.

11 years agodnsproxy: Use DNS header in checks
Jukka Rissanen [Wed, 20 Jun 2012 10:38:39 +0000 (13:38 +0300)]
dnsproxy: Use DNS header in checks

We should use the DNS header struct when checking DNS
protocol values instead of using pointer so that the
TCP offset is properly taken care of.

11 years agodnsproxy: Add more debugging prints
Jukka Rissanen [Wed, 20 Jun 2012 10:38:38 +0000 (13:38 +0300)]
dnsproxy: Add more debugging prints

11 years agodnsproxy: Check cache properly for TCP packets
Jukka Rissanen [Wed, 20 Jun 2012 10:38:37 +0000 (13:38 +0300)]
dnsproxy: Check cache properly for TCP packets

The DNS packet starts from offset 2 in TCP payload.