Revision 7c60f7a2 lib/hypervisor/hv_kvm.py
b/lib/hypervisor/hv_kvm.py | ||
---|---|---|
169 | 169 |
script.write(" /usr/sbin/brctl addif $BRIDGE $INTERFACE\n") |
170 | 170 |
elif nic.nicparams[constants.NIC_MODE] == constants.NIC_MODE_ROUTED: |
171 | 171 |
script.write(" # Route traffic targeted at the IP to the interface\n") |
172 |
script.write(" /sbin/ip route add $IP/32 dev $INTERFACE\n") |
|
172 |
if nic.nicparams[constants.NIC_LINK]: |
|
173 |
script.write(" /sbin/ip route replace $IP/32 table $LINK dev $INTERFACE\n") |
|
174 |
else: |
|
175 |
script.write(" /sbin/ip route replace $IP/32 dev $INTERFACE\n") |
|
173 | 176 |
interface_proxy_arp = "/proc/sys/net/ipv4/conf/$INTERFACE/proxy_arp" |
174 | 177 |
script.write(" /bin/echo 1 > %s\n" % interface_proxy_arp) |
175 | 178 |
script.write("fi\n\n") |
Also available in: Unified diff