From 365652e6926f2216d7b381850d0255d9de7ca01c Mon Sep 17 00:00:00 2001 From: vahid-dan Date: Wed, 30 Aug 2023 20:59:41 -0500 Subject: [PATCH] Fix ip/subnet --- gateways/remote-access/lora-radio.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gateways/remote-access/lora-radio.sh b/gateways/remote-access/lora-radio.sh index e0ac7b8..721ed39 100755 --- a/gateways/remote-access/lora-radio.sh +++ b/gateways/remote-access/lora-radio.sh @@ -40,7 +40,7 @@ sleep 1 case $lora_radio_mode in "pendant") - sudo /usr/local/bin/tncattach /dev/$lora_radio_serial_interface $lora_radio_baud_rate -d -e -n -m $lora_radio_mtu -i $lora_radio_node_ip$lora_radio_node_netmask + sudo /usr/local/bin/tncattach /dev/$lora_radio_serial_interface $lora_radio_baud_rate -d -e -n -m $lora_radio_mtu -i "$lora_radio_node_ip""$lora_radio_node_netmask" sudo /usr/sbin/tc qdisc add dev $lora_radio_lora_interface root tbf rate "$lora_radio_rate"kbit burst "$lora_radio_burst"kbit latency "$lora_radio_latency"ms if ip route | grep -q default; then sudo /usr/sbin/ip route delete default @@ -49,12 +49,12 @@ case $lora_radio_mode in ;; "noevio") - sudo /usr/local/bin/tncattach /dev/$lora_radio_serial_interface $lora_radio_baud_rate -d -e -n -m $lora_radio_mtu -i $lora_radio_node_ip + sudo /usr/local/bin/tncattach /dev/$lora_radio_serial_interface $lora_radio_baud_rate -d -e -n -m $lora_radio_mtu -i "$lora_radio_node_ip""$lora_radio_node_netmask" sudo /usr/sbin/tc qdisc add dev $lora_radio_lora_interface root tbf rate "$lora_radio_rate"kbit burst "$lora_radio_burst"kbit latency "$lora_radio_latency"ms ;; "noevio-nat") - sudo /usr/local/bin/tncattach /dev/$lora_radio_serial_interface $lora_radio_baud_rate -d -e -n -m $lora_radio_mtu -i $lora_radio_node_ip + sudo /usr/local/bin/tncattach /dev/$lora_radio_serial_interface $lora_radio_baud_rate -d -e -n -m $lora_radio_mtu -i "$lora_radio_node_ip""$lora_radio_node_netmask" sudo /usr/sbin/tc qdisc add dev $lora_radio_lora_interface root tbf rate "$lora_radio_rate"kbit burst "$lora_radio_burst"kbit latency "$lora_radio_latency"ms echo 1 | sudo tee /proc/sys/net/ipv4/ip_forward > /dev/null sudo /sbin/iptables -t nat -A POSTROUTING -o $lora_radio_uplink_interface -j MASQUERADE