summaryrefslogtreecommitdiff
path: root/accel-pppd
diff options
context:
space:
mode:
authorDenys Fedoryshchenko <denys.f@collabora.com>2024-09-02 10:25:45 +0300
committerGitHub <noreply@github.com>2024-09-02 10:25:45 +0300
commitd43bb1044b78517150e4f3a2ddf496486979e7de (patch)
tree9db426752552a23796c9fc3c0ac749b4ac099681 /accel-pppd
parent2d38a77c008524e293e0dc4b1e46c9093e7a9457 (diff)
parent3be221b510112a30922b1da2697eaaaca09ebfd5 (diff)
downloadaccel-ppp-d43bb1044b78517150e4f3a2ddf496486979e7de.tar.gz
accel-ppp-d43bb1044b78517150e4f3a2ddf496486979e7de.zip
Merge pull request #179 from svlobanov/test-in-alpine2
ci: run tests in alpine vm
Diffstat (limited to 'accel-pppd')
-rw-r--r--accel-pppd/CMakeLists.txt13
-rw-r--r--accel-pppd/accel-ppp.conf6
-rw-r--r--accel-pppd/extra/logwtmp.c7
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);