From 7f3d33f31c778036e0508af47ad129536d1966b7 Mon Sep 17 00:00:00 2001 From: Markus Hauschild Date: Thu, 30 Mar 2017 17:17:19 +0200 Subject: [PATCH] Correctly add/remove fastd interface from batman --- roles/fastd/templates/fastd.conf.j2 | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/roles/fastd/templates/fastd.conf.j2 b/roles/fastd/templates/fastd.conf.j2 index a341482..c2a76be 100644 --- a/roles/fastd/templates/fastd.conf.j2 +++ b/roles/fastd/templates/fastd.conf.j2 @@ -21,8 +21,17 @@ mtu {{ fastd_mtu }}; peer limit {{ fastd_peers_limit }}; {% endif %} -on up "ifup --allow hotplug {{ fastd_interface }}"; -on down "ifdown --allow hotplug {{ fastd_interface }}"; +on up " + ifconfig $INTERFACE down + ip link set address f2:00:90:00:{{ gateway_id }}:10 dev $INTERFACE + ifconfig $INTERFACE up + + batctl -m {{ batman_interface }} if add $INTERFACE +"; + +on down " + batctl -m {{ batman_interface }} if del $INTERFACE +"; {% if fastd_anonymous %} on verify "/etc/fastd/{{ site_code }}/blacklist.sh /opt/{{ site_code }}/vpn-blacklist/blacklist.json";