Developing lightweight computation at the DSG edge

Commit 872d9526 authored by p4u's avatar p4u
Browse files

Fixed usage of field bmx6_ipv4_address (netmask configuration was missing)

parent c79b4474
......@@ -586,7 +586,11 @@ qmp_configure_bmx6() {
uci set $conf.mesh_$"$ifname"
if qmp_uci_test qmp.networks.bmx6_ipv4_address ; then
uci set $conf.general.tun4Address="$(uci get qmp.networks.bmx6_ipv4_address)"
local bmx6_ipv4_netmask="$(echo $(uci get qmp.networks.bmx6_ipv4_address) | cut -s -d / -f2)"
local bmx6_ipv4_address="$(echo $(uci get qmp.networks.bmx6_ipv4_address) | cut -d / -f1)"
[ -z "$bmx6_ipv4_netmask" ] && bmx6_ipv4_netmask="32"
uci set $conf.general.tun4Address="$bmx6_ipv4_address/$bmx6_ipv4_netmask"
elif qmp_uci_test qmp.networks.bmx6_ipv4_prefix24 ; then
local ipv4_suffix24="$(( 0x$community_node_id / 0x100 )).$(( 0x$community_node_id % 0x100 ))"
uci set $conf.general.tun4Address="$(uci get qmp.networks.bmx6_ipv4_prefix24).$ipv4_suffix24/32"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment