Skip to content
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

Smooth progress icmp #389

Merged
merged 5 commits into from
Aug 26, 2020

Conversation

ArnoStiefvater
Copy link
Member

@ArnoStiefvater ArnoStiefvater commented Aug 24, 2020

What:

Continuously send new dead hosts to ospd-openvas to gradually update the progress bar for the case that only ICMP was chosen as alive test.

Why:

To get a better user experience when looking at the progress bar for the most common case of ICMP ping.

How:

Tested with scans via gvm-cli and looked if the count of dead hosts which are send to ospd-openvas are correct.

  • Few hosts in target list and many hosts in target list
  • max_scan_hosts set and not set
  • max_scan_hosts reached in last batch of packet and in previous batch of packets.

Checklist:

@ArnoStiefvater ArnoStiefvater mentioned this pull request Aug 24, 2020
2 tasks
Only add unique alive hosts which are also present
in the target list.
We use short circuit evaluation to not add hosts
in the alive hosts hash table which are not also
in the list of target hosts.
This way we make sure to only have the alive hosts
which we are looking for in our hash table of
alive host.
It could happen that during the last batch the
limit is reached. If the max_scan_hosts limit
got reached we can not send the true number of
dead hosts to ospd-openvas. We need to include
the alive hosts which are above the limit as
dead hosts for the progress bar.

E.g. curr_alive=110 prev_alive=90 max_scan_hosts=100 batch=100.
Normally we would send 80 as dead in this batch (20 new
alive hosts) but because of the restriction we send 90 as
dead. The 10 hosts which are over the limit are considered
as dead.
@ArnoStiefvater ArnoStiefvater marked this pull request as ready for review August 26, 2020 07:09
@ArnoStiefvater ArnoStiefvater merged commit 97892cc into greenbone:master Aug 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants