framework/connectivity/connman.git
12 years agodnsproxy: Remove pending requests before destroying the channel
Julien Massot [Wed, 14 Mar 2012 08:59:07 +0000 (08:59 +0000)]
dnsproxy: Remove pending requests before destroying the channel

This fixes a segfault in request_timeout when disabling tethering.

12 years agogweb: workaround for setsockopt failure
Sébastien Bianti [Tue, 20 Mar 2012 11:09:47 +0000 (12:09 +0100)]
gweb: workaround for setsockopt failure

Setting socket option BINDTODEVICE requires CAP_NET_RAW capability.

12 years agoTODO: Create tasks for main.conf variables
Patrik Flykt [Mon, 19 Mar 2012 12:36:25 +0000 (14:36 +0200)]
TODO: Create tasks for main.conf variables

12 years agoset-ipv6-method: The arguments have to be wrapped into a variant
Daniel Wagner [Mon, 19 Mar 2012 13:03:28 +0000 (14:03 +0100)]
set-ipv6-method: The arguments have to be wrapped into a variant

Fixes BMC#24986

12 years agoset-ipv4-method: The arguments have to be wrapped into a variant
Daniel Wagner [Mon, 19 Mar 2012 13:03:27 +0000 (14:03 +0100)]
set-ipv4-method: The arguments have to be wrapped into a variant

Fixes BMC#24986

12 years agolist-services: Print only identifier instead of path
Daniel Wagner [Mon, 19 Mar 2012 13:03:26 +0000 (14:03 +0100)]
list-services: Print only identifier instead of path

test-connman services also reports the identifier only. This makes
copy&paste with the mouse a bit simpler.

12 years agoservice: Fix refcount leak on ipconfigs
Daniel Wagner [Mon, 19 Mar 2012 12:50:41 +0000 (13:50 +0100)]
service: Fix refcount leak on ipconfigs

In __connman_service_connect() we call __connman_ipconfig_enable()
which takes a ref on the ipconfig object. Later when the service
state machine is updated service takes another ref.

When the device disapears during operation (the user didn't call
Service.Disconnect()), we do not call __connman_ipconfig_disable()
anymore which would drop one ref.

12 years agoipconfig: Disable IPv6 for new interfaces
Daniel Wagner [Mon, 19 Mar 2012 12:50:40 +0000 (13:50 +0100)]
ipconfig: Disable IPv6 for new interfaces

We don't have yet an ipconfig for this interface, that means
the service.c does not yet know this interface. In order to
be able to get into sync we disable IPv6 auto connection at this point.

If the service state machine decides to connect, it will enable it
again.

12 years agoipconfig: Track ipconfigs enabled/disabled state
Daniel Wagner [Mon, 19 Mar 2012 12:50:39 +0000 (13:50 +0100)]
ipconfig: Track ipconfigs enabled/disabled state

12 years agoipconfig: Do not enable IPv6 ipconfigs when loading the properties
Daniel Wagner [Mon, 19 Mar 2012 12:50:38 +0000 (13:50 +0100)]
ipconfig: Do not enable IPv6 ipconfigs when loading the properties

When enabling IPv6 when loading the Service properties, the Service
state machine gets out of sync when AutoConnect is disabled.

At this point we should only load the properties and let the
Service state machine decide when to enable the ipconfigs.
And the good news is that the core handles this already.

12 years agoservice: Enable AutoConnect for new ethernet services
Daniel Wagner [Mon, 19 Mar 2012 12:50:37 +0000 (13:50 +0100)]
service: Enable AutoConnect for new ethernet services

We need also to set the Favorite flag to true in order to let
the services to be auto connected.

12 years agoservice: Load/store AutoConnect and Favorite properties for ethernet
Daniel Wagner [Mon, 19 Mar 2012 12:50:36 +0000 (13:50 +0100)]
service: Load/store AutoConnect and Favorite properties for ethernet

12 years agoethernet: Do not connect network on LOWER_UP
Daniel Wagner [Mon, 19 Mar 2012 12:50:35 +0000 (13:50 +0100)]
ethernet: Do not connect network on LOWER_UP

