1. 07 May, 2019 1 commit
  2. 25 Apr, 2019 7 commits
    • Ondřej Surý's avatar
    • Evan Hunt's avatar
      restore allowance for tcp-clients < interfaces · 59434b98
      Evan Hunt authored
      in the "refactor tcpquota and pipeline refs" commit, the counting
      of active interfaces was tightened in such a way that named could
      fail to listen on an interface if there were more interfaces than
      tcp-clients. when checking the quota to start accepting on an
      interface, if the number of active clients was above zero, then
      it was presumed that some other client was able to handle accepting
      new connections. this, however, ignored the fact that the current client
      could be included in that count, so if the quota was already exceeded
      before all the interfaces were listening, some interfaces would never
      listen.
      
      we now check whether the current client has been marked active; if so,
      then the number of active clients on the interface must be greater
      than 1, not 0.
      
      (cherry picked from commit 0b4e2cd4)
      (cherry picked from commit d01023aa)
      59434b98
    • Evan Hunt's avatar
      refactor tcpquota and pipeline refs; allow special-case overrun in isc_quota · c47ccf63
      Evan Hunt authored
      - if the TCP quota has been exceeded but there are no clients listening
        for new connections on the interface, we can now force attachment to the
        quota using isc_quota_force(), instead of carrying on with the quota not
        attached.
      - the TCP client quota is now referenced via a reference-counted
        'ns_tcpconn' object, one of which is created whenever a client begins
        listening for new connections, and attached to by members of that
        client's pipeline group. when the last reference to the tcpconn
        object is detached, it is freed and the TCP quota slot is released.
      - reduce code duplication by adding mark_tcp_active() function.
      - convert counters to atomic.
      
      (cherry picked from commit 7e822237)
      (cherry picked from commit 49394512)
      (cherry picked from commit 13f7c918)
      c47ccf63
    • Evan Hunt's avatar
      better tcpquota accounting and client mortality checks · 2ab8a085
      Evan Hunt authored
      - ensure that tcpactive is cleaned up correctly when accept() fails.
      - set 'client->tcpattached' when the client is attached to the tcpquota.
        carry this value on to new clients sharing the same pipeline group.
        don't call isc_quota_detach() on the tcpquota unless tcpattached is
        set.  this way clients that were allowed to accept TCP connections
        despite being over quota (and therefore, were never attached to the
        quota) will not inadvertently detach from it and mess up the
        accounting.
      - simplify the code for tcpquota disconnection by using a new function
        tcpquota_disconnect().
      - before deciding whether to reject a new connection due to quota
        exhaustion, check to see whether there are at least two active
        clients. previously, this was "at least one", but that could be
        insufficient if there was one other client in READING state (waiting
        for messages on an open connection) but none in READY (listening
        for new connections).
      - before deciding whether a TCP client object can to go inactive, we
        must ensure there are enough other clients to maintain service
        afterward -- both accepting new connections and reading/processing new
        queries.  A TCP client can't shut down unless at least one
        client is accepting new connections and (in the case of pipelined
        clients) at least one additional client is waiting to read.
      
      (cherry picked from commit c7394738)
      (cherry picked from commit e965d5f1)
      (cherry picked from commit 87d43116)
      2ab8a085
    • Michał Kępień's avatar
      use reference counter for pipeline groups (v3) · 366b4e1e
      Michał Kępień authored
      Track pipeline groups using a shared reference counter
      instead of a linked list.
      
      (cherry picked from commit 513afd33)
      (cherry picked from commit 9446629b)
      366b4e1e
    • Witold Krecicki's avatar
      tcp-clients could still be exceeded (v2) · 719f604e
      Witold Krecicki authored
      the TCP client quota could still be ineffective under some
      circumstances.  this change:
      
      - improves quota accounting to ensure that TCP clients are
        properly limited, while still guaranteeing that at least one client
        is always available to serve TCP connections on each interface.
      - uses more descriptive names and removes one (ntcptarget) that
        was no longer needed
      - adds comments
      
      (cherry picked from commit 924651f1)
      (cherry picked from commit 55a7a458)
      719f604e
    • Witold Krecicki's avatar
      fix enforcement of tcp-clients (v1) · ec2d50da
      Witold Krecicki authored
      tcp-clients settings could be exceeded in some cases by
      creating more and more active TCP clients that are over
      the set quota limit, which in the end could lead to a
      DoS attack by e.g. exhaustion of file descriptors.
      
      If TCP client we're closing went over the quota (so it's
      not attached to a quota) mark it as mortal - so that it
      will be destroyed and not set up to listen for new
      connections - unless it's the last client for a specific
      interface.
      
      (cherry picked from commit f97131d2)
      (cherry picked from commit 9689ffc4)
      ec2d50da
  3. 23 Apr, 2019 1 commit
  4. 19 Apr, 2019 4 commits
  5. 12 Apr, 2019 1 commit
  6. 11 Mar, 2019 1 commit
  7. 27 Feb, 2019 1 commit
  8. 21 Feb, 2019 3 commits
  9. 18 Feb, 2019 1 commit
  10. 26 Jan, 2019 1 commit
    • Evan Hunt's avatar
      fix rpzrecurse test · aa1cf3c6
      Evan Hunt authored
      - backport from v9_12 changes to enable rpzrecurse test to
        suspend and resume servers on win32
      - use rndc to stop servers
      aa1cf3c6
  11. 15 Jan, 2019 1 commit
    • Tony Finch's avatar
      Fix a few cosmetic issues with `rndc managed-keys` · f72c687f
      Tony Finch authored
      The handling of class and view arguments was broken, because the code
      didn't realise that next_token() would overwrite the class name when
      it parsed the view name. The code was trying to implement a syntax
      like `refresh [[class] view]`, but it was documented to have a syntax
      like `refresh [class [view]]`. The latter is consistent with other rndc
      commands, so that is how I have fixed it.
      
      Before:
      
      $ rndc managed-keys refresh in rec
      rndc: 'managed-keys' failed: unknown class/type
      unknown class 'rec'
      
      After:
      
      $ rndc managed-keys refresh in rec
      refreshing managed keys for 'rec'
      
      There were missing newlines in the output from `rndc managed-keys
      refresh` and `rndc managed-keys destroy`.
      
      Before:
      
      $ rndc managed-keys refresh
      refreshing managed keys for 'rec'refreshing managed keys for 'auth'
      
      After:
      
      $ rndc managed-keys refresh
      refreshing managed keys for 'rec'
      refreshing managed keys for 'auth'
      
      (cherry picked from commit 6a3b851f)
      (cherry picked from commit bc984ace)
      f72c687f
  12. 14 Jan, 2019 1 commit
  13. 09 Jan, 2019 1 commit
  14. 01 Jan, 2019 1 commit
  15. 19 Dec, 2018 2 commits
  16. 14 Dec, 2018 1 commit
  17. 11 Dec, 2018 2 commits
  18. 03 Dec, 2018 1 commit
    • Tony Finch's avatar
      catz: improved log message when a zone is overridden · be4822fa
      Tony Finch authored
      If you have a catalog zone containing 10.in-addr.arpa and an
      explicitly-configured version which overrides the catz version,
      `named` used to log:
      
      catz: error "success" while trying to add zone "10.in-addr.arpa"
      
      After this patch it logs:
      
      catz: zone "10.in-addr.arpa" is overridden by explicitly configured zone
      (cherry picked from commit 16eb3518)
      be4822fa
  19. 21 Nov, 2018 1 commit
  20. 14 Nov, 2018 1 commit
  21. 08 Nov, 2018 3 commits
  22. 05 Nov, 2018 1 commit
  23. 30 Oct, 2018 1 commit
  24. 29 Oct, 2018 1 commit
  25. 25 Oct, 2018 1 commit
    • Michał Kępień's avatar
      Display a per-view list of zones in the web interface · 149aa691
      Michał Kępień authored
      The XSL stylesheet used by the web interface does not currently include
      any element which would cause a list of zones configured in each view to
      be displayed, making the "Zones" section of the web interface empty
      unless some zone has been configured with "zone-statistics full;" and
      queried.  Since this can be confusing, modify the XSL stylesheet so that
      a list of zones configured in each view is displayed in the web
      interface.
      
      (cherry picked from commit aeda3f38)
      149aa691