summaryrefslogtreecommitdiff
path: root/src/network.c
AgeCommit message (Collapse)AuthorFilesLines
2012-04-17network: Remove unused functionDaniel Wagner1-8/+0
2012-04-17network: Avoid connection to a network with invalid keyJulien Massot1-2/+8
2012-01-24network: Add caller information to ref/unref debug prints.Jukka Rissanen1-6/+9
2012-01-24network: Avoid double network disconnect.Jukka Rissanen1-1/+2
2012-01-24network: Refactor set_connected() function.Jukka Rissanen1-116/+139
The set_connected() is split to two parts, the disconnect part is in set_disconnected() function.
2012-01-20network: Do not start IPv6 autoconfiguration if already pendingJukka Rissanen1-0/+10
2012-01-20network: Add more debug printsJukka Rissanen1-1/+3
2012-01-20network: Verify we are connected before starting DHCPv6Jukka Rissanen1-0/+9
2012-01-20dhcpv6: Do not wait answer to RELEASE messageJukka Rissanen1-3/+2
We do not want to wait the answer to release message that was sent to the DHCPv6 server because the reply from server might take some time and we must continue the network disconnect procedure. So we just inform the server that we are done with the addresses but ignore server reply as there is nothing to be done anyway after sending the release.
2012-01-13ipconfig: Rename previously public functionsDaniel Wagner1-3/+3
Prefix them with a "__".
2012-01-05dhcpv6: Allow address setting in IPv6 auto mode.Jukka Rissanen1-1/+3
The DHCPv6 is used when doing autoconfiguration so we must allow address setting/unsetting in auto mode.
2012-01-05dhcpv6: Release message implemented.Jukka Rissanen1-1/+16
2012-01-05dhcpv6: Handle address expiration by restarting the stack.Jukka Rissanen1-3/+25
2012-01-05dhcpv6: Renew message implemented.Jukka Rissanen1-0/+2
2012-01-05dhcpv6: Initial stateful DHCPv6 support.Jukka Rissanen1-5/+60
This patch contains solicitation message support.
2012-01-05inet: Return router advertisement packet length in callback.Jukka Rissanen1-1/+2
The length of the RA packet must be returned in callback, otherwise callback cannot check RA options. The prefix length RA option is needed in stateful DHCPv6 implementation.
2012-01-05dhcpv6: Support stateless DHCPv6Jukka Rissanen1-7/+90
See relevant parts from these RFCs: RFC 3315 - DHCP for IPv6 RFC 3646 - DNS configuration options for DHCP for IPv6 RFC 3736 - Stateless DHCP service for IPv6 RFC 4075 - SNTP configuration option for DHCPv6 The patch does not support authenticated information messages.
2011-12-12network: Remove connman_network_set_roamingDaniel Wagner1-18/+1
The current code uses connman_network_set_bool(network, "Roaming", value).
2011-12-12network: Add functionality to connect a hidden networkPatrik Flykt1-0/+20
When given a struct connman_network, look up a corresponding service. Set the earlier supplied identity and passphrase for this service and try to connect it.
2011-11-28service: Support automatically added nameserversJukka Rissanen1-1/+1
IPv6 autoconfigured nameservers can be added to resolver via netlink messages in rtnl.c. Because of this they are not seen in service object so we need to get those auto added nameserver to be added in service.c so that service can show them to user if necessary. Fixes BMC#24196
2011-11-16network: connman_network_set_nameservers() handle NULL argument correctlyDaniel Wagner1-3/+5
Trying to access an array pointer which points to NULL is generally a bad idea. Instead just return early.
2011-11-15network: Call indicate error function in error caseDaniel Wagner1-6/+4
Setting the error only on one ipconfig type e.g. IPv4 is not enough. service.c:combine_state() will report to stay in associating state: src/service.c:service_indicate_state() service 0x6b1a60 old association - new failure/association => association After applying the patch it loosk like this: src/service.c:service_indicate_state() service 0x6b1f70 old association - new failure/association => association src/service.c:service_indicate_state() service 0x6b1f70 old association - new failure/failure => failure
2011-11-10network: Fix failed to reconnect to 3G network when connect failedYu A Wang1-7/+1
When connect failed, set the associating value to false again, else when we connect again the return err will be EALREADY.
2011-11-10core: Use gcc atomics instead glib's onesDaniel Wagner1-5/+5
g_atomic_int_exchange_and_add() has been removed from glib 2.30 and g_atomic_int_add() should be used. Though there are still quite a few distros out which do not ship a glib version with g_atomic_int_add(). Instead of maintaing a compatiblilty glib layer we just use the built-in functions for atomic memory access.
2011-11-07network: Check device pointer when doing IPv6 autoconfJukka Rissanen1-0/+3
The device can disappear if network is disconnected while setting autoconf parameters.
2011-11-07network: Disconnect network properlyJukka Rissanen1-0/+2
When network is removed (for example when ethernet cable is disconnected), then it needs to be disconnected also. The disconnect was not done at all because of the reference counting fixes in dhcp code.
2011-10-21network: Remove obsolete service lookup in disconnectJukka Rissanen1-3/+0
2011-10-06device: Remove connections counterDanny Jeongseok Seo1-9/+0
The device connection counter is only used by the post scan auto connection logic, and the connection status is handled by the autoconnection service routine itself (__connman_service_auto_connect()).
2011-09-12network: Add NULL checkJukka Rissanen1-0/+3
2011-09-12network: Change the service disconnect state when necessaryJukka Rissanen1-2/+16
If we are in idle or failure states, then we should not change to disconnect state when the service is disconnected. This is because we were not connected in the first place.
2011-08-26network: Read only the ipconfig data if we have no addressJukka Rissanen1-3/+5
We must not read ipconfig data from file if there is already a valid address that was set by service set_property(). Fixes BMC#22767
2011-08-23network: Re-read ipconfig from service when setting manual addressesPatrik Flykt1-0/+4
When a service was disconnected, its ipconfig data was cleared. Re-read service ipconfig data before setting manual addresses. Fixes BMC#17738
2011-08-10service: Create hidden networks with a proper group identifierZhang Zhengguang1-12/+1
hidden_* group identifiers do not match the probe response built ones, eventually preventing users from being able to reconnect to it.
2011-07-29service: Store agent provided credentials separatelyHenri Bragge1-0/+14
Add new fields for agent provided identity/passphrase in service struct (agent_identity/agent_passphrase) and network ("WiFi.AgentIdentity" and "WiFi.AgentPassphrase"). Preparing these values in prepare_8021x() is left out because the same thing is done in request_input_cb(), which is where the values always come from.
2011-07-28network: Remove connman_network_set_pac()Samuel Ortiz1-16/+0
This routine is not used.
2011-07-28network: Set driver pointer to NULL back if not readyDaniel Wagner1-1/+3
The network_probe() function will be called several times until it creates successfuly the service object. In the case of the oFono plugin, the connman_device_add_network() is called after the driver has been registered to the network. Therefore the network->driver has been set but no device yet. __connman_service_create_from_network() returns -EINVAL because the device is not yet set. The next call on network_probe() will bail out on 'if (network->driver != NULL) return -EALREADY;' so we have to reset it in the first round. Fixes BMC #21705
2011-07-26network: Fix double free in network_destruct()Daniel Wagner1-1/+0
2011-07-26network: Do not unref networkDaniel Wagner1-2/+0
2011-07-26network: Remove connman_network_register/unregister()Daniel Wagner1-15/+4
Since the service object doesn't take a reference the intermediate step of having a connman_network_register/unregister is not needed. This function are only there to have an additional step where probe()/remove() will be called. This is the job of connman_device_add_network()/connman_device_remove_network().
2011-07-25network: Stop DHCPDaniel Wagner1-0/+12
If DHCP has been started for the IPv4 IP configuration we should also stop it later. The only place where it has been done so far was in __connman_network_clear_ipconfig() which is called from service.c:set_ipconfig(). But this will only be called if the user changes service settings.
2011-07-09network: Set network driver before creating the serviceSamuel Ortiz1-2/+1
The autoconnect machine can potentially start from __connman_service_create_from_network() so it needs a network driver.
2011-07-08network: Fix temp pointer memory leakSamuel Ortiz1-5/+5
2011-07-08network: Let the gateway code handle the READY transitionSamuel Ortiz1-23/+1
For IPv4 (DHCP, fixed or manual), and for manual IPv6, the gateway handling code (connection.c) is the one responsible for moving to the READY state.
2011-07-08network: Autoconf IPv6 is ready when address is setSamuel Ortiz1-8/+0
It's not ready when the technology is connected. The ASSOC->READY transition will happen through the IP bound ops.
2011-07-07service: Use __connman_service_ipconfig_indicate_state()Daniel Wagner1-20/+32
2011-06-27network: Clear IPv6 autoconfigured routes when disconnected.Jukka Rissanen1-0/+11
2011-06-27network: Clear interface addresses after removing gateway address.Jukka Rissanen1-0/+3
The reason for this patch is that service disconnect code path is different from service change code path. In disconnect, the __connman_ipconfig_address_remove() is called which clears the addresses from interface. When changing from one service to another, the function __connman_service_disconnect() is not called and thus the interface address is not removed. We cannot call __connman_ipconfig_address_remove() yet at this point because it would clear addresses from internal data structures so we use __connman_ipconfig_address_unset() instead.
2011-06-27network: Set manual IPv6 state and gateway.Jukka Rissanen1-4/+19
2011-06-27connection: Separate IPv4 and IPv6 gateway and routing handling.Jukka Rissanen1-1/+2
2011-06-27network: Add IPv6 associating state.Jukka Rissanen1-0/+3