Ethernet networks should honor the AutoConnect feature as the rest
of the network types.

Just register the network object at the core when we get LOWER_UP.
Then the core can decide when to connect to the network.

There is no behavior change when AutoConnect is enabled, So if the
user plugs the cable the ethernet network will automatically connect
as it was before.

If AutoConnect is disabled, the core will not connect to the network
automatically.

12 years agovpn: Remove wrong include of <glib/ghash.h>
Marcel Holtmann [Mon, 19 Mar 2012 23:13:09 +0000 (16:13 -0700)]
vpn: Remove wrong include of <glib/ghash.h>

12 years agowispr: do not take care about http_proxy
Tomasz Bursztyka [Thu, 15 Mar 2012 08:49:16 +0000 (10:49 +0200)]
wispr: do not take care about http_proxy

12 years agowispr: do not lookup for proxy if service does not provide any
Tomasz Bursztyka [Thu, 15 Mar 2012 08:49:15 +0000 (10:49 +0200)]
wispr: do not lookup for proxy if service does not provide any

12 years agoconnection: Try to avoid having two default gateways
Jukka Rissanen [Wed, 14 Mar 2012 15:28:59 +0000 (17:28 +0200)]
connection: Try to avoid having two default gateways

It is possible that because the rtnl messages arrive
asynchronously, we might end up having two default gateways
that are both active at the same time. If that happens, we try
to downgrade the one that is not yet active.

12 years agoconnection: Remove obsolete routes for VPN
Jukka Rissanen [Wed, 14 Mar 2012 15:28:58 +0000 (17:28 +0200)]
connection: Remove obsolete routes for VPN

12 years agoconnection: Check all active gateways in update
Jukka Rissanen [Wed, 14 Mar 2012 15:28:57 +0000 (17:28 +0200)]
connection: Check all active gateways in update

There can be multiple active gateways in the system at the same
time so we must check them all when updating gateway info.

12 years agoconnection: Get correct VPN phy link data
Jukka Rissanen [Wed, 14 Mar 2012 15:28:56 +0000 (17:28 +0200)]
connection: Get correct VPN phy link data

VPN could be using wrong phy link data if there are multiple
active links.

12 years agoconnection: Do not set host routes in VPN case
Jukka Rissanen [Wed, 14 Mar 2012 15:28:55 +0000 (17:28 +0200)]
connection: Do not set host routes in VPN case

These routes are not needed.

12 years agoconnection: Avoid stale memory access
Jukka Rissanen [Wed, 14 Mar 2012 15:28:54 +0000 (17:28 +0200)]
connection: Avoid stale memory access

Get the active gateway pointer only after the gateway hash
has been manipulated by add_gateway(). It is possible that
we are accessing stale pointer otherwise.

12 years agoservice: Check redundant default changed notify
Jukka Rissanen [Wed, 14 Mar 2012 15:28:53 +0000 (17:28 +0200)]
service: Check redundant default changed notify

Notify default service changed only if we actually changed
the default service.

12 years agoservice: Allow removing only certain type nameservers
Jukka Rissanen [Wed, 14 Mar 2012 15:28:52 +0000 (17:28 +0200)]
service: Allow removing only certain type nameservers

When nameserver are removed by __connman_connection_gateway_remove()
then remove only certain type nameserver (IPv4 or IPv6). This is
needed so that we do not loose IPv4 routes if only IPv6 nameservers
are to be removed. This is needed when there are multiple connected
services.

12 years agoconnection: Remove nameserver routes only once
Jukka Rissanen [Wed, 14 Mar 2012 15:28:51 +0000 (17:28 +0200)]
connection: Remove nameserver routes only once

12 years agoconnection: Trigger service updates only after setting gateways
Jukka Rissanen [Wed, 14 Mar 2012 15:28:50 +0000 (17:28 +0200)]
connection: Trigger service updates only after setting gateways

This is needed so that gateways are set properly when service
triggers online checks.

12 years agoconnection: Fix debugging prints
Jukka Rissanen [Wed, 14 Mar 2012 15:28:49 +0000 (17:28 +0200)]
connection: Fix debugging prints

