summaryrefslogtreecommitdiff
path: root/accel-pppd/ctrl/pppoe/pppoe.c
diff options
context:
space:
mode:
Diffstat (limited to 'accel-pppd/ctrl/pppoe/pppoe.c')
-rw-r--r--accel-pppd/ctrl/pppoe/pppoe.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/accel-pppd/ctrl/pppoe/pppoe.c b/accel-pppd/ctrl/pppoe/pppoe.c
index 9a43181..9d30c62 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));