1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-22 18:50:08 +03:00

Feature #3601: Add support for MTU in the VXLAN drivers

This commit is contained in:
Jaime Melis 2015-03-20 17:55:18 +01:00
parent 0e8b5a6826
commit d3b377a97d

View File

@ -21,7 +21,7 @@ require 'vnmmad'
# - Creates a bridge and bind phisycal device if not present
# - Creates a tagged interface for the VM dev.vlan_id
#
# Once activated the VM will be attached to this bridge
# Once activated the VM will be attached to this bridge
################################################################################
class VXLANDriver < VNMMAD::VLANDriver
@ -44,9 +44,10 @@ class VXLANDriver < VNMMAD::VLANDriver
def create_vlan_dev(options)
mc = VNMMAD::VNMNetwork::IPv4.to_i(CONF[:vxlan_mc]) + options[:vlan_id].to_i
mcs = VNMMAD::VNMNetwork::IPv4.to_s(mc)
mtu = options[:mtu] ? "mtu #{options[:mtu]}" : ""
OpenNebula.exec_and_log("#{command(:ip)} link add #{options[:vlan_dev]}"\
" type vxlan id #{options[:vlan_id]} group #{mcs}"\
" #{mtu} type vxlan id #{options[:vlan_id]} group #{mcs}"\
" dev #{options[:phydev]}")
OpenNebula.exec_and_log("#{command(:ip)} link set #{options[:vlan_dev]} up")