12 years agoinet: Fix debugging prints
Jukka Rissanen [Wed, 14 Mar 2012 15:28:48 +0000 (17:28 +0200)]
inet: Fix debugging prints

12 years agoRelease 0.79
Marcel Holtmann [Tue, 6 Mar 2012 18:23:11 +0000 (10:23 -0800)]
Release 0.79

12 years agotest: test-session does not exit any more when catching dbus exceptions
Tomasz Bursztyka [Tue, 6 Mar 2012 13:04:45 +0000 (15:04 +0200)]
test: test-session does not exit any more when catching dbus exceptions

Fixes BMC#24964

12 years agotest: Support the possibility to input multiple parameters into simple-agent
Tomasz Bursztyka [Tue, 6 Mar 2012 12:45:14 +0000 (14:45 +0200)]
test: Support the possibility to input multiple parameters into simple-agent

Fixes BMC#24965

12 years agotest: Add support of hidden service input into simple-agent
Tomasz Bursztyka [Tue, 6 Mar 2012 12:45:13 +0000 (14:45 +0200)]
test: Add support of hidden service input into simple-agent

12 years agoofono: Remove network whenever context is removed
Jussi Kukkonen [Thu, 1 Mar 2012 14:13:44 +0000 (16:13 +0200)]
ofono: Remove network whenever context is removed

Fixes BMC#24942

12 years agoofono: fix modem lookup in cm_context_added()
Jussi Kukkonen [Thu, 1 Mar 2012 14:13:43 +0000 (16:13 +0200)]
ofono: fix modem lookup in cm_context_added()

12 years agoipconfig: Fix broken attempt to handle {IPv4,IPv6}.Configuration
Marcel Holtmann [Mon, 5 Mar 2012 04:45:54 +0000 (20:45 -0800)]
ipconfig: Fix broken attempt to handle {IPv4,IPv6}.Configuration

12 years agoservice: Fix two small style issues
Marcel Holtmann [Mon, 5 Mar 2012 04:45:33 +0000 (20:45 -0800)]
service: Fix two small style issues

12 years agocore: Add extra checks for set property methods
Marcel Holtmann [Mon, 5 Mar 2012 04:34:19 +0000 (20:34 -0800)]
core: Add extra checks for set property methods

12 years agoclock: Revert change to accept variant of variant
Marcel Holtmann [Mon, 5 Mar 2012 04:33:57 +0000 (20:33 -0800)]
clock: Revert change to accept variant of variant

12 years agoAUTHORS: Metion Tim's contribution
Daniel Wagner [Thu, 1 Mar 2012 12:37:20 +0000 (13:37 +0100)]
AUTHORS: Metion Tim's contribution

12 years agoAUTHORS: Mention Otavio's contribution
Daniel Wagner [Thu, 1 Mar 2012 12:23:56 +0000 (13:23 +0100)]
AUTHORS: Mention Otavio's contribution

12 years agoipconfig: Accept variant types in __connman_ipconfig_set_config()
Tim Sander [Thu, 1 Mar 2012 12:35:32 +0000 (13:35 +0100)]
ipconfig: Accept variant types in __connman_ipconfig_set_config()

According the D-Bus API, the Service interface accepts
variant types.

12 years agoclock: Accept variant types in SetProperty
Tim Sander [Thu, 1 Mar 2012 12:29:44 +0000 (13:29 +0100)]
clock: Accept variant types in SetProperty

According the D-Bus API, the Clock interface accepts
variant types.

12 years agoservice: Fix ServiceRemoved signals
Patrik Flykt [Wed, 29 Feb 2012 14:25:44 +0000 (16:25 +0200)]
service: Fix ServiceRemoved signals

Removed services hash table need not be consulted when sending
ServicesAdded signals as the service structures have already been
deleted. Also clean up both added and removed hash tables after the
signals have been sent.

12 years agoinet: Ensure data->channel exist before accessing it
Otavio Salvador [Wed, 29 Feb 2012 08:20:24 +0000 (05:20 -0300)]
inet: Ensure data->channel exist before accessing it

