diff --git a/transport/dhcp/server.go b/transport/dhcp/server.go index b07412f42c..1a2c2938b2 100644 --- a/transport/dhcp/server.go +++ b/transport/dhcp/server.go @@ -87,9 +87,15 @@ func (t *Transport) Start() error { } func (t *Transport) Reset() { + for _, transport := range t.transports { + transport.Reset() + } } func (t *Transport) Close() error { + for _, transport := range t.transports { + transport.Close() + } if t.interfaceCallback != nil { t.router.InterfaceMonitor().UnregisterCallback(t.interfaceCallback) } @@ -266,6 +272,9 @@ func (t *Transport) recreateServers(iface *net.Interface, serverAddrs []netip.Ad } transports = append(transports, serverTransport) } + for _, transport := range t.transports { + transport.Close() + } t.transports = transports return nil }