Nmap Development mailing list archives

[PATCH] scan_engine.cc get_(ping_)?pcap_result() goodseq cleanup


From: Daniel Roethlisberger <daniel () roe ch>
Date: Mon, 9 Feb 2009 00:11:53 +0100

I am still failing to fully understand all the nitty-gritty
details of some of the code in scan_engine.cc.  There is a lot of
copy-pasted duplicate code, sometimes with minor differences
between the various appearances of the same code...

Would the attached patch break anything?

- Remove instances of `goodseq' which appear to be now defunct
  remainders of previous trynum/pingseq decoding code (cf. TCP
  sections of the functions).
- Move the declarations of `goodseq' into the only context (code
  block) which actually uses it.  This makes the code slightly
  easier to understand, since it makes it obvious that `goodseq'
  is only of local interest.
- Add decoding and verification of trynum/pingseq to UDP
  response handling (if no magic port was set).

Let me know if I have missed something.

-- 
Daniel Roethlisberger
http://daniel.roe.ch/

Attachment: scan_engine.cc-goodseq-cleanup.diff
Description:


_______________________________________________
Sent through the nmap-dev mailing list
http://cgi.insecure.org/mailman/listinfo/nmap-dev
Archived at http://SecLists.Org

Current thread: