From 0850ac21d153d490ddc2b02f29b74b4b5ed88181 Mon Sep 17 00:00:00 2001 From: egon0 Date: Sat, 25 Jun 2011 12:39:34 +0200 Subject: * added radomization for the second bit of the used mac-address (n2n) diff --git a/files/etc/init.d/n2n b/files/etc/init.d/n2n index 22d7a36..26f2e72 100755 --- a/files/etc/init.d/n2n +++ b/files/etc/init.d/n2n @@ -19,7 +19,8 @@ config_cb() { node_mac=`ifconfig ath0 | grep HWaddr | awk '{print $5}' | tr -d "\n" | cut -c6-` [ "$route" = "1" ] && args='-r' if [ "$ipaddr" != "" ]; then - edge -f $args -a 169.254.0.1 -d $devname -c $community -k $key -m 12:34${node_mac} -l ${supernode}:${port} + mac_random=`echo $(head -30 /dev/urandom | tr -dc "0123456789" | head -c2)` + edge -f $args -a 169.254.0.1 -d $devname -c $community -k $key -m 12:${mac_random}${node_mac} -l ${supernode}:${port} ifconfig $devname 0.0.0.0 batctl if add $devname fi -- cgit v0.10.1