Pārlūkot izejas kodu

Add traceroute for mesh testing

Bob Mottram 7 gadus atpakaļ
vecāks
revīzija
6dbcf2ab2f

+ 12
- 0
src/freedombone-image-customise Parādīt failu

@@ -844,9 +844,21 @@ initialise_mesh() {
844 844
     # dhcp daemon for hotspot on secondary wifi adapter
845 845
     chroot "$rootdir" apt-get -yq install dnsmasq
846 846
 
847
+    # for debugging
848
+    chroot "$rootdir" apt-get -yq install traceroute
849
+
847 850
     # set the default protocol to be used
848 851
     echo 'batman-adv' > $rootdir$MESH_DEFAULT_PROTOCOL
849 852
 
853
+    sed -i 's|#net.ipv6.conf.all.forwarding.*|net.ipv6.conf.all.forwarding=1|g' $rootdir/etc/sysctl.conf
854
+    sed -i 's|net.ipv6.conf.all.forwarding.*|net.ipv6.conf.all.forwarding=1|g' $rootdir/etc/sysctl.conf
855
+
856
+    sed -i 's|#net.ipv6.conf.all.accept_redirects.*|net.ipv6.conf.all.accept_redirects=1|g' $rootdir/etc/sysctl.conf
857
+    sed -i 's|net.ipv6.conf.all.accept_redirects.*|net.ipv6.conf.all.accept_redirects=1|g' $rootdir/etc/sysctl.conf
858
+
859
+    sed -i 's|#net.ipv6.conf.all.accept_source_route.*|net.ipv6.conf.all.accept_source_route=1|g' $rootdir/etc/sysctl.conf
860
+    sed -i 's|net.ipv6.conf.all.accept_source_route.*|net.ipv6.conf.all.accept_source_route=1|g' $rootdir/etc/sysctl.conf
861
+
850 862
     configure_firewall
851 863
     install_avahi
852 864
     install_batman

+ 6
- 2
src/freedombone-mesh-bmx6 Parādīt failu

@@ -180,11 +180,14 @@ function start {
180 180
     # avahi on ipv6
181 181
     sed -i 's|use-ipv4=.*|use-ipv4=no|g' /etc/avahi/avahi-daemon.conf
182 182
     sed -i 's|use-ipv6=.*|use-ipv6=yes|g' /etc/avahi/avahi-daemon.conf
183
+    sed -i 's|#disallow-other-stacks=.*|disallow-other-stacks=no|g' /etc/avahi/avahi-daemon.conf
184
+    sed -i 's|disallow-other-stacks=.*|disallow-other-stacks=no|g' /etc/avahi/avahi-daemon.conf
185
+    sed -i 's|#publish-a-on-ipv6=.*|publish-a-on-ipv6=yes|g' /etc/avahi/avahi-daemon.conf
186
+    sed -i 's|publish-a-on-ipv6=.*|publish-a-on-ipv6=yes|g' /etc/avahi/avahi-daemon.conf
183 187
     systemctl restart avahi-daemon
184 188
 
185 189
     systemctl daemon-reload
186 190
     systemctl enable bmx6
187
-    systemctl start bmx6
188 191
 
189 192
     # NOTE: Don't connect the secondary wifi device. hostapd will handle that by itself
190 193
 
@@ -213,6 +216,7 @@ function start {
213 216
     sed -i "s|server_name .*|server_name ${HOSTNAME}.local;|g" /etc/nginx/sites-available/git_ssb
214 217
 
215 218
     systemctl restart nginx
219
+    systemctl restart bmx6
216 220
 
217 221
     verify
218 222
 
@@ -296,7 +300,7 @@ case "$1" in
296 300
         start
297 301
         ;;
298 302
     ping)
299
-        ping -v -6 $2
303
+        ping6 -v $2
300 304
         ;;
301 305
     data)
302 306
         bmx6 -lc traffic=$IFACE

+ 6
- 2
src/freedombone-mesh-bmx7 Parādīt failu

@@ -178,11 +178,14 @@ function start {
178 178
     # avahi on ipv6
179 179
     sed -i 's|use-ipv4=.*|use-ipv4=no|g' /etc/avahi/avahi-daemon.conf
180 180
     sed -i 's|use-ipv6=.*|use-ipv6=yes|g' /etc/avahi/avahi-daemon.conf
181
+    sed -i 's|#disallow-other-stacks=.*|disallow-other-stacks=no|g' /etc/avahi/avahi-daemon.conf
182
+    sed -i 's|disallow-other-stacks=.*|disallow-other-stacks=no|g' /etc/avahi/avahi-daemon.conf
183
+    sed -i 's|#publish-a-on-ipv6=.*|publish-a-on-ipv6=yes|g' /etc/avahi/avahi-daemon.conf
184
+    sed -i 's|publish-a-on-ipv6=.*|publish-a-on-ipv6=yes|g' /etc/avahi/avahi-daemon.conf
181 185
     systemctl restart avahi-daemon
182 186
 
183 187
     systemctl daemon-reload
184 188
     systemctl enable bmx7
185
-    systemctl start bmx7
186 189
 
187 190
     # NOTE: Don't connect the secondary wifi device. hostapd will handle that by itself
188 191
 
@@ -211,6 +214,7 @@ function start {
211 214
     sed -i "s|server_name .*|server_name ${HOSTNAME}.local;|g" /etc/nginx/sites-available/git_ssb
212 215
 
213 216
     systemctl restart nginx
217
+    systemctl restart bmx7
214 218
 
215 219
     verify
216 220
 
@@ -294,7 +298,7 @@ case "$1" in
294 298
         start
295 299
         ;;
296 300
     ping)
297
-        ping -v -6 $2
301
+        ping6 -v $2
298 302
         ;;
299 303
     data)
300 304
         bmx7 -lc traffic=$IFACE