diff options
author | Vladislav Grishenko <themiron@mail.ru> | 2013-12-24 11:45:48 +0600 |
---|---|---|
committer | Dmitry Kozlov <xeb@mail.ru> | 2013-12-24 10:00:28 +0400 |
commit | c4ddc0fe1f402f84b1bb01b9568e2294569d0d15 (patch) | |
tree | 78a845ddba89d63651105abe94b9b1efd9552c14 /accel-pppd/ctrl/l2tp | |
parent | 52da76e41200bb2f9f09cf54960e3fcd1d771b82 (diff) | |
download | accel-ppp-c4ddc0fe1f402f84b1bb01b9568e2294569d0d15.tar.gz accel-ppp-c4ddc0fe1f402f84b1bb01b9568e2294569d0d15.zip |
ppp: don't unconditionaly load pppoe/pptp/l2tp modules, fixes false start warning if they're running already
Signed-off-by: Vladislav Grishenko <themiron@mail.ru>
Diffstat (limited to 'accel-pppd/ctrl/l2tp')
-rw-r--r-- | accel-pppd/ctrl/l2tp/l2tp.c | 7 |
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 *)); |