summaryrefslogtreecommitdiff
path: root/src/provider.c
AgeCommit message (Collapse)AuthorFilesLines
2013-03-27provider: Set nameservers if we receive them from vpndJukka Rissanen1-10/+4
If we receive nameservers from vpnd we must set them in provider. The connman_provider_set_nameservers() function needs changes because we get the nameservers as an array, it makes no sense to convert the array to string and then back to array.
2013-03-08provider: New provider removal function callable from vpn pluginJukka Rissanen1-0/+13
2013-03-08provider: Change the name of provider remove functionJukka Rissanen1-1/+1
Following patch will introduce provider remove function that can be used from vpn plugin so rename the current removal function to reflect better its usage.
2013-03-08provider: Function to set the immutable flagJukka Rissanen1-0/+13
2012-11-23provider: Set the state properly when removing providerJukka Rissanen1-0/+3
We need to set the provider into idle state when removing, otherwise the default route will not be set properly after provider removal. Fixes BMC#25658
2012-11-23provider: Do not remove the provider as it would remove it from storageJukka Rissanen1-15/+1
2012-11-23provider: Add callback when creating vpn providerJukka Rissanen1-5/+37
Because the vpnd Create() in manager API only creates and does not connect the vpn, we must do the connect part after the vpn is created. This requires a callback which is called when the connection is established. Eventually this patch becomes obsolete because the CreateProvider() connman API is deprecated.
2012-11-23provider: Refactor server and user route handlingJukka Rissanen1-36/+6
The server and user route handling is refactored in order to reflect the vpn dbus API changes. The routes are now array of dicts in dbus API.
2012-11-23provider: Initially provider ipconfigs are now OFFJukka Rissanen1-2/+3
The ipconfig is marked as fixed when IP address is set to that ipconfig.
2012-11-23provider: Support functions addedJukka Rissanen1-0/+65
2012-11-23provider: Remove functionality that is no longer usedJukka Rissanen1-890/+68
The VPN support functionality is moved into connman-vpnd.
2012-11-23provider: Provider disconnect function made available to pluginJukka Rissanen1-2/+2
The VPN needs to be able to call the provider disconnect.
2012-08-23provider: Return VPN gateway IP addressJukka Rissanen1-1/+7
If 'provider->host_ip[0]' is set, it contains the resolved IP address. If not set, the 'Host' property already contains an IP address.
2012-08-15provider: Return EINPROGRESS to the caller when connect is pendingJukka Rissanen1-1/+28
2012-08-14service: Allow plugins access to connman_service_create_ip4/6configDaniel Wagner1-2/+2
2012-08-09provider: Discard routes to VPN server via VPN tunnelJukka Rissanen1-2/+84
These obsolete routes must be discarded as we cannot contact VPN server via VPN tunnel. If the VPN server address is not yet resolved, we do that while starting the VPN client process. Example of non working routes: Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 0.0.0.0 0.0.0.0 0.0.0.0 UG 0 0 0 vpn0 10.10.15.0 0.0.0.0 255.255.255.0 U 0 0 0 wlan0 10.10.15.1 0.0.0.0 255.255.255.255 UH 0 0 0 wlan0 10.252.112.0 0.0.0.0 255.255.240.0 U 0 0 0 vpn0 193.229.0.40 10.10.15.1 255.255.255.255 UGH 0 0 0 wlan0 193.229.0.42 10.10.15.1 255.255.255.255 UGH 0 0 0 wlan0 113.108.211.91 0.0.0.0 255.255.255.255 UH 0 0 0 vpn0 113.108.211.91 10.10.15.1 255.255.255.255 UGH 0 0 0 wlan0 The correct routes should be like this: Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 0.0.0.0 0.0.0.0 0.0.0.0 U 0 0 0 vpn0 10.10.15.0 0.0.0.0 255.255.255.0 U 0 0 0 wlan0 10.10.15.1 0.0.0.0 255.255.255.255 UH 0 0 0 wlan0 10.252.112.0 0.0.0.0 255.255.240.0 U 0 0 0 vpn0 193.229.0.40 10.10.15.1 255.255.255.255 UGH 0 0 0 wlan0 193.229.0.42 10.10.15.1 255.255.255.255 UGH 0 0 0 wlan0 113.108.211.91 10.10.15.1 255.255.255.255 UGH 0 0 0 wlan0
2012-08-09provider: Allow VPN connection if not in connected stateJukka Rissanen1-2/+15
Allow user to connect to VPN via dbus and supplying all VPN parameters if the provider already exists but the VPN is not in connected state. This means that the user can call the Manager.ConnectProvider interface multiple times to connect to VPN service. This patch is needed so that OpenConnect can work correctly. Without this patch the OpenConnect cookie cannot be passed to openconnect client program.
2012-05-08provider: Fix network/netmask parsing and potential crashPatrik Flykt1-4/+17
2012-04-29core: Update copyright informationMarcel Holtmann1-1/+1
2012-04-12provider: Disconnect VPN when phy service is disconnectedJukka Rissanen1-0/+62
If the VPN is connected and the underlaying service is disconnected, then we must also disconnect the VPN if it is still connected.
2012-04-05provider: Check if there are any routes for the providerJukka Rissanen1-0/+17
2012-04-05provider: Allow user to set routes when creating providerJukka Rissanen1-2/+51
2012-04-05provider: Save and load user specified routesJukka Rissanen1-4/+74
2012-04-05provider: Add support for user defined routesJukka Rissanen1-0/+34
Allow user to add routes when setting up VPN. This is useful if the VPN cannot be configured to setup additional routes itself.
2012-03-27provider: Free provider when destructing itJukka Rissanen1-0/+1
Valgrind reports memory leak here.
2012-01-27provider: Don't remove a provider on errorPatrik Flykt1-7/+1
When a provider indicates error, set the corresponding service error but don't remove the provider.
2012-01-27provider: Load providers at provider driver registration timePatrik Flykt1-0/+78
Load all saved providers that have the same type as the provider driver being registered. While looking through the storage dir for directory entries starting with 'provider_', the respective settings file needs to be opened in order to check the type. Since the settings file is already opened, load all other settings as well with the help of the previously factored out functions.
2012-01-27provider: Handle connman_provider_load() in provider_create()Patrik Flykt1-2/+2
Load provider data in provider_create() if provider_register() returns success.
2012-01-27provider: Factor out service creationPatrik Flykt1-11/+25
Factor out the creation of a service when given a provider.
2012-01-27provider: Factor out keyfile loadingPatrik Flykt1-9/+17
Factor out keyfile loading from connman_provider_load() into a fuction of its own.
2012-01-27provider: Don't set provider->name when creating provider structPatrik Flykt1-3/+0
Don't unnecessarily set provider->name to the value of the provider identifier in connman_provider_get() since it's going to be reset immediately to the supplied provider name.
2012-01-24provider: Add caller information to ref/unref debug prints.Jukka Rissanen1-4/+9
2012-01-20provider: Remove provider from the hash properlyJukka Rissanen1-1/+1
We must not just do connman_provider_unref(provider) as that will leave the provider to the provider_hash and we will get free memory access error. We can just remove the provider from the hash and that will unref the provider automagically.
2012-01-20provider: VPN service can be nullJukka Rissanen1-2/+4
2012-01-20service: Refactor the service unref functionJukka Rissanen1-4/+3
2012-01-13ipconfig: Rename previously public functionsDaniel Wagner1-2/+2
Prefix them with a "__".
2012-01-10provider: Undo empty D-Bus message checkDaniel Wagner1-3/+0
This check is wrong.
2012-01-09provider: Handle empty D-Bus messageDaniel Wagner1-0/+3
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-10core: Use gcc atomics instead glib's onesDaniel Wagner1-3/+3
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-07provider: Helper function for fetching the keyfile groupPatrik Flykt1-0/+5
2011-11-07provider: Define a save function for provider driversPatrik Flykt1-0/+3
Define a save function for connman provider driver specific settings. No corresponding load function is defined since all saved settings are already loaded by connman_provider_load().
2011-11-07provider: Load and save provider dataPatrik Flykt1-0/+66
On connect, save 'Type', 'Name', 'Host' and 'VPN.Domain' provider settings. On probe, load saved keys and their values from storage and add the key/value pairs to the provider struct.
2011-09-29provider: Remove provider if there is an error when connectingJukka Rissanen1-1/+7
If vpn service cannot be started for some reason, we must remove the provider so that user can reconnect to it later.
2011-09-29provider: Fix memory leakJukka Rissanen1-0/+1
Provider name is already allocated in connman_provider_get() so we must deallocate it before setting it again.
2011-09-12provider: Return existing service path if already connectedJukka Rissanen1-4/+5
2011-09-12provider: Add ref counting debugJukka Rissanen1-2/+2
2011-09-12provider: NULL pointer checkJukka Rissanen1-0/+3
2011-07-12provider: Fix ident memory leak if provider cannot be createdPatrik Flykt1-0/+1
2011-07-12provider: Untangle create and connect code blockMarcel Holtmann1-26/+20