提交 8d5390ef 编写于 作者: K Kozlov Dmitry

load necessary kernel modules at startup

上级 9c68a6ee
......@@ -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 *));
......
......@@ -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));
......
......@@ -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));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册