summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPavel Novitskiy <altusensix@gmail.com>2013-12-25 23:22:02 +0400
committerPavel Novitskiy <altusensix@gmail.com>2013-12-25 23:22:02 +0400
commit1d0317c50a5302005602a8e5aa58f073a69c4344 (patch)
treedc127beb8b54fe23602256a1308299198c5d90fb
parent31a488f9f2a3495fd3f170e8c66ae5991d2daf79 (diff)
downloadnet-dhcp-ruby-1d0317c50a5302005602a8e5aa58f073a69c4344.tar.gz
fix payload for Discover
-rw-r--r--lib/net/dhcp/options.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/net/dhcp/options.rb b/lib/net/dhcp/options.rb
index d43481d..14c5856 100644
--- a/lib/net/dhcp/options.rb
+++ b/lib/net/dhcp/options.rb
@@ -44,7 +44,7 @@ module DHCP
# Return the option packed as an array of bytes. The first two elements
# are the type and length of this option. The payload follows afterwards.
def to_a
- return [self.type, self.len] + self.payload
+ return [self.type, self.len] + [self.payload]
end
# Return the option packed as a binary string.
@@ -255,7 +255,7 @@ module DHCP
#DEBUG
def initialize(params={})
params[:type] = $DHCP_MESSAGETYPE
- params[:payload] = params.fetch(:payload, [$DHCP_MSG_DISCOVER])
+ params[:payload] = params.fetch(:payload, $DHCP_MSG_DISCOVER)
super(params)
end