net-dhcp 1.3.1 → 1.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG +5 -0
- data/lib/net-dhcp/version.rb +1 -1
- data/lib/net/dhcp/core.rb +5 -1
- data/net-dhcp.gemspec +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7591159786b80d0d7445de33a57b99a4f51a635b
|
4
|
+
data.tar.gz: 575977fefba4c7a4dbe39d3e74a6c7e687fb9032
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0143ba28710c7902233e3931d358a9df245c07592201d2ae3137edb4c68c675df2f6392187c338ed571c6e63ca89efca817cf92ed702cf0a8a7a3b26c972f080
|
7
|
+
data.tar.gz: 8220cd139c0f5b967c1527c51a9473f26d184c496077561c5cc453a42fbc14d8805d4bd6974af4365d14778af85929cbb18ac22fa229f5a1710ed9affd2a629d
|
data/CHANGELOG
CHANGED
@@ -1,3 +1,8 @@
|
|
1
|
+
*1.3.2
|
2
|
+
|
3
|
+
* Fix MAC address sniffing under (at least) CentOS and RHEL 7 (also OS X and possibly FreeBSD)
|
4
|
+
(https://github.com/mjtko/net-dhcp-ruby/pull/11) [psschroeter]
|
5
|
+
|
1
6
|
*1.3.1
|
2
7
|
|
3
8
|
* Fix HostNameOption to use correct type (https://github.com/mjtko/net-dhcp-ruby/pull/9) [mordocai]
|
data/lib/net-dhcp/version.rb
CHANGED
data/lib/net/dhcp/core.rb
CHANGED
@@ -153,7 +153,11 @@ module DHCP
|
|
153
153
|
mac = mac_line.strip.split(":")[1].gsub("-","").strip
|
154
154
|
end
|
155
155
|
else
|
156
|
-
|
156
|
+
ifcfg_out = `/sbin/ifconfig`.chomp
|
157
|
+
matches1 = ifcfg_out.scan(/HWaddr ([a-h0-9:]+)/i).flatten # Linux
|
158
|
+
matches2 = ifcfg_out.scan(/ether ([a-h0-9:]+)/i).flatten # Some Linux (EL7), BSDs
|
159
|
+
mac = matches1.first || matches2.first
|
160
|
+
mac = mac.gsub(/:/,"") if mac
|
157
161
|
end
|
158
162
|
mac = '000000000000' if mac.empty?
|
159
163
|
self.chaddr = [mac].pack('H*').unpack('CCCCCC')
|
data/net-dhcp.gemspec
CHANGED
@@ -5,7 +5,7 @@ Gem::Specification.new do |s|
|
|
5
5
|
s.name = 'net-dhcp'
|
6
6
|
s.version = Net::Dhcp::VERSION
|
7
7
|
s.platform = Gem::Platform::RUBY
|
8
|
-
s.date = "2014-
|
8
|
+
s.date = "2014-11-18"
|
9
9
|
s.authors = ['daniel martin gomez (etd)', 'syonbori', 'Mark J. Titorenko']
|
10
10
|
s.email = 'mark.titorenko@alces-software.com'
|
11
11
|
s.homepage = 'http://github.com/mjtko/net-dhcp-ruby'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: net-dhcp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- daniel martin gomez (etd)
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2014-
|
13
|
+
date: 2014-11-18 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rspec
|
@@ -147,7 +147,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
147
147
|
version: 1.3.7
|
148
148
|
requirements: []
|
149
149
|
rubyforge_project:
|
150
|
-
rubygems_version: 2.
|
150
|
+
rubygems_version: 2.4.2
|
151
151
|
signing_key:
|
152
152
|
specification_version: 3
|
153
153
|
summary: set of classes to low level handle the DHCP protocol
|