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:19:34 +0400 |
commit | 01fcf87fe35502f6745137d79f56e618368872eb (patch) | |
tree | 78a845ddba89d63651105abe94b9b1efd9552c14 /accel-pppd/ctrl/pppoe/pppoe.c | |
parent | 4e4b0ad6ab81517fb4bd24ee74331b32111de5e4 (diff) | |
download | accel-ppp-01fcf87fe35502f6745137d79f56e618368872eb.tar.gz accel-ppp-01fcf87fe35502f6745137d79f56e618368872eb.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/pppoe/pppoe.c')
-rw-r--r-- | accel-pppd/ctrl/pppoe/pppoe.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/accel-pppd/ctrl/pppoe/pppoe.c b/accel-pppd/ctrl/pppoe/pppoe.c index 9a431818..9d30c62c 100644 --- a/accel-pppd/ctrl/pppoe/pppoe.c +++ b/accel-pppd/ctrl/pppoe/pppoe.c @@ -1504,8 +1504,12 @@ static void pppoe_init(void) { struct conf_sect_t *s = conf_get_section("pppoe"); struct conf_option_t *opt; + int fd; - if (system("modprobe -q pppoe")) + fd = socket(AF_PPPOX, SOCK_DGRAM, PX_PROTO_OE); + if (fd >= 0) + close(fd); + else if (system("modprobe -q pppoe")) log_warn("failed to load pppoe kernel module\n"); conn_pool = mempool_create(sizeof(struct pppoe_conn_t)); |