diff options
Diffstat (limited to 'dhcpv4')
-rw-r--r-- | dhcpv4/options_test.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/dhcpv4/options_test.go b/dhcpv4/options_test.go index 258fcfd..a4bf6d7 100644 --- a/dhcpv4/options_test.go +++ b/dhcpv4/options_test.go @@ -79,6 +79,14 @@ func TestParseOption(t *testing.T) { require.Equal(t, 4, opt.Length(), "Length") require.Equal(t, option, opt.ToBytes(), "ToBytes") + // Requested IP address lease time + option = []byte{51, 4, 0, 0, 0, 0} + opt, err = ParseOption(option) + require.NoError(t, err) + require.Equal(t, OptionIPAddressLeaseTime, opt.Code(), "Code") + require.Equal(t, 4, opt.Length(), "Length") + require.Equal(t, option, opt.ToBytes(), "ToBytes") + // Message type option = []byte{53, 1, 1} opt, err = ParseOption(option) |