summaryrefslogtreecommitdiff
path: root/plugins/vpn.c
AgeCommit message (Collapse)AuthorFilesLines
2014-10-29Imported Upstream version 1.26upstream/1.26Zhang zhengguang1-1/+1
2014-07-17Imported Upstream version 1.24upstream/1.24Zhang zhengguang1-190/+194
2013-04-08vpn: Host IP address was not freedJukka Rissanen1-0/+1
The host ip address field is only used if user has given vpn server as a host name instead of host ip address.
2013-04-08vpn: Free ip address before allocating a new oneJukka Rissanen1-0/+1
Possible memory leak here as we might have ip address allocated already.
2013-04-03vpn: Update domain name when received from vpndJukka Rissanen1-0/+10
2013-03-27provider: Set nameservers if we receive them from vpndJukka Rissanen1-1/+8
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-08vpn: Make sure vpn connection really exists before removing itJukka Rissanen1-1/+6
2013-03-08vpn: Check whether we have already removed the providerJukka Rissanen1-0/+8
The dbus messages from vpnd might come in different order so make sure we are not trying to access already removed provider.
2013-03-08vpn: Add debug information when vpn state changesJukka Rissanen1-0/+2
2013-03-08vpn: Remove VPN provider from service list when destroying itJukka Rissanen1-1/+1
When provider is destroyed in vpnd, we get a notification about that. We must then remove the provider which will also unref it so the provider data will get removed properly. Old code just unreffed the provider but it was left hanging in service list.
2013-03-08vpn: Clear the data pointer from provider when destroyingJukka Rissanen1-0/+2
If the data pointer is left around, then vpn plugin might accidentally use it if dbus messages are received after we have cleared the vpn connection.
2013-03-08vpn: Set immutable flag of the VPN serviceJukka Rissanen1-0/+1
2013-03-08vpn: Remember the immutable flag from vpndJukka Rissanen1-0/+3
2013-02-19vpn: Ignore VPN UserRoutes and ServerRoutes propertiesJukka Rissanen1-0/+4
These properties are not needed here so ignore them.
2012-12-14vpn: Clear pending connect flag on connect attemptPatrik Flykt1-0/+2
Fixes BMC#25894
2012-12-10vpn-plugin: Check completion of configure and connectPatrik Flykt1-16/+14
When creating a configuration, wait until both configuration and connection has been done. Otherwise NULL user data is passed to the callback which then cannot relay an error to the caller and the caller will get a timeout waiting for a reply from D-Bus.
2012-12-10vpn-plugin: Propagate most common errors to callback functionPatrik Flykt1-4/+14
Instead of always setting the create callback function error to -ECONNREFUSED, create a helper function to detect the two most often emitted errors.
2012-11-26vpn: Cleanup properly if vpn connect failsJukka Rissanen1-2/+4
Make sure that user callback data is cleared correctly if vpn connect attempt fails.
2012-11-26vpn: Cleanup vpn connections when vpnd diesJukka Rissanen1-0/+2
2012-11-26vpn: Do not remove vpn connections hash when vpnd diesJukka Rissanen1-14/+9
We must keep the vpn connections hash alive as long as connman is running. We must not remove the hash when vpnd dies, otherwise we might feed null pointer to various glib hash functions.
2012-11-23vpn: Remove unused variableDaniel Wagner1-2/+0
2012-11-23provider: Add callback when creating vpn providerJukka Rissanen1-42/+126
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-23vpn: Hash provider data using the ident instead of pathJukka Rissanen1-39/+79
Needed as sometimes we do not know the path but know the ident.
2012-11-23vpn: Resolve vpn hostname if necessaryJukka Rissanen1-1/+105
2012-11-23provider: Refactor server and user route handlingJukka Rissanen1-25/+442
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-23plugin: Add VPN plugin that will interact with vpndJukka Rissanen1-0/+1164
2012-11-23vpn: New vpn daemon that handles vpn connections and clientsJukka Rissanen1-534/+0
2012-05-09vpn: Fix null pointer dereferenceHenrique Dante de Almeida1-3/+5
2012-05-09vpn: Fix null pointer dereferenceHenrique Dante de Almeida1-2/+5
2012-04-29plugins: Update copyright informationMarcel Holtmann1-1/+1
2012-04-17vpn: use g_hash_table_replace instead of insert functionTomasz Bursztyka1-1/+1
2012-03-27vpn: Unref provider properlyJukka Rissanen1-2/+6
The provider can be unreffed in vpn_died() or in vpn_disconnect(). We must do the unref only once.
2012-03-19vpn: Remove wrong include of <glib/ghash.h>Marcel Holtmann1-1/+0
2012-02-04vpn: Reference of provider not takenJukka Rissanen1-4/+11
VPN plugin hooks itself into rtnl newlink watch and gives provider pointer as user data. We must take reference of the user data pointer as otherwise we might access invalid pointer if provider is already removed when rtnl watch is triggered. This seems to be a rare issue but I had one valgrind crash because of this.
2012-01-27vpn: Add check for properly initialized driver_hashPatrik Flykt1-1/+6
2011-11-15task: Allow vpn plugins to send replyMohamed Abbas1-3/+5
Change task notify to allow client to send dbus reply. This will allow vpn plugin to send requested user/password info.
2011-11-15vpn: Add null checksJukka Rissanen1-2/+16
2011-11-15vpn: Add support to allow ppp tunnellingMohamed Abbas1-32/+90
pptp and l2tp does not use tun/tab approach so change the vpn.c to allow vpn daemon to create the interface. Now vpn plugin tell vpn to create the device or leave to vpn client. On connection vpn will get the interface name set the index for the provider. This patch is prepared by Jukka Rissanen and it contains Mohamed Abbas original patch + fixes suggested by Daniel Wagner. Jukka fixed memory leak in vpn_set_ifname().
2011-11-07vpn: Extend vpn driver struct with save supportPatrik Flykt1-0/+15
Add provider save function and register it in the vpn driver initialization.
2011-10-26plugins: Fix compilation in MeeGoJukka Rissanen1-0/+1
The _GNU_SOURCE needs to be defined so that O_CLOEXEC symbol can be found in system header files. The source does not compile without the patch in MeeGo 1.2
2011-10-25plugins: Add O_CLOEXEC to open()Daniel Wagner1-2/+2
Make sure all file descriptor are closed.
2011-09-12vpn: Set authentication failure error code properly in providerJukka Rissanen1-0/+5
This patch is needed so that we can catch the authentication error from vpn driver and inform the failure to user.
2011-03-17vpn: Fix fd leakDaniel Wagner1-1/+3
Reported by: DJ Cozatt <ygdrasil@comcast.net>
2011-03-17vpn: Fix possible null pointer dereferenceDaniel Wagner1-2/+4
Reported by: DJ Cozatt <ygdrasil@comcast.net>
2011-01-28vpn: Allow plugins to report error codeMohamed Abbas1-4/+15
2011-01-28task: Pass exit code to the exit callbackMohamed Abbas1-1/+1
2010-10-27Add the openconnect plugin to the distcheck ruleSamuel Ortiz1-1/+1
2010-10-22Split openconnect into generic vpn and openconnect partDaniel Wagner1-0/+404