1. 10 Dec, 2020 3 commits
    • Ondřej Surý's avatar
      Use IP_RECVERR / IPV6_RECVERR to learn about ICMP destination unreachable · 06bd8da9
      Ondřej Surý authored
      BIND 9 uses a connect()ed UDP socket when sending recursive queries.
      The connect()ed socket provides feedback on a variety of ICMP
      errors (e.g.  port unreachable) which BIND 9 can then use to decide what
      to do with errors (report them to the client, try again with a different
      nameserver etc).
      
      However, Linux's implementation does not report what it considers
      "transient" conditions, which is defined as Destination Host
      Unreachable, Destination Network Unreachable, Source Route Failed and
      Message Too Big.
      
      BIND 9 now uses set setsockopt(fd, SOL_IP(V6), IP(V6)_RECVERR, &one,
      sizeof(one)); and receive a EPOLL_ERR, and recvmsg return value so that
      it notices that the send has failed immediately rather than waiting for
      a timeout.
      06bd8da9
    • Mark Andrews's avatar
      Merge branch 'marka-placeholder' into 'main' · e4557f42
      Mark Andrews authored
      Add placeholders for [GL !4454] and [GL #2324]
      
      See merge request !4485
      e4557f42
    • Mark Andrews's avatar
      4257415c
  2. 09 Dec, 2020 2 commits
  3. 08 Dec, 2020 4 commits
  4. 04 Dec, 2020 4 commits
  5. 03 Dec, 2020 14 commits
  6. 02 Dec, 2020 13 commits
    • Artem Boldariev's avatar
      Merge branch 'artem/random-additions-to-the-gitignore' into 'main' · aefe2b99
      Artem Boldariev authored
      Some small, random additions to the .gitignore.
      
      See merge request !4463
      aefe2b99
    • Artem Boldariev's avatar
      Some small, random additions to the .gitignore. · e6ac4480
      Artem Boldariev authored
      Ignores some auxiliary files generated/used by the following tools: -
      
      - clangd
      - GNU Global
      - Emacs
      e6ac4480
    • Michał Kępień's avatar
      Merge branch '2328-make-netmgr-initialize-and-cleanup-winsock-itself' into 'main' · 81c080e4
      Michał Kępień authored
      Make netmgr initialize and cleanup Winsock itself
      
      Closes #2328
      
      See merge request isc-projects/bind9!4458
      81c080e4
    • Michał Kępień's avatar
      Make netmgr initialize and cleanup Winsock itself · 88f96fab
      Michał Kępień authored
      On Windows, WSAStartup() needs to be called to initialize Winsock before
      any sockets are created or else socket() calls will return error code
      10093 (WSANOTINITIALISED).  Since BIND's Network Manager is intended to
      work as a reusable networking library, it should take care of calling
      WSAStartup() - and its cleanup counterpart, WSACleanup() - itself rather
      than relying on external code to do it.  Add the necessary WSAStartup()
      and WSACleanup() calls to isc_nm_start() and isc_nm_destroy(),
      respectively.
      88f96fab
    • Michał Kępień's avatar
      Extend log message for unexpected socket() errors · dc2e1dea
      Michał Kępień authored
      Make sure the error code is included in the message logged for
      unexpected socket creation errors in order to facilitate troubleshooting
      on Windows.
      dc2e1dea
    • Michal Nowak's avatar
      Merge branch... · d7f2db0e
      Michal Nowak authored
      Merge branch '2327-error-uv_wrap-h-no-such-file-or-directory-on-unit-gcc-tarball-ci-job' into 'main'
      
      Add uv_wrap.h to libisctest_la_SOURCES
      
      Closes #2327
      
      See merge request !4451
      d7f2db0e
    • Michal Nowak's avatar
      Add uv_wrap.h to libisctest_la_SOURCES · 84998255
      Michal Nowak authored
      uv_wrap.h is included in tcp_test.c and udp_test.c and therefore should
      be listed in lib/isc/tests/Makefile.am, otherwise unit test run from
      distribution tarball fails to compile:
      
      tcp_test.c:37:10: fatal error: uv_wrap.h: No such file or directory
       #include "uv_wrap.h"
                ^~~~~~~~~~~
      
      udp_test.c:37:10: fatal error: uv_wrap.h: No such file or directory
       #include "uv_wrap.h"
                ^~~~~~~~~~~
      84998255
    • Ondřej Surý's avatar
      Merge branch '2250-dns-flag-day-2020-revert-nocookie-udp-size' into 'main' · a6acff53
      Ondřej Surý authored
      Resolve "DNS Flag Day 2020 - EDNS buffer size configuring does not work anymore"
      
      Closes #2250
      
      See merge request isc-projects/bind9!4449
      a6acff53
    • Ondřej Surý's avatar
      Add CHANGES and release not for GL #2250 · c7d81f12
      Ondřej Surý authored
      c7d81f12
    • Ondřej Surý's avatar
      Change the default value for nocookie-udp-size back to 4096 · 79c196fc
      Ondřej Surý authored
      The DNS Flag Day 2020 reduced all the EDNS buffer sizes to 1232.  In
      this commit, we revert the default value for nocookie-udp-size back to
      4096 because the option is too obscure and most people don't realize
      that they also need to change this configuration option in addition to
      max-udp-size.
      79c196fc
    • Ondřej Surý's avatar
      Merge branch '2320-avoid-netievent-allocations-if-not-needed' into 'main' · a958d646
      Ondřej Surý authored
      Avoid netievent allocations when the callbacks can be called directly
      
      Closes #2320
      
      See merge request !4452
      a958d646
    • Ondřej Surý's avatar
      Add CHANGES note for GL #2320 · 4e801906
      Ondřej Surý authored
      4e801906
    • Ondřej Surý's avatar
      Fix the data race in accessing the isc_nm_t timers · 2e1dd56d
      Ondřej Surý authored
      The following TSAN report about accessing the mgr timers (mgr->init,
      mgr->idle, mgr->keepalive and mgr->advertised) has been fixed in this
      commit:
      
          ==================
          WARNING: ThreadSanitizer: data race (pid=2746)
          Read of size 4 at 0x7b440008a948 by thread T18:
          #0 isc__nm_tcpdns_read /home/ondrej/Projects/bind9/lib/isc/netmgr/tcpdns.c:849:25 (libisc.so.1706+0x2ba0f)
          #1 isc_nm_read /home/ondrej/Projects/bind9/lib/isc/netmgr/netmgr.c:1679:3 (libisc.so.1706+0x22258)
          #2 tcpdns_connect_connect_cb /home/ondrej/Projects/bind9/lib/isc/tests/tcpdns_test.c:363:2 (tcpdns_test+0x4bc5fb)
          #3 isc__nm_async_connectcb /home/ondrej/Projects/bind9/lib/isc/netmgr/netmgr.c:1816:2 (libisc.so.1706+0x228c9)
          #4 isc__nm_connectcb /home/ondrej/Projects/bind9/lib/isc/netmgr/netmgr.c:1791:3 (libisc.so.1706+0x22713)
          #5 tcpdns_connect_cb /home/ondrej/Projects/bind9/lib/isc/netmgr/tcpdns.c:343:2 (libisc.so.1706+0x2d89d)
          #6 uv__stream_connect /home/ondrej/Projects/tsan/libuv/src/unix/stream.c:1381:5 (libuv.so.1+0x27c18)
          #7 uv__stream_io /home/ondrej/Projects/tsan/libuv/src/unix/stream.c:1298:5 (libuv.so.1+0x25977)
          #8 uv__io_poll /home/ondrej/Projects/tsan/libuv/src/unix/linux-core.c:462:11 (libuv.so.1+0x2e795)
          #9 uv_run /home/ondrej/Projects/tsan/libuv/src/unix/core.c:385:5 (libuv.so.1+0x158ec)
          #10 nm_thread /home/ondrej/Projects/bind9/lib/isc/netmgr/netmgr.c:530:11 (libisc.so.1706+0x1c94a)
      
          Previous write of size 4 at 0x7b440008a948 by main thread:
          #0 isc_nm_settimeouts /home/ondrej/Projects/bind9/lib/isc/netmgr/netmgr.c:490:12 (libisc.so.1706+0x1dda5)
          #1 tcpdns_recv_two /home/ondrej/Projects/bind9/lib/isc/tests/tcpdns_test.c:601:2 (tcpdns_test+0x4bad0e)
          #2 cmocka_run_one_test_or_fixture <null> (libcmocka.so.0+0x70be)
          #3 __libc_start_main /build/glibc-vjB4T1/glibc-2.28/csu/../csu/libc-start.c:308:16 (libc.so.6+0x2409a)
      
          Location is heap block of size 281 at 0x7b440008a840 allocated by main thread:
          #0 malloc <null> (tcpdns_test+0x42864b)
          #1 default_memalloc /home/ondrej/Projects/bind9/lib/isc/mem.c:713:8 (libisc.so.1706+0x6d261)
          #2 mem_get /home/ondrej/Projects/bind9/lib/isc/mem.c:622:8 (libisc.so.1706+0x69b9c)
          #3 isc___mem_get /home/ondrej/Projects/bind9/lib/isc/mem.c:1044:9 (libisc.so.1706+0x6d379)
          #4 isc__mem_get /home/ondrej/Projects/bind9/lib/isc/mem.c:2432:10 (libisc.so.1706+0x6889e)
          #5 isc_nm_start /home/ondrej/Projects/bind9/lib/isc/netmgr/netmgr.c:203:8 (libisc.so.1706+0x1c219)
          #6 nm_setup /home/ondrej/Projects/bind9/lib/isc/tests/tcpdns_test.c:244:11 (tcpdns_test+0x4baaa4)
          #7 cmocka_run_one_test_or_fixture <null> (libcmocka.so.0+0x70fd)
          #8 __libc_start_main /build/glibc-vjB4T1/glibc-2.28/csu/../csu/libc-start.c:308:16 (libc.so.6+0x2409a)
      
          Thread T18 'isc-net-0000' (tid=3513, running) created by main thread at:
          #0 pthread_create <null> (tcpdns_test+0x429e7b)
          #1 isc_thread_create /home/ondrej/Projects/bind9/lib/isc/pthreads/thread.c:73:8 (libisc.so.1706+0x8476a)
          #2 isc_nm_start /home/ondrej/Projects/bind9/lib/isc/netmgr/netmgr.c:271:3 (libisc.so.1706+0x1c66a)
          #3 nm_setup /home/ondrej/Projects/bind9/lib/isc/tests/tcpdns_test.c:244:11 (tcpdns_test+0x4baaa4)
          #4 cmocka_run_one_test_or_fixture <null> (libcmocka.so.0+0x70fd)
          #5 __libc_start_main /build/glibc-vjB4T1/glibc-2.28/csu/../csu/libc-start.c:308:16 (libc.so.6+0x2409a)
      
          SUMMARY: ThreadSanitizer: data race /home/ondrej/Projects/bind9/lib/isc/netmgr/tcpdns.c:849:25 in isc__nm_tcpdns_read
          ==================
          ThreadSanitizer: reported 1 warnings
      2e1dd56d