Compare commits
16 Commits
0.16-1+whe
...
debian/str
Author | SHA1 | Date | |
---|---|---|---|
![]() |
7fa4149ade | ||
![]() |
9e6ce9d913 | ||
![]() |
06d78d4168 | ||
![]() |
a97bbe0d7c | ||
![]() |
2ceb0fbf6d | ||
![]() |
d771a2be9c | ||
![]() |
51b8bbcd8a | ||
![]() |
118903d9d5 | ||
![]() |
0ed037fc9d | ||
![]() |
aa45b7fa3e | ||
![]() |
981eb2ec29 | ||
![]() |
4b17ea4714 | ||
![]() |
6ebbdbbf87 | ||
![]() |
71ac26af38 | ||
![]() |
4afbfa91c0 | ||
![]() |
05e54f22e8 |
12
debian/changelog
vendored
12
debian/changelog
vendored
@@ -1,3 +1,15 @@
|
|||||||
|
ruby-linux-netlink (0.17-1+stretch1) testing; urgency=medium
|
||||||
|
|
||||||
|
* Repackaged for stretch.
|
||||||
|
|
||||||
|
-- Patrick J Cherry <patrick@bytemark.co.uk> Tue, 10 Nov 2015 13:39:37 +0000
|
||||||
|
|
||||||
|
ruby-linux-netlink (0.16-1+jessie1) testing; urgency=medium
|
||||||
|
|
||||||
|
* Repackaged for jessie
|
||||||
|
|
||||||
|
-- Patrick J Cherry <patrick@bytemark.co.uk> Wed, 01 Apr 2015 17:39:44 +0100
|
||||||
|
|
||||||
ruby-linux-netlink (0.16-1+wheezy1) stable; urgency=medium
|
ruby-linux-netlink (0.16-1+wheezy1) stable; urgency=medium
|
||||||
|
|
||||||
* New upstream release.
|
* New upstream release.
|
||||||
|
@@ -5,9 +5,9 @@ $:.unshift lib unless $:.include? lib
|
|||||||
|
|
||||||
Gem::Specification.new do |s|
|
Gem::Specification.new do |s|
|
||||||
s.name = "netlinkrb"
|
s.name = "netlinkrb"
|
||||||
s.version = "0.12"
|
s.version = "0.17"
|
||||||
s.platform = Gem::Platform::RUBY
|
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.email = ["matthew@bytemark.co.uk"]
|
||||||
s.summary = "Interface to Linux' Netlink API"
|
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."
|
s.description = "Ruby native interface to the Netlink API which avoids shelling out to command-line tools as much as possible."
|
||||||
|
@@ -40,6 +40,33 @@ class TestAddr < Test::Unit::TestCase
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
test "massively parallel IP address addition" do
|
||||||
|
@ifname = create_test_interface
|
||||||
|
return if @ifname.nil?
|
||||||
|
|
||||||
|
link = @ip.link.list.find{|x| x.ifname == @ifname}
|
||||||
|
return if link.nil?
|
||||||
|
|
||||||
|
ips = (10..13).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{|t| t.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_#{$$}")
|
def create_test_interface(ifname = "test_#{$$}")
|
||||||
begin
|
begin
|
||||||
@ip.link.add(
|
@ip.link.add(
|
||||||
|
Reference in New Issue
Block a user