Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
BIND
BIND
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 631
    • Issues 631
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 105
    • Merge Requests 105
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • CI / CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • ISC Open Source Projects
  • BINDBIND
  • Merge Requests
  • !3810

Open
Opened Jul 06, 2020 by wodry@wodry
  • Report abuse
Report abuse

[doc] Fix dig documentation for "+tries" with TCP queries

  • Overview 0
  • Commits 1
  • Pipelines 4
  • Changes 2

The dig command line options tries (and therefore also retry, see my !3809 for simplifying this redundance) is not only effective for UDP queries, like said in the man page, but the same way also for TCP queries.

Steps to reproduce:

Setup a firewall rule that drops all traffic to a random IP address that we want to timeout when querying with dig. Here it is 1.2.3.4: iptables -I OUTPUT -d 1.2.3.4/32 -j DROP

Now we query with dig 9.14.8 and +tcp +tries=1:

time dig +tcp +timeout=1 +tries=1 @1.2.3.4 example.com

; <<>> DiG 9.14.8 <<>> +tcp +timeout +tries @1.2.3.4 example.com
; (1 server found)
;; global options: +cmd
;; connection timed out; no servers could be reached
;; Connection to 1.2.3.4#53(1.2.3.4) for example.com failed: timed out.

real    0m1,004s

Dig times out after 1 s, as expected with timeout=1s and tries=1.

Now we query with dig 9.14.8 and +tcp +tries=5:

time dig +tcp +timeout=1 +tries=5 @1.2.3.4 example.com
;; Connection to 1.2.3.4#53(1.2.3.4) for example.com failed: timed out.
;; Connection to 1.2.3.4#53(1.2.3.4) for example.com failed: timed out.
;; Connection to 1.2.3.4#53(1.2.3.4) for example.com failed: timed out.
;; Connection to 1.2.3.4#53(1.2.3.4) for example.com failed: timed out.

; <<>> DiG 9.14.8 <<>> +tcp +timeout +tries @1.2.3.4 example.com
; (1 server found)
;; global options: +cmd
;; connection timed out; no servers could be reached
;; Connection to 1.2.3.4#53(1.2.3.4) for example.com failed: timed out.

real    0m5,004s

Dig times out after 5 s, as expected with timeout=1s and tries=5.

So, tries sets the timeout also of TCP queries, not only UDP queries.

Edited Jul 08, 2020 by wodry
Assignee
Assign to
Reviewer
Request review from
None
Milestone
None
Assign milestone
Time tracking
Reference: isc-projects/bind9!3810
Source branch: fix-man-page-tries