File tree Expand file tree Collapse file tree 3 files changed +7
-0
lines changed Expand file tree Collapse file tree 3 files changed +7
-0
lines changed Original file line number Diff line number Diff line change 1
1
v3.x.y - YYYY-MMM-DD (to be released)
2
2
-------------------------------------
3
3
4
+ - Support comments in ipMatchFromFile file via '#' token
5
+ [Issue #2554 - @tomsommer, @martinhsv]
4
6
- Fix: FILES_TMP_CONTENT collection key should use part name
5
7
[Issue #2831 - @airween]
6
8
- Use AS_HELP_STRING instead of obsolete AC_HELP_STRING macro
Original file line number Diff line number Diff line change @@ -88,6 +88,10 @@ IpTree::~IpTree() {
88
88
bool IpTree::addFromBuffer (std::istream *ss, std::string *error) {
89
89
char *error_msg = NULL ;
90
90
for (std::string line; std::getline (*ss, line); ) {
91
+ size_t comment_start = line.find (' #' );
92
+ if (comment_start != std::string::npos) {
93
+ line = line.substr (0 , comment_start);
94
+ }
91
95
int res = add_ip_from_param (line.c_str (), &m_tree, &error_msg);
92
96
if (res != 0 ) {
93
97
if (error_msg != NULL ) {
Original file line number Diff line number Diff line change 1
1
127.0.0.1
2
+ # Comment line
2
3
10.10.10.1
3
4
::1
4
5
200.249.12.31
You can’t perform that action at this time.
0 commit comments