diff options
author | Dmitry Kozlov <xeb@mail.ru> | 2018-08-24 10:45:21 +0300 |
---|---|---|
committer | Dmitry Kozlov <xeb@mail.ru> | 2018-08-24 10:45:21 +0300 |
commit | 938bad250baa7bd6f0761e70ce68a2de063c528c (patch) | |
tree | fbfbe772c52f51d2794cfd9581f7751827720a82 | |
parent | 15a3f6941ca8d1bfaf2e0f09cc3fa9edb8fd5c4f (diff) | |
download | accel-ppp-938bad250baa7bd6f0761e70ce68a2de063c528c.tar.gz accel-ppp-938bad250baa7bd6f0761e70ce68a2de063c528c.zip |
load ipoe and vlan_mon module on start
-rw-r--r-- | accel-pppd/ctrl/ipoe/ipoe_netlink.c | 7 | ||||
-rw-r--r-- | accel-pppd/vlan-mon/vlan_mon.c | 7 |
2 files changed, 12 insertions, 2 deletions
diff --git a/accel-pppd/ctrl/ipoe/ipoe_netlink.c b/accel-pppd/ctrl/ipoe/ipoe_netlink.c index 363ff35..4331e80 100644 --- a/accel-pppd/ctrl/ipoe/ipoe_netlink.c +++ b/accel-pppd/ctrl/ipoe/ipoe_netlink.c @@ -624,7 +624,12 @@ static struct triton_md_handler_t mc_hnd = { static void init(void) { - int mcg_id = genl_resolve_mcg(IPOE_GENL_NAME, IPOE_GENL_MCG_PKT, &ipoe_genl_id); + int mcg_id; + + if (system("modprobe -q ipoe")) + log_warn("failed to load ipoe module\n"); + + mcg_id = genl_resolve_mcg(IPOE_GENL_NAME, IPOE_GENL_MCG_PKT, &ipoe_genl_id); if (mcg_id == -1) { log_warn("ipoe: unclassified packet handling is disabled\n"); rth.fd = -1; diff --git a/accel-pppd/vlan-mon/vlan_mon.c b/accel-pppd/vlan-mon/vlan_mon.c index 10e6c21..2892f4f 100644 --- a/accel-pppd/vlan-mon/vlan_mon.c +++ b/accel-pppd/vlan-mon/vlan_mon.c @@ -520,7 +520,12 @@ static struct triton_md_handler_t mc_hnd = { static void init(void) { - int mcg_id = genl_resolve_mcg(VLAN_MON_GENL_NAME, VLAN_MON_GENL_MCG, &vlan_mon_genl_id); + int mcg_id; + + if (system("modprobe -q vlan_mon")) + log_warn("failed to load vlan_mon module\n"); + + mcg_id = genl_resolve_mcg(VLAN_MON_GENL_NAME, VLAN_MON_GENL_MCG, &vlan_mon_genl_id); if (mcg_id == -1) { log_warn("vlan_mon: kernel module is not loaded\n"); vlan_mon_genl_id = -1; |