From 40bef2127c943b45ce98311bf200f6ac054adca9 Mon Sep 17 00:00:00 2001 From: Manevolent Date: Wed, 12 Apr 2023 22:33:08 -0600 Subject: [PATCH] Update subnet-up.tmpl --- tinc/subnet-up.tmpl | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tinc/subnet-up.tmpl b/tinc/subnet-up.tmpl index a64840c..5277565 100644 --- a/tinc/subnet-up.tmpl +++ b/tinc/subnet-up.tmpl @@ -7,6 +7,10 @@ if [ -z "\$nonMACChars" ]; then echo "\$SUBNET" > \$macFile else # This subnet is likely an IP address, add it to the ARP table - mac=`cat \$macFile` - arp -s "\$SUBNET" "\$mac" + if test -f "\$macFile"; then + mac=`cat \$macFile` + arp -s "\$SUBNET" "\$mac" + else + echo "WARNING: No MAC known for node \$NODE, can't route \$SUBNET. This is only a problem if this is a remote route." + fi fi