Skip to content
This repository has been archived by the owner on Nov 29, 2021. It is now read-only.

Remove exclude hosts which do not belong to the target #377

Merged
merged 9 commits into from
Mar 29, 2021

Conversation

jjnicola
Copy link
Member

@jjnicola jjnicola commented Mar 26, 2021

What:
Remove invalid exclude hosts which do not belongs to the target

Why:
Excluded hosts which don't belong to the target generate interrupted scans, because a wrong scan progress calculation

How:

  • Create a target: 192.168.0.0/24
  • Exclude hosts: 192.168.0.1-192.168.0.200, 10.0.0.0/24 <--- this network is not in the target above.
  • Run the scan.

With the patch, the scan should end as expected. Without the patch, it ends as interrupted.

Checklist:

@codecov
Copy link

codecov bot commented Mar 26, 2021

Codecov Report

Merging #377 (537d7b3) into ospd-20.08 (f94c267) will increase coverage by 0.47%.
The diff coverage is 100.00%.

Impacted file tree graph

@@              Coverage Diff               @@
##           ospd-20.08     #377      +/-   ##
==============================================
+ Coverage       73.94%   74.41%   +0.47%     
==============================================
  Files              23       23              
  Lines            2610     2627      +17     
==============================================
+ Hits             1930     1955      +25     
+ Misses            680      672       -8     
Impacted Files Coverage Δ
ospd/ospd.py 71.74% <ø> (ø)
ospd/scan.py 93.07% <100.00%> (+0.48%) ⬆️
ospd/protocol.py 89.13% <0.00%> (+1.08%) ⬆️
ospd/network.py 77.45% <0.00%> (+2.54%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f94c267...537d7b3. Read the comment docs.

@jjnicola jjnicola marked this pull request as ready for review March 26, 2021 13:35
@jjnicola jjnicola requested a review from bjoernricks as a code owner March 26, 2021 13:35
@jjnicola jjnicola added backport-to-stable This pull request will be backported to the stable branch backport-to-main This pull request will be backported to the master branch labels Mar 29, 2021
Copy link
Member

@ArnoStiefvater ArnoStiefvater left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changelog entry missing.

@jjnicola jjnicola changed the title Remove invalid exclude hosts which do not belongs to the target Remove exclude hosts which do not belong to the target Mar 29, 2021
@ArnoStiefvater ArnoStiefvater merged commit 175ae2f into greenbone:ospd-20.08 Mar 29, 2021
@jjnicola jjnicola deleted the excluded branch March 29, 2021 10:20
jjnicola added a commit that referenced this pull request Mar 29, 2021
Remove exclude hosts which do not belong to the target (bp #377)
jjnicola added a commit that referenced this pull request Mar 29, 2021
Remove exclude hosts which do not belong to the target (bp #377)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
backport-to-main This pull request will be backported to the master branch backport-to-stable This pull request will be backported to the stable branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants