From 1aee19926f580343d9792a314cf7b9a6360855de Mon Sep 17 00:00:00 2001 From: floh1111 Date: Tue, 8 Nov 2011 21:37:43 +0000 Subject: [PATCH] =?UTF-8?q?Set=20mtu=20of=20mesh=20interface=20to=201528,?= =?UTF-8?q?=20that=20is=20necesarry=20for=20batman=20advanced=202011.3.1,?= =?UTF-8?q?=20set=20fixed=20mac=20addr=20for=20wrt54g=20after=20an=20idea?= =?UTF-8?q?=20from=20freifunk=20l=C3=BCbeck,=20update=20wrt54g=20build=20c?= =?UTF-8?q?onfig=20to=20get=20a=20smaller=20image=20so=20that=20the=20conf?= =?UTF-8?q?iguration=20is=20safed=20over=20reboot?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Broadcom_BCM947xx_953xx_adhoc/.config | 19 ++++++----------- root_file_system/dir300/etc/config/network | 2 +- root_file_system/fonera/etc/config/network | 2 +- .../wrt54g_adhoc/etc/config/network | 1 + root_file_system/wrt54g_adhoc/etc/rc.local | 21 +++++++------------ 5 files changed, 17 insertions(+), 28 deletions(-) diff --git a/build_configuration/Broadcom_BCM947xx_953xx_adhoc/.config b/build_configuration/Broadcom_BCM947xx_953xx_adhoc/.config index 3e32267..08d803f 100644 --- a/build_configuration/Broadcom_BCM947xx_953xx_adhoc/.config +++ b/build_configuration/Broadcom_BCM947xx_953xx_adhoc/.config @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit # OpenWrt version: Backfire (r28536) -# Thu Nov 3 11:30:36 2011 +# Tue Nov 8 19:59:07 2011 # CONFIG_HAVE_DOT_CONFIG=y # CONFIG_TARGET_ppc40x is not set @@ -1066,7 +1066,7 @@ CONFIG_BUSYBOX_CONFIG_LOGGER=y CONFIG_PACKAGE_dnsmasq=y CONFIG_PACKAGE_dropbear=y # CONFIG_PACKAGE_ead is not set -CONFIG_PACKAGE_firewall=y +# CONFIG_PACKAGE_firewall is not set CONFIG_PACKAGE_hotplug2=y CONFIG_PACKAGE_libc=y CONFIG_PACKAGE_libgcc=y @@ -1077,7 +1077,7 @@ CONFIG_PACKAGE_libgcc=y CONFIG_PACKAGE_mtd=y CONFIG_PACKAGE_nvram=y CONFIG_PACKAGE_opkg=y -CONFIG_PACKAGE_qos-scripts=y +# CONFIG_PACKAGE_qos-scripts is not set # CONFIG_PACKAGE_resolveip is not set CONFIG_PACKAGE_uci=y # CONFIG_PACKAGE_ucitrigger is not set @@ -1538,7 +1538,6 @@ CONFIG_PACKAGE_tinc=y # CONFIG_PACKAGE_bwm is not set # CONFIG_PACKAGE_bwping is not set # CONFIG_PACKAGE_cdp-tools is not set -# CONFIG_PACKAGE_chat is not set CONFIG_PACKAGE_crda=y # CONFIG_PACKAGE_cups is not set # CONFIG_PACKAGE_cutter is not set @@ -1635,7 +1634,7 @@ CONFIG_PACKAGE_iw=y # CONFIG_PACKAGE_net-tools-plipconfig is not set # CONFIG_PACKAGE_net-tools-rarp is not set # CONFIG_PACKAGE_net-tools-slattach is not set -CONFIG_PACKAGE_netcat=y +# CONFIG_PACKAGE_netcat is not set # CONFIG_PACKAGE_netdiscover is not set # CONFIG_PACKAGE_netperf is not set # CONFIG_PACKAGE_netpipe is not set @@ -1653,12 +1652,7 @@ CONFIG_PACKAGE_netcat=y # CONFIG_PACKAGE_paris-traceroute is not set # CONFIG_PACKAGE_pen is not set # CONFIG_PACKAGE_portmap is not set -CONFIG_PACKAGE_ppp=y -# CONFIG_PACKAGE_ppp-mod-pppoa is not set -CONFIG_PACKAGE_ppp-mod-pppoe=y -# CONFIG_PACKAGE_ppp-mod-radius is not set -# CONFIG_PACKAGE_pppdump is not set -# CONFIG_PACKAGE_pppstats is not set +# CONFIG_PACKAGE_ppp is not set # CONFIG_PACKAGE_pptp is not set # CONFIG_PACKAGE_qolyester is not set # CONFIG_PACKAGE_raddump is not set @@ -2655,7 +2649,7 @@ CONFIG_PACKAGE_MAC80211_DEBUGFS=y # # CONFIG_PACKAGE_joe is not set # CONFIG_PACKAGE_mg is not set -CONFIG_PACKAGE_nano=y +# CONFIG_PACKAGE_nano is not set # CONFIG_PACKAGE_vim is not set # CONFIG_PACKAGE_vim-full is not set # CONFIG_PACKAGE_vim-help is not set @@ -2786,7 +2780,6 @@ CONFIG_PACKAGE_nano=y # CONFIG_PACKAGE_cksfv is not set # CONFIG_PACKAGE_cmdpad is not set # CONFIG_PACKAGE_collectd is not set -# CONFIG_PACKAGE_comgt is not set # CONFIG_PACKAGE_coreutils is not set # CONFIG_PACKAGE_cpusage is not set # CONFIG_PACKAGE_crypto-tools is not set diff --git a/root_file_system/dir300/etc/config/network b/root_file_system/dir300/etc/config/network index 7931159..8d7e2c1 100644 --- a/root_file_system/dir300/etc/config/network +++ b/root_file_system/dir300/etc/config/network @@ -10,7 +10,7 @@ config 'interface' 'loopback' config 'interface' 'wlanmesh' option 'ifname' 'ath1' - option 'mtu' '1527' + option 'mtu' '1528' config 'interface' 'mesh' option 'type' 'bridge' diff --git a/root_file_system/fonera/etc/config/network b/root_file_system/fonera/etc/config/network index 3950d68..c93897a 100644 --- a/root_file_system/fonera/etc/config/network +++ b/root_file_system/fonera/etc/config/network @@ -10,7 +10,7 @@ config 'interface' 'lan' config 'interface' 'wlanmesh' option 'ifname' 'ath1' - option 'mtu' '1527' + option 'mtu' '1528' config 'interface' 'mesh' option 'type' 'bridge' diff --git a/root_file_system/wrt54g_adhoc/etc/config/network b/root_file_system/wrt54g_adhoc/etc/config/network index d9ca5a7..d51b784 100644 --- a/root_file_system/wrt54g_adhoc/etc/config/network +++ b/root_file_system/wrt54g_adhoc/etc/config/network @@ -38,6 +38,7 @@ config interface wlan0 option proto static option ipaddr 192.168.2.1 option netmask 255.255.255.0 + option mtu 1528 config interface mesh option type bridge diff --git a/root_file_system/wrt54g_adhoc/etc/rc.local b/root_file_system/wrt54g_adhoc/etc/rc.local index e5ef672..c61f956 100755 --- a/root_file_system/wrt54g_adhoc/etc/rc.local +++ b/root_file_system/wrt54g_adhoc/etc/rc.local @@ -1,20 +1,15 @@ # Put your custom commands here that should be executed once # the system init finished. By default this file does nothing. -#set fixed mac address on br-mesh so that the ipv6 addres does not change after every reboot -HARDWARE_MACADDR=`ifconfig -a br-mesh | grep 'HWaddr' | awk '{ print $5}'` -uci set network.mesh.macaddr=$HARDWARE_MACADDR -uci commit +#set fixed mac address that is 1 lower than eth0 mac on br-mesh so that the ipv6 addres does not change after every reboot +#This idea is stolen from freifunk lübeck set_hostname.sh +MAC="`ip link show eth0 | grep "link/ether" | \ + sed "s/^[ ]*//" | cut -d' ' -f2 | sed "s/://g" | \ + tr 'a-z' 'A-Z'`" +MAC="`printf "%012X\n" $((0x$MAC - 0x01))`" -#This does not work for fixed mac (why not?!) -#HARDWARE_MACADDR_ETH0=`ifconfig -a eth0 | grep 'HWaddr' | awk '{ print $5}'` -#HARDWARE_MACADDR_MESH=`ifconfig -a br-mesh | grep 'HWaddr' | awk '{ print $5}'` -# -#if [[ "$HARDWARE_MACADDR_ETH0" != "$HARDWARE_MACADDR_MESH" ]]; then -# uci set network.mesh.macaddr=$HARDWARE_MACADDR_ETH0 -# uci commit -# reboot -#fi +uci set network.mesh.macaddr=$MAC +uci commit ifconfig br-mesh down ifconfig br-mesh up