File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -262,14 +262,14 @@ func (c *DpTcpClient) packetEliminate(ctx context.Context) {
262262}
263263
264264func (c * DpTcpClient ) packetEliminateMain (packet []byte ) {
265- c .writeToTun <- packet
266265 h := xxhash .Sum64 (packet )
267266 if _ , ok := c .packetMap .Get (h ); ok {
268267 c .packetMap .Del (h )
269268 c .TunLog .Debugf ("Eliminated packet %d" , h )
270269 c .TunLog .Tracef ("Eliminated packet %d, %x" , h , packet )
271270 return
272271 }
272+ c .writeToTun <- packet
273273 c .packetMap .Set (h , struct {}{})
274274 c .TunLog .Debugf ("Packet %d stored" , h )
275275 c .TunLog .Tracef ("Packet %d stored, %x" , h , packet )
Original file line number Diff line number Diff line change @@ -261,14 +261,14 @@ func (s *DpTcpServer) packetEliminate(ctx context.Context) {
261261}
262262
263263func (s * DpTcpServer ) packetEliminateMain (packet []byte ) {
264- s .writeToTun <- packet
265264 h := xxhash .Sum64 (packet )
266265 if _ , ok := s .packetMap .Get (h ); ok {
267266 s .packetMap .Del (h )
268267 s .TunLog .Debugf ("Eliminated packet %d" , h )
269268 s .TunLog .Tracef ("Eliminated packet %d, %x" , h , packet )
270269 return
271270 }
271+ s .writeToTun <- packet
272272 s .packetMap .Set (h , struct {}{})
273273 s .TunLog .Debugf ("Packet %d stored" , h )
274274 s .TunLog .Tracef ("Packet %d stored, %x" , h , packet )
You can’t perform that action at this time.
0 commit comments