Change Unknown/unknown to behave the same on both linux and windows #12
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.
Bug
There were differences in the number of attack graphs generated between users running SAGE on Linux and Windows. We believe this was due to the "Unknown/unknown" protocol and how Linux and Windows handle case sensitivity of file names.
Proposed fix
In case the IANA mapping doesn't have a port, instead of overriding it with "Unknown", override it with "unknown". This way there is no confusion with case sensitivity.
Example of wrong behaviour
For example, on a Linux machine, one would get 167 attack graphs for the 2017 dataset, while on a Windows machine, one would get 162.
Example behaviour after fix
After the fix, the results are consistent between Linux and Windows users, with both machines getting 162 attack graphs.