Revision 1bdc9427 fix-net

b/fix-net
28 28
  for tag in $TAGS; do
29 29
    case $tag in
30 30
    $IP_LESS_ROUTED_TAG)
31
      uplink=$(ip route list table $LINK | grep "default via" | awk '{print $5}')
32
      uplink6=$(ip -6 route list table $LINK | grep "default via" | awk '{print $5}')
33
      eui64=$($MAC2EUI64 $MAC $SUBNET6 2>/dev/null)
34 31
      if [ "$GANETI_INSTANCE_OLD_PRIMARY" == "$host.$domain" ]; then
35 32
        # This runs on the source node
36
        hooks-log $0 "ip -6 neigh del proxy $eui64 dev $uplink6"
37
        ip -6 neigh del proxy $eui64 dev $uplink6 >/dev/null 2>&1
33
        get_uplink $LINK "-6"
34
        get_eui64 $MAC $SUBNET6
35
        hooks-log $0 "ip -6 neigh del proxy $EUI64 dev $UPLINK"
36
        ip -6 neigh del proxy $EUI64 dev $UPLINK >/dev/null 2>&1
38 37
      elif [ "$GANETI_INSTANCE_NEW_PRIMARY" == "$host.$domain" ]; then
39
        # This runs on the target node
40
        # Send GARP from host to upstream router to speed up mac change for the VMs IP
41
        hooks-log $0 "arping  -c3 -I $uplink -U $IP"
42
        echo 1 > /proc/sys/net/ipv4/ip_nonlocal_bind
43
        arping  -c3 -I $uplink -U $IP
44
        echo 0 > /proc/sys/net/ipv4/ip_nonlocal_bind
45
        # Send Unsolicited Neighbor Advertisement to speed up nd change for the VMs IP
46
        hooks-log $0 "ndsend $eui64 $uplink6"
47
        ndsend $eui64 $uplink6
38
        hooks-log $0 "Do nothing in new primary. All done by if-up script"
48 39
      fi
49 40
    ;;
50 41
    esac

Also available in: Unified diff