Age | Commit message (Collapse) | Author | Files | Lines |
|
Change-Id: I13526fbf80296a79be15548fc226a308941ac9ec
Signed-off-by: Taesub Kim <taesub.kim@samsung.com>
|
|
Change-Id: I174854914d9fd06a813270b57d1f7bc2bac63c6a
Signed-off-by: Seonah Moon <seonah1.moon@samsung.com>
|
|
Change-Id: If16e739fde7e9d736c66015ab1efa982e49d3482
Signed-off-by: Seonah Moon <seonah1.moon@samsung.com>
|
|
Signed-off-by: hyunuktak <hyunuk.tak@samsung.com>
Change-Id: I84a42375b5c59739e4caca1f726699ea7647ef17
|
|
Change-Id: Id3847d1d8233c2177cfbd65ba42ead8ff44a06a8
|
|
|
|
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.
|
|
|
|
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.
|
|
|
|
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
|
|
|
|
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.
|
|
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.
|
|
The ipconfig is marked as fixed when IP address is set to
that ipconfig.
|
|
|
|
The VPN support functionality is moved into connman-vpnd.
|
|
The VPN needs to be able to call the provider disconnect.
|
|
If 'provider->host_ip[0]' is set, it contains the
resolved IP address. If not set, the 'Host' property
already contains an IP address.
|
|
|
|
|
|
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
|
|
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.
|
|
|
|
|
|
If the VPN is connected and the underlaying service is
disconnected, then we must also disconnect the VPN if it
is still connected.
|
|
|
|
|
|
|
|
Allow user to add routes when setting up VPN. This is useful if
the VPN cannot be configured to setup additional routes itself.
|
|
Valgrind reports memory leak here.
|
|
When a provider indicates error, set the corresponding
service error but don't remove the provider.
|
|
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.
|
|
Load provider data in provider_create() if provider_register()
returns success.
|
|
Factor out the creation of a service when given a provider.
|
|
Factor out keyfile loading from connman_provider_load() into
a fuction of its own.
|
|
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.
|
|
|
|
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.
|
|
|
|
|
|
Prefix them with a "__".
|
|
This check is wrong.
|
|
|
|
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
|
|
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.
|
|
|
|
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().
|
|
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.
|
|
If vpn service cannot be started for some reason, we must
remove the provider so that user can reconnect to it later.
|