Log of segfault:
...
connmand[676]: src/network.c:check_dhcpv6() reply (nil)
connmand[676]: src/network.c:check_dhcpv6() re-send router solicitation 3
connmand[676]: src/inet.c:__connman_inet_ipv6_send_rs()
connmand[676]: Aborting (signal 11) [connmand]

12 years agotechnology: Enable tech if device is already powered
Alok Barsode [Fri, 24 Feb 2012 14:17:59 +0000 (16:17 +0200)]
technology: Enable tech if device is already powered

connman_technology_add_device() calls __connman_device_enable()
but since the device is already enabled, the calls does not propagate
through to __connman_technology_enabled via connman_device_set_powered.

12 years agocore: Change coding style for passing NULL to time
Grant Erickson [Tue, 28 Feb 2012 17:55:53 +0000 (09:55 -0800)]
core: Change coding style for passing NULL to time

Pass NULL rather than 0 when calling time(2) to follow prefered
stylistic convention.

12 years agodhcpv4-client: Change coding style for passing NULL to time
Grant Erickson [Tue, 28 Feb 2012 17:55:52 +0000 (09:55 -0800)]
dhcpv4-client: Change coding style for passing NULL to time

Pass NULL rather than 0 when calling time(2) to follow prefered
stylistic convention.

12 years agogdhcp: set secs in a RFC 951- and 2131-compliant manner
Grant Erickson [Tue, 28 Feb 2012 16:30:00 +0000 (08:30 -0800)]
gdhcp: set secs in a RFC 951- and 2131-compliant manner

This patch sets the BOOTP secs field in a RFC 951- and 2131-compliant
manner for DHCPv4 DISCOVER and REQUEST/SELECT packets.

Certain DHCP servers, such as that implemented in Mac OS X (< 10.7)
for its "Internet Sharing" feature, refuse to issue a DHCP lease to
clients that have not set a non-zero value in their DISCOVER or
REQUEST packets. In fact, based on http://hints.macworld.com/article.php?
story=20071223001432304, it's not non-zero but a value greater than four (4)
seconds to allow another "authoritative" DHCP server on the subnet to reply
first.

Side-by-side packet analysis of Mac OS X, iOS, Android, ISC and
Windows clients show that these clients set the BOOTP 'secs' field and
are successfully issued a DHCP lease by Mac OS X. By contrast, a
connman-based client will issue 10 back-to-back DISCOVER packets and
will not be returned a DHCP OFFER from the server.

12 years agoAUTHORS: Mention Mario's contributions
Daniel Wagner [Tue, 28 Feb 2012 12:40:39 +0000 (13:40 +0100)]
AUTHORS: Mention Mario's contributions

12 years agoippool: Fix NULL pointer access
Mario Domenech Goulart [Tue, 28 Feb 2012 12:29:12 +0000 (09:29 -0300)]
ippool: Fix NULL pointer access

Not all allocated blocks info data structure have a pool associated.

12 years agoippool: Fix typo in error message
Mario Domenech Goulart [Tue, 28 Feb 2012 12:29:11 +0000 (09:29 -0300)]
ippool: Fix typo in error message

12 years agoofono: Remove obsolete DUN comment
Daniel Wagner [Tue, 28 Feb 2012 09:23:31 +0000 (10:23 +0100)]
ofono: Remove obsolete DUN comment

12 years agotest-connman: Use GetServices() instead GetProperties()
Daniel Wagner [Sun, 26 Feb 2012 12:01:38 +0000 (13:01 +0100)]
test-connman: Use GetServices() instead GetProperties()

GetProperties() does not return the services path anymore. Instead
the GetServices() method should be used.

12 years agolist-services: Use GetServices() instead GetProperties()
Daniel Wagner [Sun, 26 Feb 2012 12:01:37 +0000 (13:01 +0100)]
list-services: Use GetServices() instead GetProperties()

GetProperties() does not return the services path anymore. Instead
the GetServices() method should be used.

12 years agotest-connman: Use GetServices() instead GetProperties()
Daniel Wagner [Sun, 26 Feb 2012 12:01:36 +0000 (13:01 +0100)]
test-connman: Use GetServices() instead GetProperties()

