aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
| * unit-tests: Don't unload plugins before calling libcharon_deinit()Tobias Brunner2016-06-171-3/+0
|/ | | | | | | libcharon_deinit() already calls all the functions we called manually. Unloading the plugins will not work if charon->initialize() is called as charon's static plugin features would already be unloaded before the destroyed members are accessed in destroy() to flush them.
* kernel-netlink: Don't set replay window for outbound SAsTobias Brunner2016-06-171-0/+6
| | | | | It's not necessary and might waste memory. However, if ESN is used we set the window to 1 as the kernel rejects the attribute otherwise.
* kernel-pfkey: Only set the replay window for inbound SAsTobias Brunner2016-06-171-3/+8
| | | | | It is not necessary for outbound SAs and might waste memory when large window sizes are used.
* testing: Fix race in tnc/tnccs-20-pdp-pt-tls scenarioTobias Brunner2016-06-172-3/+1
| | | | | | | | | | aacf84d837e7 ("testing: Add expect-connection calls for all tests and hosts") removed the expect-connection call for the non-existing aaa connection. However, because the credentials were loaded asynchronously via start-script the clients might have been connecting when the secrets were not yet loaded. As `swanctl --load-creds` is a synchronous call this change avoids that issue without having to add a sleep or failing expect-connection call.
* daemon: Don't hold settings lock while executing start/stop scriptsTobias Brunner2016-06-171-20/+43
| | | | | | | If a called script interacts with the daemon or one of its plugins another thread might have to acquire the write lock (e.g. to configure a fallback or set a value). Holding the read lock prevents that, potentially resulting in a deadlock.
* testing: Use TLS 1.2 in RADIUS test casesTobias Brunner2016-06-172-0/+6
| | | | | | | | | This took a while as in the OpenSSL package shipped with Debian and on which our FIPS-enabled package is based, the function SSL_export_keying_material(), which is used by FreeRADIUS to derive the MSK, did not use the correct digest to calculate the result when TLS 1.2 was used. This caused IKE to fail with "verification of AUTH payload with EAP MSK failed". The fix was only backported to jessie recently.
* testing: Update FreeRADIUS to 2.2.8Tobias Brunner2016-06-172-3/+3
| | | | | | | | | While this is not the latest 2.x release it is the latest in /old. Upgrading to 3.0 might be possible, not sure if the TNC-FHH patches could be easily updated, though. Upgrading to 3.1 will definitely not be possible directly as that version removes the EAP-TNC module. So we'd first have to get rid of the TNC-FHH stuff.
* Revert "configure: Cache result of pthread_condattr_setclock() check"Tobias Brunner2016-06-171-22/+18
| | | | | | | This reverts commit 8d79bfa8318ddd1b9b863241fe0e637be73af5f4 as it does not provide any advantage over setting ac_cv_func_pthread_condattr_setclock=no. References #1502.
* configure: Cache result of pthread_condattr_setclock() checkTobias Brunner2016-06-171-18/+22
| | | | | | | | | | | | | | Even if not using caching when running the configure script (-C) this allows pre-defining the result by setting the environment variable ss_cv_func_pthread_condattr_setclock_monotonic=yes|no|unknown before/while running the script. As the check requires running a test program this might be helpful when cross-compiling to disable using monotonic time if pthread_condattr_setclock() is defined but not actually usable with CLOCK_MONOTONIC. References #1502.
* configure: Fix typo in pthread_condattr_setclock() checkTobias Brunner2016-06-171-2/+2
|
* quick-mode: Fix reporting lifebytes if lifetime is configuredTobias Brunner2016-06-171-2/+2
|
* load-tester: Fix load-tester on platforms where plain `char` is signedTobias Brunner2016-06-171-1/+1
| | | | | | | | fgetc() returns an int and EOF is usually -1 so when this gets casted to a char the result depends on whether `char` means `signed char` or `unsigned char` (the C standard does not specify it). If it is unsigned then its value is 0xff so the comparison with EOF will fail as that is an implicit signed int.
* testing: Fix firewall rule on alice in tnc/tnccs-20-pdp-pt-tls scenarioTobias Brunner2016-06-171-2/+2
|
* Merge branch 'testing-jessie'Tobias Brunner2016-06-16504-716/+1329
|\ | | | | | | | | | | | | | | | | Updates the default Debian image used for the test environment from wheezy to jessie. Also adds a script that allows chrooting to an image (base, root or one of the guests). In pretty much all test scenarios expect-connection is used to make test runs more reliable. Fixes #1382.
| * testing: Build hostapd from sourcesTobias Brunner2016-06-163-1/+78
| | | | | | | | | | | | | | | | There is a bug (fix at [1]) in hostapd 2.1-2.3 that let it crash when used with the wired driver. The package in jessie (and sid) is affected, so we build it from sources (same, older, version as wpa_supplicant). [1] http://w1.fi/cgit/hostap/commit/?id=e9b783d58c23a7bb50b2f25bce7157f1f3
| * testing: Update download URL for wpa_supplicantTobias Brunner2016-06-161-1/+1
| |
| * testing: Wait for packets to be processed by tcpdumpTobias Brunner2016-06-161-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sometimes tcpdump fails to process all packets during the short running time of a scenario: 0 packets captured 18 packets received by filter 0 packets dropped by kernel So 18 packets were captured by libpcap but tcpdump did not yet process and print them. This tries to use --immediate-mode if supported by tcpdump (the one currently in jessie or wheezy does not, but the one in jessie-backports does), which disables the buffering in libpcap. However, even with immediate mode there are cases where it takes a while longer for all packets to get processed. And without it we also need a workaround (even though the version in wheezy actually works fine). That's why there now is a loop checking for differences in captured vs. received packets. There are actually cases where these numbers are not equal but we still captured all packets we're interested in, so we abort after 1s of retrying. But sometimes it could still happen that packets we expected got lost somewhere ("packets dropped by kernel" is not always 0 either).
| * testing: Fix expect-connection for tkm testsTobias Brunner2016-06-161-1/+1
| | | | | | | | We don't use swanctl there but there is no load statement either.
| * testing: Add expect-connection calls for all tests and hostsTobias Brunner2016-06-16184-11/+236
| | | | | | | | There are some exceptions (e.g. those that use auto=start or p2pnat).
| * testing: Update test scenarios for Debian jessieTobias Brunner2016-06-16289-576/+576
| | | | | | | | | | | | | | The main difference is that ping now reports icmp_seq instead of icmp_req, so we match for icmp_.eq, which works with both releases. tcpdump now also reports port 4500 as ipsec-nat-t.
| * libimcv: Add Debian 8.5 to databaseTobias Brunner2016-06-161-3/+20
| |
| * testing: Fix posttest.dat for ikev2/rw-dnssec scenarioTobias Brunner2016-06-161-6/+6
| |
| * testing: Make sure tcpdump is actually terminated before ↵Tobias Brunner2016-06-161-11/+6
| | | | | | | | analyzing/collecting logs
| * testing: Correctly dis-/enable services with systemdTobias Brunner2016-06-162-4/+16
| |
| * testing: Install packages like the FIPS-enabled OpenSSL from a custom apt repoTobias Brunner2016-06-163-14/+28
| |
| * testing: Update base image to Debian jessieTobias Brunner2016-06-153-10/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | Several packages got renamed/updated, libgcrypt was apparently installed by default previously. Since most libraries changed we have to completely rebuild all the tools installed in the root image. We currently don't provide a clean target in the recipes, and even if we did we'd have to track which base image we last built for. It's easier to just use a different build directory for each base image, at the cost of some additional disk space (if not manually cleaned). However, that's also the case when updating kernel or software versions.
| * testing: Update 4.x kernel configs to be compatible with Debian 8/systemdTobias Brunner2016-06-156-13/+130
| |
| * testing: Add root to fstabTobias Brunner2016-06-151-0/+1
| | | | | | | | This seems to be required for systemd to remount it.
| * testing: Update Apache config for newer Debian releasesTobias Brunner2016-06-159-62/+103
| | | | | | | | | | | | It is still compatible with the current release as the config in sites-available will be ignored, while conf-enabled does not exist and is not included in the main config.
| * testing: Explicitly enable RC4 in SSH server configTobias Brunner2016-06-151-0/+1
| | | | | | | | | | | | Newer OpenSSH versions disable this by default because it's unsafe. Since this is not relevant for our use case we enable it due to its speed.
| * testing: Add script to chroot into an imageTobias Brunner2016-06-151-0/+67
| | | | | | | | | | If changes are made to the base or root image the images depending on these have to be rebuilt.
| * testing: Add a patch to tnc-fhh that avoids building the tncsim packageTobias Brunner2016-06-152-1/+20
| | | | | | | | This sub-package does not build on Debian jessie.
| * testing: Don't attempt to stop services when building base imageTobias Brunner2016-06-151-2/+0
|/ | | | | | Unlike `apt-get install` in a chroot debootstrap does not seem to start the services but stopping them might cause problems if they were running outside the chroot.
* leak-detective: Make sure to actually call malloc() from calloc() hookTobias Brunner2016-06-151-3/+4
| | | | | | | | Newer versions of GCC are too "smart" and replace a call to malloc(X) followed by a call to memset(0,X) with a call co calloc(), which obviously results in an infinite loop when it does that in our own calloc() implementation. Using `volatile` for the variable storing the total size prevents the optimization and we actually call malloc().
* leak-detective: Whitelist __fprintf_chk as seen on newer systemsTobias Brunner2016-06-151-0/+1
|
* configure: Check for and explicitly link against -latomicMartin Willi2016-06-1413-12/+20
| | | | | Some C libraries, such as uClibc, require an explicit link for some atomic functions. Check for any libatomic, and explcily link it.
* testing: Fix scenarios that check /etc/resolv.confTobias Brunner2016-06-133-6/+6
|
* android: Catch exception if numbers are too large for IntegerTobias Brunner2016-06-131-1/+8
|
* android: Use non-aliased cipher identifiersTobias Brunner2016-06-131-12/+12
| | | | | | Some of these are also understood by BoringSSL. Fixes #1510.
* android: Update Gradle pluginTobias Brunner2016-06-131-1/+1
|
* android: Fix signature of get_nexthop()Tobias Brunner2016-06-131-1/+2
|
* resolve: Add refcounting for installed DNS serversTobias Brunner2016-06-101-27/+99
| | | | | | This fixes DNS server installation if make-before-break reauthentication is used as there the new SA and DNS server is installed before it then is removed again when the old IKE_SA is torn down.
* resolve: Use process abstraction when calling resolvconfTobias Brunner2016-06-101-18/+60
| | | | This allows us to capture output written to stderr/stdout.
* resolve: Make sure to clean up if calling resolvconf failedTobias Brunner2016-06-101-3/+4
| | | | | | If running resolvconf fails handle() fails release() is not called, which might leave an interface file on the system (or depending on which script called by resolvconf actually failed even the installed DNS server).
* Merge branch 'interface-for-routes'Tobias Brunner2016-06-1010-166/+256
|\ | | | | | | | | | | | | | | | | | | | | | | | | Changes how the interface for routes installed with policies is determined. In most cases we now use the interface over which we reach the other peer, not the interface on which the local address (or the source IP) is installed. However, that might be the same interface depending on the configuration (i.e. in practice there will often not be a change). Routes are not installed anymore for drop policies and for policies with protocol/port selectors. Fixes #809, #824, #1347.
| * kernel-pfroute: Return interface to reach destination from get_nexthop()Tobias Brunner2016-06-101-4/+13
| |
| * kernel-pfkey: Install routes with OUT policiesTobias Brunner2016-06-101-31/+30
| |
| * kernel-netlink: Install routes with OUT policiesTobias Brunner2016-06-101-25/+24
| | | | | | | | | | This is the direction we actually need routes in and makes the code easier to read.
| * kernel-pfkey: Don't install routes for drop policies and if protocol/ports ↵Tobias Brunner2016-06-101-3/+10
| | | | | | | | are in the selector
| * kernel-netlink: Don't install routes for drop policies and if protocol/ports ↵Tobias Brunner2016-06-101-96/+106
| | | | | | | | | | | | | | | | | | are in the selector We don't need them for drop policies and they might even mess with other routes we install. Routes for policies with protocol/ports in the selector will always be too broad and might conflict with other routes we install.