New squeeze release
This commit is contained in:
6
debian/changelog
vendored
6
debian/changelog
vendored
@@ -1,3 +1,9 @@
|
||||
linux-netlink-ruby (0.17-1+squeeze1) oldstable; urgency=medium
|
||||
|
||||
* New upstream release
|
||||
|
||||
-- Patrick J Cherry <patrick@bytemark.co.uk> Wed, 01 Apr 2015 22:48:55 +0100
|
||||
|
||||
linux-netlink-ruby (0.16-1+squeeze1) oldstable; urgency=low
|
||||
|
||||
* New upstream release.
|
||||
|
@@ -5,9 +5,9 @@ $:.unshift lib unless $:.include? lib
|
||||
|
||||
Gem::Specification.new do |s|
|
||||
s.name = "netlinkrb"
|
||||
s.version = "0.12"
|
||||
s.version = "0.17"
|
||||
s.platform = Gem::Platform::RUBY
|
||||
s.authors = ["Brian Candler", "Matthew Bloch", "Patrick Cherry", "Alex Young"]
|
||||
s.authors = ["Brian Candler", "Matthew Bloch", "Patrick Cherry", "Alex Young", "Nicholas Thomas"]
|
||||
s.email = ["matthew@bytemark.co.uk"]
|
||||
s.summary = "Interface to Linux' Netlink API"
|
||||
s.description = "Ruby native interface to the Netlink API which avoids shelling out to command-line tools as much as possible."
|
||||
|
@@ -40,6 +40,28 @@ class TestAddr < Test::Unit::TestCase
|
||||
end
|
||||
end
|
||||
|
||||
test "massively parallel IP address addition" do
|
||||
@ifname = create_test_interface
|
||||
|
||||
ips = (10..20).map {|y| (1..254).map {|z| "10.100.#{y}.#{z}" } }.flatten.compact
|
||||
|
||||
threads = ips.map {|ip|
|
||||
Thread.new {
|
||||
Linux::Netlink::Route::Socket.new.addr.add(
|
||||
:index => @ifname,
|
||||
:local => ip,
|
||||
:prefixlen => 8
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
threads.map(&:join)
|
||||
created = @ip.addr.list(:index => @ifname, :family => Socket::AF_INET).
|
||||
map {|ifaddr| ifaddr.address.to_s }
|
||||
|
||||
ips.each {|ip| assert created.include?( ip ), "#{ip} was not created" }
|
||||
end
|
||||
|
||||
def create_test_interface(ifname = "test_#{$$}")
|
||||
begin
|
||||
@ip.link.add(
|
||||
|
Reference in New Issue
Block a user