mac resolution
This commit is contained in:
@@ -31,8 +31,9 @@ const (
|
||||
var errInvalidModifier = errors.New("invalid modifier")
|
||||
|
||||
type udpContext struct {
|
||||
Verdict udpVerdict
|
||||
Packet []byte
|
||||
Verdict udpVerdict
|
||||
Packet []byte
|
||||
SrcMAC, DstMAC net.HardwareAddr
|
||||
}
|
||||
|
||||
type udpStreamFactory struct {
|
||||
@@ -50,6 +51,8 @@ func (f *udpStreamFactory) New(ipFlow, udpFlow gopacket.Flow, udp *layers.UDP, u
|
||||
info := ruleset.StreamInfo{
|
||||
ID: id.Int64(),
|
||||
Protocol: ruleset.ProtocolUDP,
|
||||
SrcMAC: append(net.HardwareAddr(nil), uc.SrcMAC...),
|
||||
DstMAC: append(net.HardwareAddr(nil), uc.DstMAC...),
|
||||
SrcIP: ipSrc,
|
||||
DstIP: ipDst,
|
||||
SrcPort: uint16(udp.SrcPort),
|
||||
|
||||
Reference in New Issue
Block a user