might actually happen?
Signed-off-by: Jens Langhammer <jens@goauthentik.io>
This commit is contained in:
21
internal/outpost/radius/eap/debug/debug.go
Normal file
21
internal/outpost/radius/eap/debug/debug.go
Normal 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))
|
||||
}
|
Reference in New Issue
Block a user