Skip to content

Commit

Permalink
Merge pull request #1640 from greenbone/mergify/bp/gvmd-20.08/pr-1637
Browse files Browse the repository at this point in the history
Sort the "host" column by IPv4 address if possible (backport #1637)
  • Loading branch information
bjoernricks authored Jul 23, 2021
2 parents 3af2f57 + 61abcc4 commit 773d909
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 @@ -17,6 +17,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 @@ -3120,7 +3120,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 @@ -3312,7 +3313,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 773d909

Please sign in to comment.