PowerDNS / pdns

PowerDNS Authoritative, PowerDNS Recursor, dnsdist
https://www.powerdns.com/
GNU General Public License v2.0
3.62k stars 904 forks source link

Can't clear all response rules #14610

Closed goldpandas closed 2 weeks ago

goldpandas commented 2 weeks ago

Short description

I'm trying to use clearResponseRules() function to clear all response rules but I'm getting a error:

> clearResponseRules()
Error: [string "return clearResponseRules()"]:1: attempt to call global 'clearResponseRules' (a nil value)
stack traceback:
        [string "return clearResponseRules()"]:1: in main chunk>

Environment

Steps to reproduce

  1. Add a response rule:
    > addResponseAction(QNameRule('www.example.com.'), ClearRecordTypesResponseAction(DNSQType.HTTPS))
  2. Check the rule exists:
    > showResponseRules()
    #   Name                             Matches Rule                                                     Action
    0                                          0 qname==www.example.com.                                  clear record types
  3. Try the clear all the response rule:
    > clearResponseRules()
    Error: [string "return clearResponseRules()"]:1: attempt to call global 'clearResponseRules' (a nil value)
    stack traceback:
        [string "return clearResponseRules()"]:1: in main chunk>

Expected behaviour

Remove all response rules.

Actual behaviour

Returns the error:

Error: [string "return clearResponseRules()"]:1: attempt to call global 'clearResponseRules' (a nil value)
stack traceback:
        [string "return clearResponseRules()"]:1: in main chunk>

Other information

Habbie commented 2 weeks ago

Software version: 1.9.6-1pdns.jammy

https://dnsdist.org/reference/rules-management.html?highlight=clearresponserules#clearResponseRules

clearResponseRules is new in 1.10 (not yet released)

goldpandas commented 2 weeks ago

My bad, did not see the correct version there. Closing this.