1
0
mirror of https://github.com/rtr7/router7.git synced 2024-05-06 15:54:52 +00:00

internal/dhcp6: fix error case

Signed-off-by: Matt Layher <mdlayher@gmail.com>
This commit is contained in:
Matt Layher
2020-05-09 17:00:43 -04:00
parent 411780cd8e
commit b8c40958e8

View File

@ -168,7 +168,7 @@ const maxUDPReceivedPacketSize = 8192 // arbitrary size. Theoretically could be
func (c *Client) sendReceive(packet *dhcpv6.Message, expectedType dhcpv6.MessageType) (*dhcpv6.Message, error) {
if packet == nil {
return nil, fmt.Errorf("Packet to send cannot be nil")
return nil, fmt.Errorf("packet to send cannot be nil")
}
if expectedType == dhcpv6.MessageTypeNone {
// infer the expected type from the packet being sent