summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--dhcpv4/option_relay_agent_information_test.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/dhcpv4/option_relay_agent_information_test.go b/dhcpv4/option_relay_agent_information_test.go
index 9146a24..88cb39a 100644
--- a/dhcpv4/option_relay_agent_information_test.go
+++ b/dhcpv4/option_relay_agent_information_test.go
@@ -14,7 +14,7 @@ func TestParseOptRelayAgentInformation(t *testing.T) {
2, 4, 'b', 'o', 'o', 't',
}
- // short bytes
+ // short option bytes
opt, err := ParseOptRelayAgentInformation([]byte{})
require.Error(t, err)
@@ -26,6 +26,10 @@ func TestParseOptRelayAgentInformation(t *testing.T) {
opt, err = ParseOptRelayAgentInformation([]byte{82, 3, 1, 0})
require.Error(t, err)
+ // short sub-option bytes
+ opt, err = ParseOptRelayAgentInformation([]byte{82, 1, 1})
+ require.Error(t, err)
+
// short sub-option length
opt, err = ParseOptRelayAgentInformation([]byte{82, 2, 1, 1})
require.Error(t, err)