Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix regression with MatchAny false conditions on match/regex/cidr_match #6498

Merged
merged 1 commit into from Jul 27, 2018

Conversation

dnsmichi
Copy link
Contributor

@dnsmichi dnsmichi commented Jul 27, 2018

michi@mbmif ~/coding/icinga/icinga2 (master *=) $ icinga2 console
Icinga 2 (version: v2.9.1-42-g1d22b6e17)
Type $help to view available commands.
<1> => var r = [ "a", "b" ]
null
<2> => match("c", r, MatchAny)
false
<3> => match("c", r, MatchAll)
false
<4> => match("a", r, MatchAny)
true
<5> => match("a", r, MatchAll)
false

<7> => regex("^c", r, MatchAny)
false
<8> => regex("^c", r, MatchAll)
false
<9> => regex("^a", r, MatchAll)
false
<10> => regex("^a", r, MatchAny)
true

<11> => var i = [ "192.168.56.101", "192.168.33.102" ]

<13> => cidr_match("192.168.56.0/29", i, MatchAny)
false
<14> => cidr_match("192.168.56.0/29", i, MatchAll)
false
<15> => cidr_match("192.168.56.0/24", i, MatchAll)
false
<16> => cidr_match("192.168.56.0/24", i, MatchAny)
true

fixes #6496

@dnsmichi dnsmichi added this to the 2.9.2 milestone Jul 27, 2018
@dnsmichi dnsmichi added bug Something isn't working area/configuration DSL, parser, compiler, error handling labels Jul 27, 2018
@dnsmichi dnsmichi requested a review from Crunsher July 27, 2018 15:06
Copy link
Contributor

@Crunsher Crunsher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested for match, regex and cidr match

@Crunsher Crunsher merged commit 2e3a1ff into master Jul 27, 2018
@Crunsher Crunsher deleted the bugfix/match-regex-match-any-regression branch July 27, 2018 15:28
@dnsmichi dnsmichi added the backported Fix was included in a bugfix release label Jul 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/configuration DSL, parser, compiler, error handling backported Fix was included in a bugfix release bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

error with match and type matchany
2 participants