summaryrefslogtreecommitdiffhomepage
path: root/pkg/dhcp/client.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/dhcp/client.go')
-rw-r--r--pkg/dhcp/client.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/pkg/dhcp/client.go b/pkg/dhcp/client.go
index 3330c4998..6d48eec7e 100644
--- a/pkg/dhcp/client.go
+++ b/pkg/dhcp/client.go
@@ -141,6 +141,9 @@ func (c *Client) Request(ctx context.Context, requestedAddr tcpip.Address) (cfg
}, nil); err != nil {
return Config{}, fmt.Errorf("dhcp: connect failed: %v", err)
}
+ if err := ep.SetSockOpt(tcpip.BroadcastOption(1)); err != nil {
+ return Config{}, fmt.Errorf("dhcp: setsockopt SO_BROADCAST: %v", err)
+ }
epin, err := c.stack.NewEndpoint(udp.ProtocolNumber, ipv4.ProtocolNumber, &wq)
if err != nil {