1. 19 Jun, 2020 11 commits
    • Evan Hunt's avatar
      Merge branch 'each-rndc-netmgr-pt1' into 'main' · 5238433f
      Evan Hunt authored
      client-side TCP
      
      Closes #1958
      
      See merge request isc-projects/bind9!3723
      5238433f
    • Evan Hunt's avatar
      CHANGES · 8b9e2d33
      Evan Hunt authored
      8b9e2d33
    • Evan Hunt's avatar
      change the signature of recv callbacks to include a result code · 75c985c0
      Evan Hunt authored
      this will allow recv event handlers to distinguish between cases
      in which the region is NULL because of error, shutdown, or cancelation.
      75c985c0
    • Evan Hunt's avatar
      implement isc_nm_cancelread() · 5191ec8f
      Evan Hunt authored
      The isc_nm_cancelread() function cancels reading on a connected
      socket and calls its read callback function with a 'result'
      parameter of ISC_R_CANCELED.
      5191ec8f
    • Evan Hunt's avatar
      shorten the sleep in isc_nm_destroy() · 870204fe
      Evan Hunt authored
      when isc_nm_destroy() is called, there's a loop that waits for
      other references to be detached, pausing and unpausing the netmgr
      to ensure that all the workers' events are run, followed by a
      1-second sleep. this caused a delay on shutdown which will be
      noticeable when netmgr is used in tools other than named itself,
      so the delay has now been reduced to a hundredth of a second.
      870204fe
    • Evan Hunt's avatar
      implement isc_nm_tcpconnect() · abbb79f9
      Evan Hunt authored
      the isc_nm_tcpconnect() function establishes a client connection via
      TCP.  once the connection is esablished, a callback function will be
      called with a newly created network manager handle.
      abbb79f9
    • Witold Krecicki's avatar
      allow tcpdns sockets to self-reference while connected · cd79b495
      Witold Krecicki authored
      A TCPDNS socket creates a handle for each complete DNS message.
      
      Previously, when all the handles were disconnected, the socket
      would be closed, but the wrapped TCP socket might still have
      more to read.
      
      Now, when a connection is established, the TCPDNS socket creates
      a reference to itself by attaching itself to sock->self. This
      reference isn't cleared until the connection is closed via
      EOF, timeout, or server shutdown. This allows the socket to remain
      open even when there are no active handles for it.
      cd79b495
    • Evan Hunt's avatar
      modify reference counting within netmgr · 5ea26ee1
      Evan Hunt authored
      - isc__nmhandle_get() now attaches to the sock in the nmhandle object.
        the caller is responsible for dereferencing the original socket
        pointer when necessary.
      - tcpdns listener sockets attach sock->outer to the outer tcp listener
        socket. tcpdns connected sockets attach sock->outerhandle to the handle
        for the tcp connected socket.
      - only listener sockets need to be attached/detached directly. connected
        sockets should only be accessed and reference-counted via their
        associated handles.
      5ea26ee1
    • Evan Hunt's avatar
      make isc_nmsocket_{attach,detach}{} functions private · 9e740cad
      Evan Hunt authored
      there is no need for a caller to reference-count socket objects.
      they need tto be able tto close listener sockets (i.e., those
      returned by isc_nm_listen{udp,tcp,tcpdns}), and an isc_nmsocket_close()
      function has been added for that. other sockets are only accessed via
      handles.
      9e740cad
    • Mark Andrews's avatar
      Merge branch 'marka-placeholder' into 'main' · be032d64
      Mark Andrews authored
      placeholder for [GL #1955]
      
      See merge request isc-projects/bind9!3720
      be032d64
    • Mark Andrews's avatar
      placeholder for [GL #1955] · 642279dd
      Mark Andrews authored
      642279dd
  2. 18 Jun, 2020 29 commits