Update subnet-up.tmpl
This commit is contained in:
parent
f5faf4454d
commit
9b3dfbf652
@ -1,2 +1,12 @@
|
||||
#!/bin/ash
|
||||
echo "Route up: \$SUBNET weight \$WEIGHT via \$NODE (\$REMOTEADDRESS:\$REMOTEPORT)"
|
||||
nonMACChars=`echo \$SUBNET | tr -d "[:digit:]" | tr -d [:ABCDEF]`
|
||||
macFile="/tmp/tinc_peer_mac_\$NODE"
|
||||
if [ -z "\$nonMACChars" ]; then
|
||||
# This subnet is a MAC
|
||||
echo "\$SUBNET" > \$macFile
|
||||
else
|
||||
# This subnet is likely an IP address, add it to the ARP table
|
||||
mac=`cat \$macFile`
|
||||
arp -s "\$SUBNET" "\$mac"
|
||||
fi
|
||||
|
Loading…
x
Reference in New Issue
Block a user