Index: server/site_wifitest.py |
diff --git a/server/site_wifitest.py b/server/site_wifitest.py |
index e05f303334b749fa3395df7f5d313fd017f42114..ec84a65b844aeda66ca4c37cb6fe2f240163eb68 100644 |
--- a/server/site_wifitest.py |
+++ b/server/site_wifitest.py |
@@ -142,8 +142,8 @@ class WiFiTest(object): |
# NB: wifi address must be set if not reachable from control |
self.server_wifi_ip = server['wifi_addr'] |
- # hosting_server is a machine which hosts network services, |
- # such as VPN. |
+ # The 'hosting_server' is a machine which hosts network |
+ # services, such as OpenVPN or StrongSwan. |
self.hosting_server = site_linux_server.LinuxServer(self.server, server) |
# potential bg thread for ping untilstop |
@@ -1254,6 +1254,13 @@ class WiFiTest(object): |
cert_pathnames['ca-certificate'], |
cert_pathnames['client-certificate'], |
cert_pathnames['client-key'])) |
+ elif self.vpn_kind == 'l2tpipsec-psk': # aka 'strongswan' |
Sam Leffler
2011/03/31 17:11:27
We've tried hard to not have explicit builtin code
|
+ result = self.client.run('%s/test/connect-vpn ' |
+ '--verbose ' |
+ 'l2tpipsec-psk vpn-name %s vpn-domain ' |
+ 'password chapuser chapsecret' % |
+ (self.client_cmd_flimflam_lib, |
+ vpn_host_ip)) |
else: |
raise error.TestFail('(internal error): No launch case ' |
'for VPN kind (%s)' % self.vpn_kind) |
@@ -1263,6 +1270,14 @@ class WiFiTest(object): |
if self.vpn_kind is not None: |
Sam Leffler
2011/03/31 17:11:27
see above, it might be time to factor out vpn supp
|
if self.vpn_kind == 'openvpn': |
self.client.run("pkill openvpn") |
+ elif (self.vpn_kind == 'l2tpipsec-psk' or # aka 'strongswan' |
+ self.vpn_kind == 'l2tpipsec-cert') |
+ self.client.run("pkill /usr/libexec/ipsec/pluto") |
+ self.client.run("pkill /usr/libexec/ipsec/starter") |
+ self.client.run("pkill _pluto_adns") |
+ self.client.run("pkill /usr/sbin/pppd") |
+ self.client.run("pkill /usr/sbin/xl2tpd") |
+ self.client.run("pkill /usr/sbin/l2tpipsec_vpn") |
else: |
raise error.TestFail('(internal error): No kill case ' |
'for VPN kind (%s)' % self.vpn_kind) |