feature #4043: Support TTL for VXLAN driver

This commit is contained in:
Ruben S. Montero committed 2015-10-09 15:57:21 +02:00
1 parent 73de55bc2e
commit 31d26e0536
2 files changed
+4 -1

No files matched your search

@@ -34,3 +34,5 @@
# Base multicast address for each VLAN. The mc address is :vxlan_mc + :vlan_id
:vxlan_mc: 239.0.0.0
# Time To Live (TTL) should be > 1 in routed multicast networks (IGMP)
:vxlan_ttl: 16
+2 -1
View File
@@ -45,9 +45,10 @@ class VXLANDriver < VNMMAD::VLANDriver
mc = VNMMAD::VNMNetwork::IPv4.to_i(CONF[:vxlan_mc]) + @nic[:vlan_id].to_i
mcs = VNMMAD::VNMNetwork::IPv4.to_s(mc)
mtu = @nic[:mtu] ? "mtu #{@nic[:mtu]}" : ""
ttl = CONF[:vxlan_ttl] ? "ttl #{CONF[:vxlan_ttl]}" : ""
OpenNebula.exec_and_log("#{command(:ip)} link add #{@nic[:vlan_dev]}"\
" #{mtu} type vxlan id #{@nic[:vlan_id]} group #{mcs}"\
" #{mtu} type vxlan id #{@nic[:vlan_id]} group #{mcs} #{ttl}"\
" dev #{@nic[:phydev]}")
OpenNebula.exec_and_log("#{command(:ip)} link set #{@nic[:vlan_dev]} up")