diff options
Diffstat (limited to 'dhcpv4/dhcpv4.go')
-rw-r--r-- | dhcpv4/dhcpv4.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/dhcpv4/dhcpv4.go b/dhcpv4/dhcpv4.go index b15c9e2..eb02bdc 100644 --- a/dhcpv4/dhcpv4.go +++ b/dhcpv4/dhcpv4.go @@ -247,7 +247,10 @@ func NewRequestFromOffer(offer *DHCPv4, modifiers ...Modifier) (*DHCPv4, error) // NewReplyFromRequest builds a DHCPv4 reply from a request. func NewReplyFromRequest(request *DHCPv4, modifiers ...Modifier) (*DHCPv4, error) { - return New(PrependModifiers(modifiers, WithReply(request))...) + return New(PrependModifiers(modifiers, + WithReply(request), + WithGatewayIP(request.GatewayIPAddr), + )...) } // FromBytes encodes the DHCPv4 packet into a sequence of bytes, and returns an |