mirror of
https://github.com/novatiq/packages.git
synced 2026-04-30 15:38:40 +01:00
net/mwan3: add lock for mwan3 hotplug script
If more then one interface get up/down at once mwan3 could be in a undefined state, because more then one mwan3 hotplug script are running and editing the iptables. Lock the critical section should solve this issue. Signed-off-by: Florian Eckert <fe@dev.tdt.de>
This commit is contained in:
@@ -8,6 +8,14 @@ IPT6="ip6tables -t mangle -w"
|
||||
LOG="logger -t mwan3 -p"
|
||||
CONNTRACK_FILE="/proc/net/nf_conntrack"
|
||||
|
||||
mwan3_lock() {
|
||||
lock /var/run/mwan3.lock
|
||||
}
|
||||
|
||||
mwan3_unlock() {
|
||||
lock -u /var/run/mwan3.lock
|
||||
}
|
||||
|
||||
mwan3_get_iface_id()
|
||||
{
|
||||
local _tmp _iface _iface_count
|
||||
|
||||
Reference in New Issue
Block a user