diff options
author | Sergey V. Lobanov <sergey@lobanov.in> | 2024-08-22 15:47:40 +0000 |
---|---|---|
committer | Sergey V. Lobanov <sergey@lobanov.in> | 2024-08-23 23:45:58 +0000 |
commit | 3be221b510112a30922b1da2697eaaaca09ebfd5 (patch) | |
tree | 9db426752552a23796c9fc3c0ac749b4ac099681 /accel-pppd | |
parent | 2d38a77c008524e293e0dc4b1e46c9093e7a9457 (diff) | |
download | accel-ppp-3be221b510112a30922b1da2697eaaaca09ebfd5.tar.gz accel-ppp-3be221b510112a30922b1da2697eaaaca09ebfd5.zip |
ci: run tests in alpine vm
Alpine Linux uses musl libc so now accel-ppp is tested under musl
Currently, Alpine Linux doesn't provide a link to the latest stable version
so direct link to Alpine 3.20 is used
Improved musl support might be used to run on platforms like openwrt
without additional patches
Diffstat (limited to 'accel-pppd')
-rw-r--r-- | accel-pppd/CMakeLists.txt | 13 | ||||
-rw-r--r-- | accel-pppd/accel-ppp.conf | 6 | ||||
-rw-r--r-- | accel-pppd/extra/logwtmp.c | 7 |
3 files changed, 23 insertions, 3 deletions
diff --git a/accel-pppd/CMakeLists.txt b/accel-pppd/CMakeLists.txt index cd7186ba..496fbdca 100644 --- a/accel-pppd/CMakeLists.txt +++ b/accel-pppd/CMakeLists.txt @@ -71,6 +71,19 @@ IF (HAVE_GOOD_IFARP) ADD_DEFINITIONS(-DHAVE_GOOD_IFARP) ENDIF (HAVE_GOOD_IFARP) +INCLUDE (CheckCSourceCompiles) +CHECK_C_SOURCE_COMPILES(" +#include <utmp.h> +int main(void) +{ + logwtmp(\"\", \"\", \"\"); + return 0; +}" HAVE_LOGWTMP) + +IF (HAVE_LOGWTMP) + ADD_DEFINITIONS(-DHAVE_LOGWTMP) +ENDIF (HAVE_LOGWTMP) + ADD_SUBDIRECTORY(triton) ADD_SUBDIRECTORY(vlan-mon) diff --git a/accel-pppd/accel-ppp.conf b/accel-pppd/accel-ppp.conf index abfd1ac9..99d35c79 100644 --- a/accel-pppd/accel-ppp.conf +++ b/accel-pppd/accel-ppp.conf @@ -6,6 +6,9 @@ log_file connlimit +radius +#chap-secrets + pptp l2tp #sstp @@ -17,9 +20,6 @@ auth_mschap_v1 auth_chap_md5 auth_pap -radius -#chap-secrets - ippool pppd_compat diff --git a/accel-pppd/extra/logwtmp.c b/accel-pppd/extra/logwtmp.c index f95b62c4..f66e6403 100644 --- a/accel-pppd/extra/logwtmp.c +++ b/accel-pppd/extra/logwtmp.c @@ -14,6 +14,7 @@ #include "memdebug.h" +#ifdef HAVE_LOGWTMP static void ev_ses_started(struct ap_session *ses) { logwtmp(ses->ifname, ses->username ?: "", ses->ctrl->calling_station_id); @@ -29,5 +30,11 @@ static void init(void) triton_event_register_handler(EV_SES_STARTED, (triton_event_func)ev_ses_started); triton_event_register_handler(EV_SES_FINISHED, (triton_event_func)ev_ses_finished); } +#else +static void init(void) +{ + log_warn("logwtmp is not supported on your platfrom, check libc doc\n"); +} +#endif DEFINE_INIT(200, init); |