-
Notifications
You must be signed in to change notification settings - Fork 157
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
Add target's alive test method before starting a scan #947
Conversation
src/manage.c
Outdated
@@ -4103,6 +4104,10 @@ launch_osp_openvas_task (task_t task, target_t target, const char *scan_id, | |||
hosts_str = target_hosts (target); | |||
ports_str = target_port_range (target); | |||
exclude_hosts_str = target_exclude_hosts (target); | |||
|
|||
if (target_alive_tests (target) >= 0) |
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.
alive_test should be init'd if condition is false.
289e1cb
to
947e092
Compare
src/manage.c
Outdated
@@ -4071,6 +4071,7 @@ launch_osp_openvas_task (task_t task, target_t target, const char *scan_id, | |||
{ | |||
osp_connection_t *connection; | |||
char *hosts_str, *ports_str, *exclude_hosts_str, *finished_hosts_str; | |||
int alive_test = 0; |
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.
For consistency, please keep initialisations out of the declaration block in gvmd. Like how config and connection are done below.
I know some places in gvmd do it, but I've been trying to prevent new code from doing it because it got messy.
@mattmundell Thanks for the reviews! |
Depends on pr greenbone/gvm-libs#312