Browse Source

Added post-down commands to some interfaces to make the operation of network idempotent

Till Klocke 9 years ago
parent
commit
966290f5b0
1 changed files with 5 additions and 0 deletions
  1. 5 0
      roles/ff-supernode/templates/interfaces.j2

+ 5 - 0
roles/ff-supernode/templates/interfaces.j2

@@ -50,6 +50,9 @@ iface bat0 inet static
     pre-up batctl gw server 48mbit/48mbit
     pre-up echo 120 > /sys/class/net/$IFACE/mesh/hop_penalty
 
+    post-down ip rule del from {{supernode_mesh_net_cidr}} table 42
+    post-down ip rule del to {{supernode_mesh_net_cidr}} table 42
+
     # Paralleles Macvlan-Interface mit fixer MTU fuer Alfred
     up ip link add link $IFACE alfred0 type macvlan
     up ip link set dev alfred0 mtu 1280
@@ -59,6 +62,8 @@ iface bat0 inet6 static
     address {{supernode_mesh_ipv6}}
     pre-up ip -6 rule add from {{supernode_mesh_net_ipv6}} table 42
     pre-up ip -6 rule add to {{supernode_mesh_net_ipv6}} table 42
+    post-down ip -6 rule del from {{supernode_mesh_net_ipv6}} table 42
+    post-down ip -6 rule del to {{supernode_mesh_net_ipv6}} table 42
     #pre-up ebtables -A FORWARD -p IPv6 -i $IFACE --ip6-proto ipv6-icmp --ip6-icmp-type router-advertisement -j DROP
 
 {% if supernode_mesh_backbones is defined %}