-
Notifications
You must be signed in to change notification settings - Fork 328
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
check_dig.c: Fix string matching of -a parameter so that partial matches will not #652
Conversation
produce false "OK" status reports, such as when the -a string is 10.4.5.2 and the DNS result is 210.4.5.247.
Hi @kraken-jim, thanks for the patch! I agree that this is a bug, and the change in approach looks correct to me - will do more testing and merge closer to the next release. |
Hi, @sawolf. I'm honored to see that one of my patches is being considered for the 2.4.1 release. I'm writing in the hope that some documentation on this patch to TL/DR:
In a nutshell:
In a "left-match," the
In a "right-match," the
Here is a "left-match" case. We'll let
This example succeeds because the
Notice that parsing of the A typical right-hand match example would be
Finally, the user can also use a right-match to check that a DNS name appears in the rightmost value, such as testing the value of a CNAME or MX record:
Because of the formatting that This fails:
This works:
Left-match, just to make sure a
Right-match, to make sure the
Notice that because Even No reverse DNS == failure:
Checking for a right-hand match on a
|
This is definitely good for the next release. Thanks again for the patch as well as for the clear explanation! |
produce false "OK" status reports, such as when the -a string is
10.4.5.2 and the DNS result is 210.4.5.247.
Fixes #641