might actually happen?

Signed-off-by: Jens Langhammer <jens@goauthentik.io>
This commit is contained in:
Jens Langhammer
2025-05-14 02:00:20 +02:00
parent 767c0a8e45
commit 2bba0ddd74
15 changed files with 491 additions and 0 deletions

View File

@ -0,0 +1,21 @@
package debug
import (
"github.com/google/gopacket"
"github.com/google/gopacket/layers"
log "github.com/sirupsen/logrus"
"layeh.com/radius"
)
func DebugPacket(p *radius.Packet) {
log.Debug(p)
log.Debug(p.Attributes)
n, _ := p.Encode()
log.Debug(n)
packet := gopacket.NewPacket(n, layers.LayerTypeRADIUS, gopacket.Default)
layer := packet.Layer(layers.LayerTypeRADIUS)
if layer == nil {
return
}
log.Debug(layer.(*layers.RADIUS))
}