summaryrefslogtreecommitdiff
path: root/files
diff options
context:
space:
mode:
authoregon0 <ms@resonar.de>2011-06-25 10:39:34 (GMT)
committeregon0 <ms@resonar.de>2011-06-25 10:39:34 (GMT)
commit0850ac21d153d490ddc2b02f29b74b4b5ed88181 (patch)
tree25b2405d73236d9e9e011388f7da8a28d94287d6 /files
parenta4e618c49c7c409a82079f5fd86cef09067e3863 (diff)
* added radomization for the second bit of the used mac-address (n2n)
Diffstat (limited to 'files')
-rwxr-xr-xfiles/etc/init.d/n2n3
1 files changed, 2 insertions, 1 deletions
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
contact: Jan Huwald // Impressum