Add ip rules for extra links by reusing the tun infrastructure.

This commit is contained in:
Tim Wilkinson 2022-10-04 12:47:38 -07:00 committed by Joe AE6XE
parent 806f137ae0
commit 1eecdf2d6f
1 changed files with 11 additions and 0 deletions

View File

@ -0,0 +1,11 @@
#!/bin/sh
# Handles setting up rules for extra interfaces
islink=$(uci -q -c /etc/config.mesh/ show xlink | grep "ifname='${INTERFACE}'")
if [ "${islink}" != "" ]; then
if [ ${ACTION} = "ifup" ] ; then
/usr/local/bin/vtun_up ${INTERFACE} up
elif [ ${ACTION} = "ifdown" ] ; then
/usr/local/bin/vtun_up ${INTERFACE} down
fi
fi