Revision 8866ec86 lib/hypervisor/hv_kvm.py

b/lib/hypervisor/hv_kvm.py
173 173
      if nic.nicparams[constants.NIC_LINK]:
174 174
        script.write("  while /sbin/ip rule del dev $INTERFACE; do :; done\n")
175 175
        script.write("  /sbin/ip rule add dev $INTERFACE table $LINK\n")
176
        script.write("  /sbin/ip route replace $IP/32 table $LINK"
176
        script.write("  /sbin/ip route replace $IP table $LINK proto static"
177 177
                     " dev $INTERFACE\n")
178 178
      else:
179
        script.write("  /sbin/ip route replace $IP/32 dev $INTERFACE\n")
179
        script.write("  /sbin/ip route replace $IP proto static"
180
                     " dev $INTERFACE\n")
180 181
      interface_v4_conf = "/proc/sys/net/ipv4/conf/$INTERFACE"
181 182
      interface_v6_conf = "/proc/sys/net/ipv6/conf/$INTERFACE"
182 183
      script.write("  if [ -d %s ]; then\n" % interface_v4_conf)

Also available in: Unified diff