batman-adv: add support for the isolation_mark option
authorMarek Lindner <mareklindner@neomailbox.ch>
Sun, 6 Apr 2014 13:51:04 +0000 (21:51 +0800)
committerMarek Lindner <mareklindner@neomailbox.ch>
Sun, 6 Apr 2014 13:51:04 +0000 (21:51 +0800)
With the introduction of the Extended Isolation component[1]
a new option is required by batman-adv: the isolation_mark.
This patch adds support for it in the configuration file

[1] http://www.open-mesh.org/projects/batman-adv/wiki/Extended-isolation

Signed-off-by: Antonio Quartulli <antonio@open-mesh.com>
signed-off-by: Marek Lindner <mareklindner@neomailbox.ch>

batman-adv/Makefile
batman-adv/files/etc/config/batman-adv
batman-adv/files/lib/batman-adv/config.sh

index b9c998608e73c4b180ddc04b14dc9728e3551c29..4ab66f1517df5af0314a86f46cd0d25c67a1423f 100644 (file)
@@ -12,7 +12,7 @@ PKG_NAME:=batman-adv
 
 PKG_VERSION:=2014.1.0
 BATCTL_VERSION:=2014.1.0
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 PKG_MD5SUM:=d55aabb2bc508194407187648c773c1b
 BATCTL_MD5SUM:=92fd4cb60e38ec952fb5fdda4b2e6933
 
index 79d660d67f50fea288852c3f83adc7bfc2255f7f..8865ce995e853dfe71595c275ae3ee1e41ed3eee 100644 (file)
@@ -14,6 +14,7 @@ config 'mesh' 'bat0'
        option 'distributed_arp_table'
        option 'network_coding'
        option 'hop_penalty'
+       option 'isolation_mark'
 
 # yet another batX instance
 # config 'mesh' 'bat5'
index 471c1f226fb0f0ddce1753cabe2456bcec7f44b1..c65a4b47424a5899442c8c0d6d78d233c0366de1 100644 (file)
@@ -12,7 +12,8 @@ bat_config()
 {
        local mesh="$1"
        local aggregated_ogms ap_isolation bonding bridge_loop_avoidance distributed_arp_table fragmentation
-       local gw_bandwidth gw_mode gw_sel_class hop_penalty network_coding log_level orig_interval vis_mode
+       local gw_bandwidth gw_mode gw_sel_class isolation_mark hop_penalty multicast_mode network_coding log_level
+       local orig_interval vis_mode
 
        config_get aggregated_ogms "$mesh" aggregated_ogms
        config_get ap_isolation "$mesh" ap_isolation
@@ -24,6 +25,7 @@ bat_config()
        config_get gw_mode "$mesh" gw_mode
        config_get gw_sel_class "$mesh" gw_sel_class
        config_get hop_penalty "$mesh" hop_penalty
+       config_get isolation_mark "$mesh" isolation_mark
        config_get network_coding "$mesh" network_coding
        config_get log_level "$mesh" log_level
        config_get orig_interval "$mesh" orig_interval
@@ -41,6 +43,7 @@ bat_config()
        [ -n "$gw_mode" ] && echo $gw_mode > /sys/class/net/$mesh/mesh/gw_mode
        [ -n "$gw_sel_class" ] && echo $gw_sel_class > /sys/class/net/$mesh/mesh/gw_sel_class
        [ -n "$hop_penalty" ] && echo $hop_penalty > /sys/class/net/$mesh/mesh/hop_penalty
+       [ -n "$isolation_mark" ] && echo $isolation_mark > /sys/class/net/$mesh/mesh/isolation_mark
        [ -n "$network_coding" ] && echo $network_coding > /sys/class/net/$mesh/mesh/network_coding 2>&-
        [ -n "$log_level" ] && echo $log_level > /sys/class/net/$mesh/mesh/log_level 2>&-
        [ -n "$orig_interval" ] && echo $orig_interval > /sys/class/net/$mesh/mesh/orig_interval