bird2: add test.sh for bird
[feed/routing.git] / batman-adv / files / lib / netifd / proto / batadv_hardif.sh
index 6eb597ff610683ce4d478e83d4515fe518228329..b2f87dd6c24eb67e68da1dc66270d9aa67af8140 100755 (executable)
@@ -8,6 +8,7 @@
 
 proto_batadv_hardif_init_config() {
        proto_config_add_int 'elp_interval'
+       proto_config_add_int 'hop_penalty'
        proto_config_add_string "master"
        proto_config_add_string 'throughput_override'
 }
@@ -17,10 +18,12 @@ proto_batadv_hardif_setup() {
        local iface="$2"
 
        local elp_interval
+       local hop_penalty
        local master
        local throughput_override
 
        json_get_vars elp_interval
+       json_get_vars hop_penalty
        json_get_vars master
        json_get_vars throughput_override
 
@@ -29,6 +32,7 @@ proto_batadv_hardif_setup() {
        batctl meshif "$master" interface -M add "$iface"
 
        [ -n "$elp_interval" ] && batctl hardif "$iface" elp_interval "$elp_interval"
+       [ -n "$hop_penalty" ] && batctl hardif "$iface" hop_penalty "$hop_penalty"
        [ -n "$throughput_override" ] && batctl hardif "$iface" throughput_override "$throughput_override"
 
        proto_init_update "$iface" 1