From 5fc807037ef6898f30f4772cb929fc1068b73bf9 Mon Sep 17 00:00:00 2001 From: TomyLobo Date: Wed, 8 Jan 2025 19:25:30 +0100 Subject: [PATCH] Fix linter errors Signed-off-by: TomyLobo --- internal/app/machined/pkg/controllers/network/operator/dhcp4.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/internal/app/machined/pkg/controllers/network/operator/dhcp4.go b/internal/app/machined/pkg/controllers/network/operator/dhcp4.go index f193d5fe5d..634db0e04d 100644 --- a/internal/app/machined/pkg/controllers/network/operator/dhcp4.go +++ b/internal/app/machined/pkg/controllers/network/operator/dhcp4.go @@ -541,7 +541,9 @@ func (d *DHCP4) requestRenew(ctx context.Context, hostname network.HostnameStatu d.lease, err = client.RequestFromOffer(ctx, d.lease.Offer, mods...) case len(d.AddressSpecs()) >= 1: d.logger.Debug("DHCP REQUEST WITH PREVIOUS IP", zap.String("link", d.linkName)) + var firstIPAddress net.IP = d.AddressSpecs()[0].Address.Addr().AsSlice() + d.lease, err = client.Request(ctx, dhcpv4.PrependModifiers(mods, dhcpv4.WithOption(dhcpv4.OptRequestedIPAddress(firstIPAddress)), )...)