diff options
author | Vladislav Grishenko <themiron@mail.ru> | 2019-01-19 03:28:39 +0500 |
---|---|---|
committer | Vladislav Grishenko <themiron@mail.ru> | 2019-01-19 03:33:19 +0500 |
commit | 56ff710d582cdd16dd9a5893ca0f027b3fd923eb (patch) | |
tree | 2fa849c6979544024818961beca221821cecb317 /accel-pppd | |
parent | 5fc1391e534ec9728b03bf4fdcfe8686720547d0 (diff) | |
download | accel-ppp-56ff710d582cdd16dd9a5893ca0f027b3fd923eb.tar.gz accel-ppp-56ff710d582cdd16dd9a5893ca0f027b3fd923eb.zip |
ipoe/vlan_mon: add check for already loaded module
Diffstat (limited to 'accel-pppd')
-rw-r--r-- | accel-pppd/ctrl/ipoe/ipoe_netlink.c | 2 | ||||
-rw-r--r-- | accel-pppd/vlan-mon/vlan_mon.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/accel-pppd/ctrl/ipoe/ipoe_netlink.c b/accel-pppd/ctrl/ipoe/ipoe_netlink.c index 4331e804..e42bf34c 100644 --- a/accel-pppd/ctrl/ipoe/ipoe_netlink.c +++ b/accel-pppd/ctrl/ipoe/ipoe_netlink.c @@ -626,7 +626,7 @@ static void init(void) { int mcg_id; - if (system("modprobe -q ipoe")) + if (access("/sys/module/ipoe", F_OK) && 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); diff --git a/accel-pppd/vlan-mon/vlan_mon.c b/accel-pppd/vlan-mon/vlan_mon.c index 2892f4f3..f2109eda 100644 --- a/accel-pppd/vlan-mon/vlan_mon.c +++ b/accel-pppd/vlan-mon/vlan_mon.c @@ -522,7 +522,7 @@ static void init(void) { int mcg_id; - if (system("modprobe -q vlan_mon")) + if (access("/sys/module/vlan_mon", F_OK) && 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); |