Hi! On 13/11/2023 22:59, Holger Hoffstätte via dnsdist wrote:
I'm running 1.8.2 and have a response rule:showResponseRules()# Name Matches Rule Action0 myRule 501 All Lua response scriptNow I try to remove it by name:rmResponseRule("myRule")Error: no rule matched Removing by index (0) works fine, but I only know the name. If I understand the docs and the source code correctly, this should work. Suggestion? Haven't started debugging yet, just wanted to make sure I'm not doing something wrong.
It's a bug indeed! The code doesn't properly test if the requested rule has been found and bails out if the rule is the last one in the list. I just opened a pull request [1] that fixes it for me. Thanks for reporting this issue!
[1]: https://github.com/PowerDNS/pdns/pull/13488 Best regards, -- Remi Gacogne PowerDNS.COM BV - https://www.powerdns.com/
OpenPGP_signature.asc
Description: OpenPGP digital signature
_______________________________________________ dnsdist mailing list dnsdist@mailman.powerdns.com https://mailman.powerdns.com/mailman/listinfo/dnsdist