From aeed00a5d580f27e46840168efba1894f4008cbc Mon Sep 17 00:00:00 2001 From: Brian Candler Date: Sun, 8 May 2011 11:50:04 +0100 Subject: [PATCH] Fix for Errno::EOPNOTSUPP when adding vlan with Ubuntu 10.04 (32 or 64 bit) --- lib/linux/netlink/route/link_handler.rb | 2 +- test/t_route.rb | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/lib/linux/netlink/route/link_handler.rb b/lib/linux/netlink/route/link_handler.rb index 955fa4f..9c855a2 100644 --- a/lib/linux/netlink/route/link_handler.rb +++ b/lib/linux/netlink/route/link_handler.rb @@ -28,7 +28,7 @@ module Netlink field :type, :ushort # ARPHRD_* field :index, :int field :flags, :uint # IFF_* - field :change, :uint, :default=>0xffffffff # flags to change + field :change, :uint # flags to change rtattr :address, IFLA_ADDRESS, :l2addr rtattr :broadcast, IFLA_BROADCAST, :l2addr rtattr :ifname, IFLA_IFNAME, :cstring diff --git a/test/t_route.rb b/test/t_route.rb index 2786215..4196762 100644 --- a/test/t_route.rb +++ b/test/t_route.rb @@ -72,10 +72,6 @@ class TestAddr < Test::Unit::TestCase @ip.vlan.list(:link=>"lo").map { |x| x.linkinfo.data.id } end - # FIXME: On 10.04.2 LTS (32 and 64 bit) this gives Errno::EOPNOTSUPP; but - # ip link add link lo type vlan id 1234 - # ip link delete vlan0 - # both work fine. test "Add and remove vlan" do begin @ip.vlan.delete(:link=>"lo", :vlan_id=>1234)