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

Add debug logs for allow_simultaneous_ips = no #685

Merged
merged 1 commit into from
Mar 22, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- Add insert_tcp_options and insert_tcp_v6_options nasl functions. [#618](https://github.com/greenbone/openvas/pull/618)
- Add get_tcp_option and extend dump_tcp_packet nasl functions. [#621](https://github.com/greenbone/openvas/pull/621)
- Add new scanner only option for spawning NASL functions with a different owner. [#634](https://github.com/greenbone/openvas/pull/634)
- Add debug logs for allow_simultaneous_ips=no. [#685](https://github.com/greenbone/openvas/pull/685)

### Changed
- Store results in main_kb instead of host_kb. [#550](https://github.com/greenbone/openvas/pull/550)
Expand Down
11 changes: 9 additions & 2 deletions src/attack.c
Original file line number Diff line number Diff line change
Expand Up @@ -1272,20 +1272,27 @@ attack_network (struct scan_globals *globals)
{
struct in6_addr hostip;
char ip_str[INET6_ADDRSTRLEN];
int flag_set;

gvm_host_get_addr6 (host, &hostip);
addr6_to_str (&hostip, ip_str);

// Re-add host at the end of the queue and reallocate the flag
// if it was already set.
int flag_set = finish_signal_on_queue (alive_hosts_kb);
flag_set = finish_signal_on_queue (alive_hosts_kb);

put_host_on_queue (alive_hosts_kb, ip_str);
g_debug ("Reallocating the host %s at the end of the queue",
ip_str);

gvm_host_free (host);
host = NULL;

if (flag_set)
realloc_finish_signal_on_queue (alive_hosts_kb);
{
g_debug ("Reallocating finish signal in the host queue");
realloc_finish_signal_on_queue (alive_hosts_kb);
}
}
else
break;
Expand Down