GetProperties() does not return the services path anymore. Instead
the GetServices() method should be used.

12 years agoservice: Keep ordering and send all services in ServicesAdded
Patrik Flykt [Tue, 28 Feb 2012 09:13:34 +0000 (11:13 +0200)]
service: Keep ordering and send all services in ServicesAdded

Keep services ordering and send also already known services
in ServicesAdded signal. Properties are added for new services,
while the dictionary is left empty for already known ones.

When the service is removed, pack the value of "TRUE" to the
removed service hash in order to indicate a removed object path.
The service struct cannot be used, as it is freed immediately
after returning from service_schedule_removed().

12 years agounit: handling type of connection into session api
Tomasz Bursztyka [Wed, 15 Feb 2012 08:19:50 +0000 (10:19 +0200)]
unit: handling type of connection into session api

12 years agounit: switching from online to state property into test-session
Tomasz Bursztyka [Wed, 15 Feb 2012 08:19:49 +0000 (10:19 +0200)]
unit: switching from online to state property into test-session

12 years agotest: modify test-session to handle a new property
Tomasz Bursztyka [Wed, 15 Feb 2012 08:19:48 +0000 (10:19 +0200)]
test: modify test-session to handle a new property

12 years agotest: fixing type conversion bug in test-session
Tomasz Bursztyka [Wed, 15 Feb 2012 08:19:47 +0000 (10:19 +0200)]
test: fixing type conversion bug in test-session

12 years agodoc: updated session api documentation
Tomasz Bursztyka [Wed, 15 Feb 2012 08:19:46 +0000 (10:19 +0200)]
doc: updated session api documentation

12 years agosession: filtering session state update according to connection type
Tomasz Bursztyka [Wed, 15 Feb 2012 08:19:45 +0000 (10:19 +0200)]
session: filtering session state update according to connection type

12 years agosession: introducing a property to select a type on which the state gets up on
Tomasz Bursztyka [Wed, 15 Feb 2012 08:19:44 +0000 (10:19 +0200)]
session: introducing a property to select a type on which the state gets up on

12 years agosession: do not notify ipconfig content if it's not in a connected state
Tomasz Bursztyka [Wed, 15 Feb 2012 08:19:43 +0000 (10:19 +0200)]
session: do not notify ipconfig content if it's not in a connected state

12 years agoservice: adding a function to know the connected state of an ipconfig
Tomasz Bursztyka [Wed, 15 Feb 2012 08:19:42 +0000 (10:19 +0200)]
service: adding a function to know the connected state of an ipconfig

12 years agosession: do not notify an ipconfig change if the session is not connected
Tomasz Bursztyka [Wed, 15 Feb 2012 08:19:41 +0000 (10:19 +0200)]
session: do not notify an ipconfig change if the session is not connected

12 years agosession: refactor and optimize how notification are raised and when
Tomasz Bursztyka [Wed, 15 Feb 2012 08:19:40 +0000 (10:19 +0200)]
session: refactor and optimize how notification are raised and when

12 years agosession: changing online property to a state property
Tomasz Bursztyka [Wed, 15 Feb 2012 08:19:39 +0000 (10:19 +0200)]
session: changing online property to a state property

Instead of havine online as a boolean, session has now a state which can be
either disconnected, connected or online.

12 years agoAUTHORS: Update email addresses
Patrik Flykt [Wed, 22 Feb 2012 09:46:51 +0000 (11:46 +0200)]
AUTHORS: Update email addresses

12 years agomanager: Fix signature of ServicesRemoved signal
Marcel Holtmann [Mon, 27 Feb 2012 17:14:57 +0000 (09:14 -0800)]
manager: Fix signature of ServicesRemoved signal

12 years agotechnology: Fix technology refcounting
Alok Barsode [Wed, 22 Feb 2012 14:19:13 +0000 (16:19 +0200)]
technology: Fix technology refcounting

__sync_fetch_and_sub() gives the value that had previously been in memory
which gives the older refount.

