summaryrefslogtreecommitdiff
path: root/accel-pppd/vlan-mon/vlan_mon.c
diff options
context:
space:
mode:
Diffstat (limited to 'accel-pppd/vlan-mon/vlan_mon.c')
-rw-r--r--accel-pppd/vlan-mon/vlan_mon.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/accel-pppd/vlan-mon/vlan_mon.c b/accel-pppd/vlan-mon/vlan_mon.c
index 10e6c210..2892f4f3 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;