diff options
author | Kozlov Dmitry <xeb@mail.ru> | 2012-01-23 07:44:18 +0400 |
---|---|---|
committer | Kozlov Dmitry <xeb@mail.ru> | 2012-01-23 07:44:18 +0400 |
commit | 8d5390ef0e836de11da82c6ca43110af524a724e (patch) | |
tree | 94eaf2b4ee56a78397d08c2fdcd1ab580db90765 /accel-pppd | |
parent | 9c68a6eec4d6b4b973a48a9ba83114f008a60556 (diff) | |
download | accel-ppp-xebd-8d5390ef0e836de11da82c6ca43110af524a724e.tar.gz accel-ppp-xebd-8d5390ef0e836de11da82c6ca43110af524a724e.zip |
load necessary kernel modules at startup
Diffstat (limited to 'accel-pppd')
-rw-r--r-- | accel-pppd/ctrl/l2tp/l2tp.c | 2 | ||||
-rw-r--r-- | accel-pppd/ctrl/pppoe/pppoe.c | 2 | ||||
-rw-r--r-- | accel-pppd/ctrl/pptp/pptp.c | 4 |
3 files changed, 7 insertions, 1 deletions
diff --git a/accel-pppd/ctrl/l2tp/l2tp.c b/accel-pppd/ctrl/l2tp/l2tp.c index 9cde03e..a9ecd58 100644 --- a/accel-pppd/ctrl/l2tp/l2tp.c +++ b/accel-pppd/ctrl/l2tp/l2tp.c @@ -1150,6 +1150,8 @@ static void load_config(void) static void l2tp_init(void) { + system("modprobe pppol2tp &> /dev/null || modprobe l2tp_ppp &> /dev/null"); + l2tp_conn = malloc(L2TP_MAX_TID * sizeof(void *)); memset(l2tp_conn, 0, L2TP_MAX_TID * sizeof(void *)); diff --git a/accel-pppd/ctrl/pppoe/pppoe.c b/accel-pppd/ctrl/pppoe/pppoe.c index a5a8eb6..ad363c8 100644 --- a/accel-pppd/ctrl/pppoe/pppoe.c +++ b/accel-pppd/ctrl/pppoe/pppoe.c @@ -1405,6 +1405,8 @@ static void pppoe_init(void) struct conf_sect_t *s = conf_get_section("pppoe"); struct conf_option_t *opt; + system("modprobe pppoe"); + conn_pool = mempool_create(sizeof(struct pppoe_conn_t)); pado_pool = mempool_create(sizeof(struct delayed_pado_t)); padi_pool = mempool_create(sizeof(struct padi_t)); diff --git a/accel-pppd/ctrl/pptp/pptp.c b/accel-pppd/ctrl/pptp/pptp.c index b785b1f..e0875d6 100644 --- a/accel-pppd/ctrl/pptp/pptp.c +++ b/accel-pppd/ctrl/pptp/pptp.c @@ -745,7 +745,9 @@ static void pptp_init(void) { struct sockaddr_in addr; char *opt; - + + system("modprobe pptp"); + serv.hnd.fd = socket(PF_INET, SOCK_STREAM, 0); if (serv.hnd.fd < 0) { log_emerg("pptp: failed to create server socket: %s\n", strerror(errno)); |