- 
          
- 
                Notifications
    You must be signed in to change notification settings 
- Fork 2.2k
Fix various memory leaks when receiving packets #1847
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| Codecov Report
 @@            Coverage Diff             @@
##           master    #1847      +/-   ##
==========================================
- Coverage   85.75%   83.72%   -2.03%     
==========================================
  Files         185      182       -3     
  Lines       42476    41546     -930     
==========================================
- Hits        36424    34785    -1639     
- Misses       6052     6761     +709
 | 
| Codecov Report
 @@            Coverage Diff             @@
##           master    #1847      +/-   ##
==========================================
- Coverage   85.93%   85.91%   -0.02%     
==========================================
  Files         187      187              
  Lines       42744    42741       -3     
==========================================
- Hits        36732    36722      -10     
- Misses       6012     6019       +7
 | 
bae941e    to
    651eced      
    Compare
  
    | Ready to be reviewed | 
| self.ins = open_pcap(iface, MTU, self.promisc, 100, monitor=monitor) # noqa: E501 | ||
| # We need to have a different interface open because of an | ||
| # access violation in Npcap that occurs in multi-threading | ||
| # (see https://github.com/nmap/nmap/issues/982) | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That was fixed
| self.ins.close() | ||
| if out and out != ins: | ||
| self.outs.close() | ||
| self.closed = True | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Duplication with supersocket.py
| if started_callback: | ||
| started_callback() | ||
| while sniff_sockets: | ||
| continue_sniff = True | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is that the only relevant fix? =)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That’s for #1918
There’s a lot of unrelevant cleaning happening 😄 sorry for the messy PRs
| I made a mistake and pressed enter while the merged button was selected instead of comment =/ | 
| @p-l- do you agree on this PR? | 
| @guedou no worries, it looks like you have approved this PR and I merged it 2 minutes after. | 
| @guedou I think he merged it 😄 | 
| Latency results with Python 3.5: | 
| I should have splited the PRs :( | 
| I get very similar results before and after :/ Edit: but I do see a massive gap between 2.4.0 and master | 
| Could one of you look into this ? I fail to see how the performance has decreased that much since 2.4.0 l, and what is causing it :/ | 
| I will test it again, but from my first test your PR reduces the latency. | 
This PR:
countorstop_filterconditions are triggered insniff