technology_find() does not refcount the technology.
__connman_technology_update_rfkill() was using technology_get() which
was refcounting the technology. Every technology_get() must be matched
with a corresponding technology_put() for accurate refcounting.

12 years agobuild: Remove find-service and connect-service from test_scripts
Samuel Ortiz [Fri, 24 Feb 2012 22:06:47 +0000 (23:06 +0100)]
build: Remove find-service and connect-service from test_scripts

12 years agotest: Remove find-service as manager LookupService does not exist
Patrik Flykt [Mon, 20 Feb 2012 11:15:40 +0000 (13:15 +0200)]
test: Remove find-service as manager LookupService does not exist

Fixes BMC#24901

12 years agotest: Remove connect-service as manager ConnectService does not exist
Patrik Flykt [Mon, 20 Feb 2012 11:15:08 +0000 (13:15 +0200)]
test: Remove connect-service as manager ConnectService does not exist

Fixes BMC#24900

12 years agoservice: Remove 'Services' property from Manager D-Bus API
Patrik Flykt [Mon, 20 Feb 2012 09:43:44 +0000 (11:43 +0200)]
service: Remove 'Services' property from Manager D-Bus API

Remove support functions and 'Services' property from Manager
D-Bus API. Update gateway in all places service was changed.

12 years agoservice: Implement ServicesAdded and ServicesRemoved signals
Patrik Flykt [Mon, 20 Feb 2012 09:43:43 +0000 (11:43 +0200)]
service: Implement ServicesAdded and ServicesRemoved signals

When services are added or removed, collect them into separate
lists in order to send as many as possible in one go and with
then removed ones sent first. Add a wait of 100ms to collect
more services in one batch. When removing a service check
whether it was also on the added list; if so, remove it from
that list.

12 years agomanager: Use helper function for adding arrays of objpath, dict
Patrik Flykt [Mon, 20 Feb 2012 09:43:42 +0000 (11:43 +0200)]
manager: Use helper function for adding arrays of objpath, dict

Use helper function for adding arrays of object path and
dictionary to D-Bus messages.

12 years agodbus: Function for adding array of object paths and dictionaries
Patrik Flykt [Mon, 20 Feb 2012 09:43:41 +0000 (11:43 +0200)]
dbus: Function for adding array of object paths and dictionaries

Function for adding an array of object paths and dictionaries to
D-Bus messages.

12 years agotethering: Fix pool size request
Daniel Wagner [Mon, 20 Feb 2012 09:00:34 +0000 (10:00 +0100)]
tethering: Fix pool size request

Math is hard, I know.

Fixes BMC#24898

12 years agoippool: Add error and warning messages
Daniel Wagner [Mon, 20 Feb 2012 10:13:33 +0000 (11:13 +0100)]
ippool: Add error and warning messages

12 years agowifi: Add support for default background scanning parameters
Tomasz Bursztyka [Tue, 14 Feb 2012 09:06:27 +0000 (11:06 +0200)]
wifi: Add support for default background scanning parameters

12 years agogsupplicant: Add support for background scanning parameters
Tomasz Bursztyka [Tue, 14 Feb 2012 09:06:26 +0000 (11:06 +0200)]
gsupplicant: Add support for background scanning parameters

12 years agomanager: Fix TechnologyAdded signal signature
Alok Barsode [Wed, 15 Feb 2012 11:49:54 +0000 (12:49 +0100)]
manager: Fix TechnologyAdded signal signature

12 years agotest: Fix scan method to work against technology api in test-connman
Tomasz Bursztyka [Tue, 14 Feb 2012 08:28:36 +0000 (10:28 +0200)]
test: Fix scan method to work against technology api in test-connman

12 years agotest: Update simple-agent to handle RequestBrowser method
Tomasz Bursztyka [Tue, 14 Feb 2012 10:05:47 +0000 (12:05 +0200)]
test: Update simple-agent to handle RequestBrowser method

12 years agodoc: Document the right error belonging to browser request on agent api
Tomasz Bursztyka [Tue, 14 Feb 2012 10:05:46 +0000 (12:05 +0200)]
doc: Document the right error belonging to browser request on agent api

