-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
Milestone
Description
While testing DHCP boot replies with ServeDHCP(), the responses received contain an unknown byte in the header. See below:
Relevant Test:
func TestServeDHCP(t *testing.T) {
dhcpServer := newDHCPServer()
p := dhcp.NewPacket(dhcp.BootReply)
expected := dhcp.ReplyPacket(p, dhcp.Offer, dhcpServer.ip,
dhcp.IPAdd(dhcpServer.start, dhcpServer.freeLease()),
dhcpServer.leaseDuration, dhcpServer.options.SelectOrderOrAll(nil))
actual := dhcpServer.ServeDHCP(p, dhcp.Discover, nil)
//TODO: Need a strong assertion
assert.ObjectsAreEqual(actual, expected)
}
Output:
Diff:
--- Expected
+++ Actual
@@ -2,3 +2,3 @@
00000000 02 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
- 00000010 ac 0a 00 27 00 00 00 00 00 00 00 00 00 00 00 00 |...'............|
+ 00000010 ac 0a 00 31 00 00 00 00 00 00 00 00 00 00 00 00 |...1............|
00000020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|