[PATCH v3 00/42] VPN re-design/factoring

Jukka Rissanen jukka.rissanen at linux.intel.com
Wed Nov 7 03:48:26 PST 2012


Hi,

This is v3 of the vpn refactoring patchset. This
patchset fixes the issues found out by Daniel and Patrik.

v3:
- Change the name of the device creation function in patch 3.
  Now it is called connman_device_create_from_index()
- Changed the commit message in patch 10 and 14
- Added syslog printing in openconnect script in patch 39
- The plugin cleanup needs to be done before provider cleanup
  because the vpn plugin needs provider information. This is
  fixed by patch 41
- The patch 42 fixes the issue with selinux that I noticed in
  Fedora. We need to compile type enforcement rules if system
  is in enforcing mode.

v2:
- For consistency the UserRoutes are in the same format as
  ServerRoutes (array of dicts). This affected patches 1 (doc)
  and patch 14 (implementation)
- Removed extra newlines in patch 6
- Added monitor-vpn python test script into patch 7
- Changed the type of user_data (to void*) in patch 27
- Changed the function name and removed obsolete error
  checks in storage.c when removing the vpn in patch 28
- If vpn client process cannot be started, then go to
  failure state so that connman knows this issue (patch 35)
- If there are no vpn configurations (user has not configured
  any VPNs), then just quit so that vpnd is not run (patch 36 and 37)
- In order to see any errors from openvpn script, print the
  errors to syslog instead of stderr (which goes to /dev/null)
  in patch 38
- If VPN information cannot be found, then go to failure state
  so that connmand will notice the issue (patch 39)

Cheers,
Jukka


