summaryrefslogtreecommitdiff
path: root/files/common/etc/fsm/inetable/common_queen.sh
diff options
context:
space:
mode:
authorKatze Miau <miaukatzemiau@priveasy.de>2011-12-20 19:41:26 (GMT)
committerKatze Miau <miaukatzemiau@priveasy.de>2011-12-20 19:41:26 (GMT)
commit754907fd31da80d247432d02128bb4e9c79d31b0 (patch)
treec095c058ad651ffeee5c52cf73e680620827a21a /files/common/etc/fsm/inetable/common_queen.sh
parentbd1376e986bf8c6bb54741ab75b92d99b48c8339 (diff)
remove all hardcoded references to FFJ IP range, use /etc/config/cloud instead
Replace the last bits of hardcoded FFJ IP range outside /etc/config - residing in fsm inetable state transitions - with IP ranges calculated from /etc/config/cloud.
Diffstat (limited to 'files/common/etc/fsm/inetable/common_queen.sh')
-rw-r--r--files/common/etc/fsm/inetable/common_queen.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/files/common/etc/fsm/inetable/common_queen.sh b/files/common/etc/fsm/inetable/common_queen.sh
index 86b3aba..1f66c68 100644
--- a/files/common/etc/fsm/inetable/common_queen.sh
+++ b/files/common/etc/fsm/inetable/common_queen.sh
@@ -7,7 +7,8 @@ DHCPLeaseTime=$((12 * 3600))
NodeId="$(cat /etc/nodeid)"
oct3=$(ifconfig br-mesh | egrep -o 'inet addr:[0-9.]*'|cut -f3 -d.)
[ -n "$oct3" ]
-gwip=10.17.$oct3.1
+gwip=$(ipcalc.sh "$(uci get cloud.cur.net_mesh)" $(($oct3 * 256 + 1)) 1 \
+ | grep ^START | cut -f2 -d=)
we_own_our_ip () {
[ "$(p2ptbl get $gwiptbl $oct3 | cut -sf2)" == "$NodeId" ]
contact: Jan Huwald // Impressum