Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What:
Fix stop resume feature by sending the correct exclude list to ospd-openvas.
Why:
Fix bug.
How did you test it:
It can be reproduced with any scan which has multiple hosts and is stopped and resumed. The following only makes it a bit simpler to see in the openvas.log.
max_checks = 1
max_hosts = 1
scan config: only host_alive_detection.nasl (formally ping_host.nasl)
scan_alive_hosts_only = no
target: something like 192.168.56.10-110
exclude hosts: something like 192.168.56.10-20
Start task. Stop task after some percentage. Resume task. See in the openvas.log that all previously finished hosts are scanned again. The finished hosts are not taken into account at all. Its basically the same as starting the task again (not resuming).
For every hosts which is scanned again there are duplicate results in the report.
With the fix resume works as intended.
Checklist: