@@ -31,7 +31,6 @@ def initialize(hash, context = {})
31
31
self . myfilename << ( "\x00 " * ( 128 - self . myfilename . length ) )
32
32
33
33
source = hash [ 'SRVHOST' ] || Rex ::Socket . source_address
34
- self . domain_name = hash [ 'DOMAINNAME' ] || nil
35
34
self . ipstring = Rex ::Socket . addr_aton ( source )
36
35
37
36
ipstart = hash [ 'DHCPIPSTART' ]
@@ -96,7 +95,7 @@ def initialize(hash, context = {})
96
95
self . pxepathprefix = ""
97
96
self . pxereboottime = 2000
98
97
99
- self . domainname = hash [ 'DOMAINNAME' ] if hash . include? ( 'DOMAINNAME' )
98
+ self . domain_name = hash [ 'DOMAINNAME' ] || nil
100
99
self . url = hash [ 'URL' ] if hash . include? ( 'URL' )
101
100
end
102
101
@@ -130,7 +129,7 @@ def set_option(opts)
130
129
allowed_options = [
131
130
:serveOnce , :pxealtconfigfile , :servePXE , :relayip , :leasetime , :dnsserv ,
132
131
:pxeconfigfile , :pxepathprefix , :pxereboottime , :router ,
133
- :give_hostname , :served_hostname , :served_over , :serveOnlyPXE , :domainname , :url
132
+ :give_hostname , :served_hostname , :served_over , :serveOnlyPXE , :domain_name , :url
134
133
]
135
134
136
135
opts . each_pair { |k , v |
@@ -159,7 +158,7 @@ def send_packet(ip, pkt)
159
158
attr_accessor :sock , :thread , :myfilename , :ipstring , :served , :serveOnce
160
159
attr_accessor :current_ip , :start_ip , :end_ip , :broadcasta , :netmaskn
161
160
attr_accessor :servePXE , :pxeconfigfile , :pxealtconfigfile , :pxepathprefix , :pxereboottime , :serveOnlyPXE
162
- attr_accessor :give_hostname , :served_hostname , :served_over , :reporter , :domainname , : url
161
+ attr_accessor :give_hostname , :served_hostname , :served_over , :reporter , :url
163
162
164
163
protected
165
164
@@ -324,7 +323,6 @@ def dispatch_request(from, buf)
324
323
pkt << dhcpoption ( OpHostname , send_hostname )
325
324
end
326
325
end
327
- pkt << dhcpoption ( OpDomainname , self . domainname ) if self . domainname
328
326
pkt << dhcpoption ( OpURL , self . url ) if self . url
329
327
pkt << dhcpoption ( OpEnd )
330
328
0 commit comments