Skip to content

Commit

Permalink
Use config tftpBindAddress instead of dhcpGateway for siaddr and sname
Browse files Browse the repository at this point in the history
  • Loading branch information
benbp committed May 10, 2016
1 parent ef967b9 commit 82eea3b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/packet.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ function PacketFactory(protocol, configuration, _) {
packet.fname = bootFileName;

// Necessary, at least on vbox
packet.siaddr = configuration.get('dhcpGateway', '10.1.1.1');
packet.siaddr = configuration.get('tftpBindAddress', '10.1.1.1');
// Not necessary, at least on vbox, but perhaps other clients will require these fields?
packet.sname = configuration.get('dhcpGateway', '10.1.1.1');
packet.sname = configuration.get('tftpBindAddress', '10.1.1.1');

//EFI PXE listen on a different port => tell the server
if ((packet.options.userClass === undefined) &&
Expand Down
2 changes: 1 addition & 1 deletion spec/lib/packet-spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ describe("Packet", function() {

it("should create a proper ACK packet for proxyDHCP", function() {
var testbootfile = 'testbootfile';
configuration.get.withArgs('dhcpGateway').returns('10.1.1.1');
configuration.get.withArgs('tftpBindAddress').returns('10.1.1.1');
configuration.get.withArgs('broadcastaddr').returns('10.1.1.255');

packetUtil.createProxyDhcpAck(testPacket, testbootfile);
Expand Down

0 comments on commit 82eea3b

Please sign in to comment.