summaryrefslogtreecommitdiff
path: root/accel-pppd/ctrl/l2tp/l2tp.c
diff options
context:
space:
mode:
Diffstat (limited to 'accel-pppd/ctrl/l2tp/l2tp.c')
-rw-r--r--accel-pppd/ctrl/l2tp/l2tp.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/accel-pppd/ctrl/l2tp/l2tp.c b/accel-pppd/ctrl/l2tp/l2tp.c
index 3b2e3f2c..6b81022b 100644
--- a/accel-pppd/ctrl/l2tp/l2tp.c
+++ b/accel-pppd/ctrl/l2tp/l2tp.c
@@ -3961,7 +3961,12 @@ static void load_config(void)
static void l2tp_init(void)
{
- if (system("modprobe -q pppol2tp || modprobe -q l2tp_ppp"))
+ int fd;
+
+ fd = socket(AF_PPPOX, SOCK_DGRAM, PX_PROTO_OL2TP);
+ if (fd >= 0)
+ close(fd);
+ else if (system("modprobe -q pppol2tp || modprobe -q l2tp_ppp"))
log_warn("unable to load l2tp kernel module\n");
l2tp_conn = _malloc(L2TP_MAX_TID * sizeof(void *));