mirror of
				https://github.com/openobserve/goflow2.git
				synced 2025-11-04 05:53:14 +00:00 
			
		
		
		
	Silently drop 0 byte packets without processing as flow (#114)
Co-authored-by: Ian Pye <pye@kentik.com>
This commit is contained in:
		@@ -166,6 +166,9 @@ func UDPStoppableRoutine(stopCh <-chan struct{}, name string, decodeFunc decoder
 | 
			
		||||
			u := udpData{}
 | 
			
		||||
			u.size, u.pktAddr, _ = udpconn.ReadFromUDP(payload)
 | 
			
		||||
			if stopped.Load() == false {
 | 
			
		||||
				if u.size == 0 { // Ignore 0 byte packets.
 | 
			
		||||
					continue
 | 
			
		||||
				}
 | 
			
		||||
				u.payload = make([]byte, u.size)
 | 
			
		||||
				copy(u.payload, payload[0:u.size])
 | 
			
		||||
				udpDataCh <- u
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user