+ local iface="$config"
+
+ local aggregated_ogms
+ local ap_isolation
+ local bonding
+ local bridge_loop_avoidance
+ local distributed_arp_table
+ local fragmentation
+ local gw_bandwidth
+ local gw_mode
+ local gw_sel_class
+ local hop_penalty
+ local isolation_mark
+ local log_level
+ local multicast_mode
+ local network_coding
+ local orig_interval
+ local routing_algo
+
+ json_get_vars aggregated_ogms
+ json_get_vars ap_isolation
+ json_get_vars bonding
+ json_get_vars bridge_loop_avoidance
+ json_get_vars distributed_arp_table
+ json_get_vars fragmentation
+ json_get_vars gw_bandwidth
+ json_get_vars gw_mode
+ json_get_vars gw_sel_class
+ json_get_vars hop_penalty
+ json_get_vars isolation_mark
+ json_get_vars log_level
+ json_get_vars multicast_mode
+ json_get_vars network_coding
+ json_get_vars orig_interval
+ json_get_vars routing_algo
+
+ set_default routing_algo 'BATMAN_IV'
+
+ batctl routing_algo "$routing_algo"
+ batctl -m "$iface" interface create
+
+ [ -n "$aggregated_ogms" ] && batctl -m "$iface" aggregation "$aggregated_ogms"
+ [ -n "$ap_isolation" ] && batctl -m "$iface" ap_isolation "$ap_isolation"
+ [ -n "$bonding" ] && batctl -m "$iface" bonding "$bonding"
+ [ -n "$bridge_loop_avoidance" ] && batctl -m "$iface" bridge_loop_avoidance "$bridge_loop_avoidance" 2>&-
+ [ -n "$distributed_arp_table" ] && batctl -m "$iface" distributed_arp_table "$distributed_arp_table" 2>&-
+ [ -n "$fragmentation" ] && batctl -m "$iface" fragmentation "$fragmentation"