Skip to content

Commit

Permalink
auth: match 2-bytes for challenge data
Browse files Browse the repository at this point in the history
  • Loading branch information
diredocks committed Oct 25, 2024
1 parent da3eace commit e353bb6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion internal/auth/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,8 @@ func (as *AuthService) HandlePacket(packet gopacket.Packet) error {
case layers.EAPCodeRequest:
l.server.Info("asking for something...")
case EAPCodeH3CData:
if eapPacket.TypeData[H3CIntegrityChanllengeHeader-1] == 0x35 {
if eapPacket.TypeData[H3CIntegrityChanllengeHeader-1] == 0x35 &&
eapPacket.TypeData[H3CIntegrityChanllengeHeader-2] == 0x2b {
// Generate ChallangeResponse
buffer, err := as.h3cInfo.ChallangeResponse(
eapPacket.TypeData[H3CIntegrityChanllengeHeader:][:H3CIntegrityChanllengeLength])
Expand Down

0 comments on commit e353bb6

Please sign in to comment.