diff options
author | Katze Miau <miaukatzemiau@priveasy.de> | 2011-12-11 13:32:54 (GMT) |
---|---|---|
committer | Katze Miau <miaukatzemiau@priveasy.de> | 2011-12-11 13:32:54 (GMT) |
commit | ed254615ad04befe9f847879b3d78567c51f673b (patch) | |
tree | cee5bfabbb6a9aa707acd5e575ecfd195134c258 /files/common/etc/fsm/inetable/trans/robinson.enter | |
parent | 586b5073ab8b0b745e627a3e246e45e4052e6f8d (diff) |
fsm inetable: sync mesh iface w/ uci, use batctl gw off, reduce redundancy
- add mesh_add/del_ipv4 to set/unset IPv4 addresses of mesh iface; the
address is set using ifconfig to avoid ifudown+ifup but also updated
in UCI to maintain a consistent state
- use this function in queen, ghost and robinson state transitions
- use `batctl gw off` in robinson state: this allows to deliever local
DHCP replies while dropping the idea of announcing fake gateways
- ghost.leave reuses queen.leave
Diffstat (limited to 'files/common/etc/fsm/inetable/trans/robinson.enter')
-rwxr-xr-x | files/common/etc/fsm/inetable/trans/robinson.enter | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/files/common/etc/fsm/inetable/trans/robinson.enter b/files/common/etc/fsm/inetable/trans/robinson.enter index 7ea0001..163f155 100755 --- a/files/common/etc/fsm/inetable/trans/robinson.enter +++ b/files/common/etc/fsm/inetable/trans/robinson.enter @@ -1,4 +1,5 @@ #!/bin/sh -e +. ../common.sh # setup random ip gen_randnet () { @@ -9,7 +10,8 @@ gen_randnet while ! arping -I br-mesh -D -c 5 -q $randnet.1; do gen_randnet done -ifconfig br-mesh $randnet.1 + +mesh_add_ipv4 $randnet.1 255.0.0.0 # setup dhcp echo " @@ -18,13 +20,11 @@ set dhcp.mesh.start=2 set dhcp.mesh.limit=254 set dhcp.mesh.leasetime=60 set dhcp.mesh.interface=mesh -set dhcp.mesh.start_ip=$randnet.2 -set dhcp.mesh.end_ip=$randnet.254 " | uci batch /etc/init.d/dnsmasq restart -# announce fake gateway; TODO: announce only tiny bandwith -batctl gw server +# disable batman-adv-mangling with DHCP packets +batctl gw off # TODO: start fake dns |