Skip to content

Commit

Permalink
Pull request 2189: 5345-ipset-file-comments
Browse files Browse the repository at this point in the history
Updates AdguardTeam#5345.

Squashed commit of the following:

commit 66ceac9
Merge: 8be4dce 82247d7
Author: Stanislav Chzhen <s.chzhen@adguard.com>
Date:   Fri Apr 5 19:05:48 2024 +0300

    Merge branch 'master' into 5345-ipset-file-comments

commit 8be4dce
Author: Stanislav Chzhen <s.chzhen@adguard.com>
Date:   Tue Apr 2 14:56:21 2024 +0300

    all: upd chlog

commit 53c7213
Author: Stanislav Chzhen <s.chzhen@adguard.com>
Date:   Tue Apr 2 14:48:56 2024 +0300

    dnsforward: ipset file comments
  • Loading branch information
schzhn committed Apr 5, 2024
1 parent 82247d7 commit 6f36ebc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Expand Up @@ -23,6 +23,12 @@ See also the [v0.107.49 GitHub milestone][ms-v0.107.49].
NOTE: Add new changes BELOW THIS COMMENT.
-->

### Added

- Support for comments in the ipset file ([#5345]).

[#5345]: https://github.com/AdguardTeam/AdGuardHome/issues/5345

<!--
NOTE: Add new changes ABOVE THIS COMMENT.
-->
Expand Down
1 change: 1 addition & 0 deletions internal/dnsforward/config.go
Expand Up @@ -452,6 +452,7 @@ func (s *Server) prepareIpsetListSettings() (err error) {
}

ipsets := stringutil.SplitTrimmed(string(data), "\n")
ipsets = stringutil.FilterOut(ipsets, IsCommentOrEmpty)

log.Debug("dns: using %d ipset rules from file %q", len(ipsets), fn)

Expand Down

0 comments on commit 6f36ebc

Please sign in to comment.