Skip to content

Commit

Permalink
let batman with routing algo BATMAN_V handle multicast
Browse files Browse the repository at this point in the history
  • Loading branch information
genofire committed May 22, 2022
1 parent b386bba commit 736c288
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
5 changes: 5 additions & 0 deletions roles/batman-adv-interface/templates/interfaces
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ auto {{ batman_dummy_interface }}
iface {{ batman_dummy_interface }} inet manual
pre-up ip link add name $IFACE type dummy
up ip link set $IFACE up
{% if batman_routing_algo == 'BATMAN_V' %}
# let batman handle the multicast
# https://gluon.readthedocs.io/en/latest/package/gluon-mesh-batman-adv.html
post-up bash -c 'echo 2 > /sys/class/net/{{ batman_dummy_interface }}/brport/multicast_router'
{% endif %}
down ip link set $IFACE down
post-down ip link del $IFACE

Expand Down
7 changes: 6 additions & 1 deletion roles/main-bridge/templates/interfaces
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,12 @@ iface br-{{ site_code }} inet static
# tune ARP and IPv6 neighbor soolicitation
post-up sysctl -p /etc/sysctl.d/main-bridge-ip-neigh-tuning.conf
# increase multicast table
post-up bash -c 'echo 2048 > /sys/class/net/br-ffhb/bridge/hash_max'
{% if batman_routing_algo is defined and batman_routing_algo == 'BATMAN_V' %}
# let batman handle the multicast
# https://gluon.readthedocs.io/en/latest/package/gluon-mesh-batman-adv.html
post-up bash -c 'echo 2 > /sys/class/net/br-{{ site_code }}/brport/multicast_router'
{% endif %}
post-up bash -c 'echo 2048 > /sys/class/net/br-{{ site_code }}/bridge/hash_max'

iface br-{{ site_code }} inet6 static
address {{ batman_ipv6_local.address }}
Expand Down

0 comments on commit 736c288

Please sign in to comment.