From 2b79d0c5123b3325361b75ff70dc36df498e1f89 Mon Sep 17 00:00:00 2001 From: soypat Date: Sun, 20 Jul 2025 10:34:41 -0300 Subject: [PATCH] add DHCPv4 reset call --- dhcpv4/client.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/dhcpv4/client.go b/dhcpv4/client.go index 5539616..e517ab7 100644 --- a/dhcpv4/client.go +++ b/dhcpv4/client.go @@ -69,6 +69,11 @@ type RequestConfig struct { ClientID string } +// Reset clears all DHCP state and disconnects from Stack (increments ConnectionID). +func (c *Client) Reset() { + c.reset(0) +} + func (c *Client) BeginRequest(xid uint32, cfg RequestConfig) error { if len(cfg.Hostname) > 36 { return errors.New("requested hostname too long")