12 years agowispr: Provide a callback for agent browser request to handle the result
Tomasz Bursztyka [Tue, 14 Feb 2012 10:05:45 +0000 (12:05 +0200)]
wispr: Provide a callback for agent browser request to handle the result

12 years agoagent: Handle browser request reply
Tomasz Bursztyka [Tue, 14 Feb 2012 10:05:44 +0000 (12:05 +0200)]
agent: Handle browser request reply

12 years agowispr: Request a browser action through agent api
Tomasz Bursztyka [Tue, 14 Feb 2012 10:05:43 +0000 (12:05 +0200)]
wispr: Request a browser action through agent api

12 years agoagent: Add support for requesting browser action
Tomasz Bursztyka [Tue, 14 Feb 2012 10:05:42 +0000 (12:05 +0200)]
agent: Add support for requesting browser action

12 years agoservice: Set service state idle when creating from provider
Daniel Wagner [Tue, 14 Feb 2012 12:40:32 +0000 (13:40 +0100)]
service: Set service state idle when creating from provider

When a new service is created from a provider, the service state
should be initialized. We do this also when creating from a
network object.

12 years agoagent: Fix capital letter for mandatory requirement
Santiago Carot-Nemesio [Mon, 13 Feb 2012 17:43:05 +0000 (18:43 +0100)]
agent: Fix capital letter for mandatory requirement

Sometimes, the mandatory attribute is used with capital letter and
other times it isn't. This patch fixes this issue by setting it to
lower case to be consistant with agent-doc in wich it is written
using lower cases.

12 years agodhcp: Request sending a RFC 1533- and 2132-compliant client-id
Grant Erickson [Mon, 13 Feb 2012 17:56:09 +0000 (09:56 -0800)]
dhcp: Request sending a RFC 1533- and 2132-compliant client-id

Some Internet gateways and Wi-Fi access points are unhappy when the
DHCPv4 client-id option (61) is missing and will refuse to issue a
DHCP lease. Adding the client-id option placates these devices.

This patch requests that a RFC 1533- and 2132-compliant DHCP client-id
option (61) be sent with DHCPv4 packets.

12 years agogdhcp: Add RFC 1533- and 2132-compliant client-id option
Grant Erickson [Mon, 13 Feb 2012 17:56:08 +0000 (09:56 -0800)]
gdhcp: Add RFC 1533- and 2132-compliant client-id option

This patch adds a function to add a RFC 1533- and 2132-compliant DHCP
client-id option (61) to sent DHCPv4 packets.

12 years agogdhcp: Refactor alloc_dhcp_option to accept string or raw data.
Grant Erickson [Mon, 13 Feb 2012 17:56:07 +0000 (09:56 -0800)]
gdhcp: Refactor alloc_dhcp_option to accept string or raw data.

Support specifying NULL-terminated string or raw data for allocated
DHCP options.

12 years agotest-ippool: Test overlapping ranges
Daniel Wagner [Thu, 9 Feb 2012 10:02:17 +0000 (11:02 +0100)]
test-ippool: Test overlapping ranges

12 years agotest-ippool: Rename basic2 to exhaust0
Daniel Wagner [Thu, 9 Feb 2012 10:00:35 +0000 (11:00 +0100)]
test-ippool: Rename basic2 to exhaust0

12 years agotest-ippool: Reinit ippool for each test
Daniel Wagner [Thu, 9 Feb 2012 09:59:11 +0000 (10:59 +0100)]
test-ippool: Reinit ippool for each test

12 years agotest-ippool: Split basic0 test
Daniel Wagner [Thu, 9 Feb 2012 09:57:37 +0000 (10:57 +0100)]
test-ippool: Split basic0 test

Do not test two things in the same function.

12 years agoippool: Fix collision detection altorithm
Daniel Wagner [Thu, 9 Feb 2012 09:50:35 +0000 (10:50 +0100)]
ippool: Fix collision detection altorithm

Track only private address ranges in a list. If the first IP is
assigned for a range check if a pool collides. For this we need
to check all entries in the list if the new IP is the range of an
allocated pool.

This can be made faster with the right data structure and
algorithm (e.g. segment overlap detection algorithms).