mirror of
https://github.com/soypat/lneto.git
synced 2026-08-07 00:13:43 +00:00
add clientID length check
This commit is contained in:
@@ -82,6 +82,8 @@ func (c *Client) BeginRequest(xid uint32, cfg RequestConfig) error {
|
||||
return errors.New("dhcp client must be closed/Init before new request")
|
||||
} else if xid == 0 {
|
||||
return errors.New("zero xid")
|
||||
} else if len(cfg.ClientID) > 32 {
|
||||
return errors.New("client ID too long")
|
||||
}
|
||||
c.reset(xid)
|
||||
c.state = StateInit
|
||||
|
||||
Reference in New Issue
Block a user