mirror of
https://github.com/slackhq/nebula.git
synced 2026-05-16 04:47:38 +02:00
checkpt, try to parse packets only once
This commit is contained in:
@@ -348,11 +348,12 @@ func (f *Interface) listenOut(i int) {
|
||||
lhh := f.lightHouse.NewRequestHandler()
|
||||
h := &header.H{}
|
||||
fwPacket := &firewall.Packet{}
|
||||
parsedRx := &batch.RxParsed{}
|
||||
nb := make([]byte, 12, 12)
|
||||
|
||||
listener := func(fromUdpAddr netip.AddrPort, payload []byte, meta udp.RxMeta) {
|
||||
plaintext := f.batchers[i].Reserve(len(payload))
|
||||
f.readOutsidePackets(ViaSender{UdpAddr: fromUdpAddr}, plaintext[:0], payload, h, fwPacket, lhh, nb, i, ctCache.Get(), meta)
|
||||
f.readOutsidePackets(ViaSender{UdpAddr: fromUdpAddr}, plaintext[:0], payload, h, fwPacket, parsedRx, lhh, nb, i, ctCache.Get(), meta)
|
||||
}
|
||||
|
||||
flusher := func() {
|
||||
|
||||
Reference in New Issue
Block a user