Skip to content

Commit

Permalink
Incorporate the Relay Agent Information obtained from the request int…
Browse files Browse the repository at this point in the history
  • Loading branch information
robertvolkmann authored Dec 14, 2023
1 parent 49ab074 commit 236fb18
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions dhcp4/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ const (
OptVendorIdentifier Option = 60 // string
OptClientIdentifier Option = 61 // string
OptFQDN Option = 81 // string
OptAgentInformation Option = 82 // struct

// You shouldn't need to use the following directly. Instead,
// refer to the fields in the Packet struct, and Marshal/Unmarshal
Expand Down
5 changes: 5 additions & 0 deletions pixiecore/dhcp.go
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,11 @@ func (s *Server) offerDHCP(pkt *dhcp4.Packet, mach Machine, serverIP net.IP, fwt
resp.Options[97] = pkt.Options[97]
}

// https://www.rfc-editor.org/rfc/rfc3046.html#section-2.2
if pkt.Options[dhcp4.OptAgentInformation] != nil {
resp.Options[dhcp4.OptAgentInformation] = pkt.Options[dhcp4.OptAgentInformation]
}

switch fwtype {
case FirmwareX86PC:
// This is completely standard PXE: we tell the PXE client to
Expand Down

0 comments on commit 236fb18

Please sign in to comment.