Jukka Rissanen (42):
  doc: VPN daemon API descriptions
  ipconfig: Move IP address API into separate ipaddress.c file
  device: Move device creation func into device.c
  log: Give program name and version in log init
  vpn: New vpn daemon that handles vpn connections and clients
  test: Renamed old VPN scripts
  test: New VPN test script that connect to connman-vpnd
  provider: Provider disconnect function made available to plugin
  provider: Add more driver interface functions needed by vpnd plugin
  provider: Remove functionality that is no longer used
  provider: Support functions added
  plugin: Add VPN plugin that will interact with vpnd
  provider: Initially provider ipconfigs are now OFF
  provider: Refactor server and user route handling
  vpn: Resolve vpn hostname if necessary
  vpnd: Add -r option which enables route handling in vpnd
  vpn: Hash provider data using the ident instead of path
  doc: Example configuration file for vpnd
  vpn: Introduce config file for vpnd
  agent: Split agent code into generic and service specific parts
  vpn: Add preliminary agent support
  manager: Deprecating connect/remove provider API
  ipconfig: Add ipconfig unref function
  vpn: Free allocated ipconfig struct
  provider: Removed the connect part from the create() function
  vpn-provider: Send ConnectionAdded signal when needed
  provider: Add callback when creating vpn provider
  storage: Add function to remove provider files
  provider: Do not remove the provider as it would remove it from
    storage
  vpn-provider: Send ConnectionRemoved signal when needed
  vpn-provider: Remove vpn provider from storage when needed
  l2tp: Remember the connection password
  pptp: Remember the connection password
  vpnd: Make sure provider is taken to ready state
  vpn-plugin: Set state correctly if vpn client process cannot be
    started
  vpnd: Add function that quits vpnd if no VPN configurations are found
  vpnd: Quit if no VPN configurations are found
  openvpn-script: Print errors to syslog instead of stderr
  openconnect-script: Print errors to syslog instead of stderr
  vpn: Go to failure state if vpn information cannot be found
  main: Plugin and provider cleanup order fixed
  selinux: Add Type Enforcement rule compilation

 .gitignore                     |    4 +
 Makefile.am                    |  115 ++-
 Makefile.plugins               |  123 ++-
 README                         |   11 +
 configure.ac                   |   14 +-
 doc/manager-api.txt            |    6 +-
 doc/vpn-connection-api.txt     |  155 +++
 doc/vpn-manager-api.txt        |   50 +
 doc/vpn-overview.txt           |   60 ++
 include/agent.h                |   73 ++
 include/device.h               |    1 +
 include/inet.h                 |    1 -
 include/ipaddress.h            |   56 ++
 include/ipconfig.h             |   19 +-
 include/provider.h             |   24 +
 include/vpn-dbus.h             |   58 ++
 plugins/iwmxsdk.c              |    4 +-
 plugins/l2tp.c                 |  532 ----------
 plugins/openconnect.c          |  281 ------
 plugins/openvpn.c              |  327 ------
 plugins/pptp.c                 |  338 -------
 plugins/vpn.c                  | 1895 ++++++++++++++++++++++++++++-------
 plugins/vpn.h                  |   48 -
 plugins/vpnc.c                 |  343 -------
 scripts/openconnect-script.c   |   43 +-
 scripts/openvpn-script.c       |   42 +-
 src/agent-connman.c            |  627 ++++++++++++
 src/agent.c                    |  838 +++-------------
 src/connman.h                  |   16 +-
 src/dbus.c                     |   17 +
 src/detect.c                   |    2 +-
 src/device.c                   |  178 ++++
 src/dhcp.c                     |    4 +-
 src/inet.c                     |  173 ----
 src/ipaddress.c                |  200 ++++
 src/ipconfig.c                 |  167 +---
 src/log.c                      |    5 +-
 src/main.c                     |    8 +-
 src/manager.c                  |   10 +-
 src/plugin.c                   |    2 +-
 src/provider.c                 | 1054 +++-----------------
 src/service.c                  |   64 +-
 src/storage.c                  |   40 +
 src/tethering.c                |    4 +-
 test/connect-provider          |   73 ++
 test/connect-vpn               |   73 --
 test/disconnect-vpn            |   21 -
 test/monitor-vpn               |   81 ++
 test/remove-provider           |   19 +
 test/vpn-connect               |   24 +
 test/vpn-disconnect            |   24 +
 test/vpn-get                   |   48 +
 unit/test-nat.c                |    2 +-
 vpn/connman-task.te            |   16 +
 vpn/connman-vpn.conf           |    8 +
 vpn/connman-vpn.service.in     |   12 +
 vpn/main.c                     |  344 +++++++
 vpn/net.connman.vpn.service.in |    5 +
 vpn/plugins/l2tp.c             |  540 ++++++++++
 vpn/plugins/openconnect.c      |  282 ++++++
 vpn/plugins/openvpn.c          |  328 ++++++
 vpn/plugins/pptp.c             |  346 +++++++
 vpn/plugins/vpn.c              |  562 +++++++++++
 vpn/plugins/vpn.h              |   63 ++
 vpn/plugins/vpnc.c             |  345 +++++++
 vpn/vpn-dbus.conf              |   15 +
 vpn/vpn-ipconfig.c             |  467 +++++++++
 vpn/vpn-manager.c              |  191 ++++
 vpn/vpn-polkit.conf            |   11 +
 vpn/vpn-polkit.policy          |   29 +
 vpn/vpn-provider.c             | 2158 ++++++++++++++++++++++++++++++++++++++++
 vpn/vpn-provider.h             |  121 +++
 vpn/vpn-rtnl.c                 | 1185 ++++++++++++++++++++++
 vpn/vpn-rtnl.h                 |   65 ++
 vpn/vpn.h                      |  103 ++
 vpn/vpn.ver                    |    8 +
 76 files changed, 11242 insertions(+), 4359 deletions(-)
 create mode 100644 doc/vpn-connection-api.txt
 create mode 100644 doc/vpn-manager-api.txt
 create mode 100644 doc/vpn-overview.txt
 create mode 100644 include/agent.h
 create mode 100644 include/ipaddress.h
 create mode 100644 include/vpn-dbus.h
 delete mode 100644 plugins/l2tp.c
 delete mode 100644 plugins/openconnect.c
 delete mode 100644 plugins/openvpn.c
 delete mode 100644 plugins/pptp.c
 delete mode 100644 plugins/vpn.h
 delete mode 100644 plugins/vpnc.c
 create mode 100644 src/agent-connman.c
 create mode 100644 src/ipaddress.c
 create mode 100755 test/connect-provider
 delete mode 100755 test/connect-vpn
 delete mode 100755 test/disconnect-vpn
 create mode 100755 test/monitor-vpn
 create mode 100755 test/remove-provider
 create mode 100755 test/vpn-connect
 create mode 100755 test/vpn-disconnect
 create mode 100755 test/vpn-get
 create mode 100644 vpn/connman-task.te
 create mode 100644 vpn/connman-vpn.conf
 create mode 100644 vpn/connman-vpn.service.in
 create mode 100644 vpn/main.c
 create mode 100644 vpn/net.connman.vpn.service.in
 create mode 100644 vpn/plugins/l2tp.c
 create mode 100644 vpn/plugins/openconnect.c
 create mode 100644 vpn/plugins/openvpn.c
 create mode 100644 vpn/plugins/pptp.c
 create mode 100644 vpn/plugins/vpn.c
 create mode 100644 vpn/plugins/vpn.h
 create mode 100644 vpn/plugins/vpnc.c
 create mode 100644 vpn/vpn-dbus.conf
 create mode 100644 vpn/vpn-ipconfig.c
 create mode 100644 vpn/vpn-manager.c
 create mode 100644 vpn/vpn-polkit.conf
 create mode 100644 vpn/vpn-polkit.policy
 create mode 100644 vpn/vpn-provider.c
 create mode 100644 vpn/vpn-provider.h
 create mode 100644 vpn/vpn-rtnl.c
 create mode 100644 vpn/vpn-rtnl.h
 create mode 100644 vpn/vpn.h
 create mode 100644 vpn/vpn.ver

-- 
1.7.11.4




More information about the connman mailing list