Skip to content

Commit

Permalink
Merge pull request #1637 from timopollmeier/result-ipv4-sort
Browse files Browse the repository at this point in the history
Sort the "host" column by IPv4 address if possible
  • Loading branch information
bjoernricks authored Jul 23, 2021
2 parents 374558b + 7d219e6 commit 0ee5cde
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- Fix VTs hash check and add --dump-vt-verification [#1611](https://github.com/greenbone/gvmd/pull/1611) [#1629](https://github.com/greenbone/gvmd/pull/1629)
- Fix memory errors in modify_permission [#1613](https://github.com/greenbone/gvmd/pull/1613)
- Fix sensor connection for performance reports on failure [#1633](https://github.com/greenbone/gvmd/pull/1633)
- Sort the "host" column by IPv4 address if possible [#1637](https://github.com/greenbone/gvmd/pull/1637)

[Unreleased]: https://github.com/greenbone/gvmd/compare/v20.8.2...gvmd-20.08

Expand Down
6 changes: 4 additions & 2 deletions src/manage_sql.c
Original file line number Diff line number Diff line change
Expand Up @@ -3060,7 +3060,8 @@ filter_clause (const char* type, const char* filter,
" ORDER BY CAST (%s AS INTEGER) ASC",
column);
}
else if (strcmp (keyword->string, "ip") == 0)
else if (strcmp (keyword->string, "ip") == 0
|| strcmp (keyword->string, "host") == 0)
{
gchar *column;
column = columns_select_column (select_columns,
Expand Down Expand Up @@ -3252,7 +3253,8 @@ filter_clause (const char* type, const char* filter,
" ORDER BY CAST (%s AS INTEGER) DESC",
column);
}
else if (strcmp (keyword->string, "ip") == 0)
else if (strcmp (keyword->string, "ip") == 0
|| strcmp (keyword->string, "host") == 0)
{
gchar *column;
column = columns_select_column (select_columns,
Expand Down

0 comments on commit 0ee5cde

Please sign in to comment.