Skip to content

Instantly share code, notes, and snippets.

@calmh
Created October 9, 2024 18:17
Show Gist options
  • Save calmh/62dda5aa6e125beb0986c3bce72e770e to your computer and use it in GitHub Desktop.
Save calmh/62dda5aa6e125beb0986c3bce72e770e to your computer and use it in GitHub Desktop.
commit da03f982379373774ce86c7242aacb56d054ea46
Author: Jakob Borg <jborg@coreweave.com>
Date: Wed Oct 9 20:16:24 2024 +0200
wip
diff --git a/server.go b/server.go
index c68c1c2..e919211 100644
--- a/server.go
+++ b/server.go
@@ -100,6 +100,7 @@ func (s *Server) handleDHCPv4(logger *zap.Logger) server4.Handler {
dhcpv4.WithMessageType(respType),
dhcpv4.WithNetmask(c.ClientAddr.Mask),
dhcpv4.WithLeaseTime(60*60*24*7), // 604800 seconds == one week
+ dhcpv4.WithOption(dhcpv4.Option{Code: dhcpv4.OptionRenewTimeValue, Value: dhcpv4.Uint32(1800)}), // 30 minutes
)
if err != nil {
logger.Error("Failed to generate DHCP reply from request", zap.Error(err))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment