René's URL Explorer Experiment


Title: SimpleResolver: UDP response larger than the EDNS buffer fails with WireParseException instead of falling back to TCP · Issue #418 · dnsjava/dnsjava · GitHub

Open Graph Title: SimpleResolver: UDP response larger than the EDNS buffer fails with WireParseException instead of falling back to TCP · Issue #418 · dnsjava/dnsjava

X Title: SimpleResolver: UDP response larger than the EDNS buffer fails with WireParseException instead of falling back to TCP · Issue #418 · dnsjava/dnsjava

Description: Summary When a UDP response is larger than the EDNS payload size the query advertised, SimpleResolver fails with WireParseException ("end of input" / "truncated record"). It does not retry over TCP. From the caller's point of view the lo...

Open Graph Description: Summary When a UDP response is larger than the EDNS payload size the query advertised, SimpleResolver fails with WireParseException ("end of input" / "truncated record"). It does not retry over TCP...

X Description: Summary When a UDP response is larger than the EDNS payload size the query advertised, SimpleResolver fails with WireParseException ("end of input" / "truncated record"). It doe...

Opengraph URL: https://github.com/dnsjava/dnsjava/issues/418

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.113.3


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"SimpleResolver: UDP response larger than the EDNS buffer fails with WireParseException instead of falling back to TCP","articleBody":"### Summary\n\nWhen a UDP response is larger than the EDNS payload size the query advertised, `SimpleResolver` fails with `WireParseException` (\"end of input\" / \"truncated record\"). It does not retry over TCP. From the caller's point of view the lookup just fails (`Lookup.getResult() == TRY_AGAIN`, `getErrorString() == \"network error\"`), even though the same query over TCP would succeed.\n\nThis can happen with a recursive resolver that appears to return UDP responses larger than the requester's advertised payload size. A resolver that does this isn't RFC 6891-compliant. Even so, dnsjava turns it into a hard failure, and the caller can't do anything about it because it never sees the raw bytes.\n\n### Versions\n\n- dnsjava 3.6.3 (reproduced)\n- The same code paths are unchanged on current `master`\n\n### What happens\n\n1. `SimpleResolver` sends the query over UDP with the default EDNS payload size (1280).\n2. `NioUdpClient.Transaction.processReadyKey()` reads into `ByteBuffer.allocate(max)`, where `max` is that payload size. `DatagramChannel.read()` silently discards the part of the datagram that doesn't fit.\n3. `SimpleResolver.sendAsync()` parses the cut-off bytes before it checks `Flags.TC`. Parsing throws `WireParseException`, so the existing \"Got truncated response ..., retrying via TCP\" path is never reached.\n4. `Lookup` maps the `IOException` to `TRY_AGAIN` / \"network error\".\n\nThe TC-based retry doesn't help here because the TC bit is never evaluated. A resolver that sends the full response over UDP typically doesn't set TC anyway.\n\n### Reproduction\n\nA UDP-only stub that answers any query with ~2.7 KB of TXT records, ignores the EDNS payload size, and never sets TC:\n\n```python\n# oversized_stub.py\nimport socket, struct\ns = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)\ns.bind((\"127.0.0.1\", 15353))\nwhile True:\n    q, addr = s.recvfrom(4096)\n    i = 12\n    while q[i] != 0:\n        i += q[i] + 1\n    question = q[12:i + 5]\n    answers = b\"\"\n    for n in range(24):\n        txt = (\"record-%02d=\" % n + \"x\" * 90).encode()\n        rdata = bytes([len(txt)]) + txt\n        answers += b\"\\xc0\\x0c\" + struct.pack(\">HHIH\", 16, 1, 60, len(rdata)) + rdata\n    header = q[0:2] + b\"\\x81\\x80\" + struct.pack(\">HHHH\", 1, 24, 0, 0)  # QR RD RA, no TC\n    s.sendto(header + question + answers, addr)\n```\n\n```java\n// Repro.java\nimport org.xbill.DNS.*;\n\npublic class Repro {\n  public static void main(String[] args) throws Exception {\n    SimpleResolver resolver = new SimpleResolver(\"127.0.0.1\");\n    resolver.setPort(15353);\n    Message query = Message.newQuery(\n        org.xbill.DNS.Record.newRecord(Name.fromString(\"example.com.\"), Type.TXT, DClass.IN));\n    try {\n      System.out.println(\"answers=\" + resolver.send(query).getSection(Section.ANSWER).size());\n    } catch (Exception e) {\n      System.out.println(e.getClass().getName() + \": \" + e.getMessage());\n    }\n  }\n}\n```\n\n`dig +bufsize=4096 -p 15353 @127.0.0.1 example.com TXT` shows the stub's full response (`ANSWER: 24`, `MSG SIZE rcvd: 2741`, no `tc` flag).\n\nOutput with dnsjava 3.6.3 (`org.xbill.DNS.SimpleResolver` at DEBUG):\n\n```\nDEBUG SimpleResolver - Sending example.com./TXT, id=22819 to udp/127.0.0.1:15353\norg.xbill.DNS.WireParseException: end of input\n```\n\nThere is no \"retrying via TCP\" line. Through `Lookup`, the result is `records=null result=2 error=network error`.\n\nDepending on where the cut falls, the exception can also be `WireParseException: truncated record`.\n\n### Expected\n\nA UDP response that didn't fit in the receive buffer should be handled like a truncated response and retried over TCP, the same as a response with TC set. The retry should respect `ignoreTruncation`.\n\n### Related\n\n#240 reported the same exception, but from application code parsing a received message itself. In this case the cut-off happens inside dnsjava's own UDP client, so the caller has no way to detect or handle it.\n","author":{"url":"https://github.com/pssamudr","@type":"Person","name":"pssamudr"},"datePublished":"2026-09-30T20:58:35Z","url":"https://github.com/dnsjava/dnsjava/issues/418"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:7cd618c6-4462-8ff4-26bf-2e0e0ab2c106
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id8F50:118E6F:4DDAD2:69E6D8:6B060746
html-safe-noncedffc8150ecdd31a64735d980fc94cfe695116e76ba01bd25ad6957ff210a7fdf
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4RjUwOjExOEU2Rjo0RERBRDI6NjlFNkQ4OjZCMDYwNzQ2IiwidmlzaXRvcl9pZCI6IjgwMTA3NDA1NzE1NDk1OTk1NTgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac79b1ae2ee8d29f9edf0febbf5958f0325da4047c2cae2cfd2f557141f0062e1c
hovercard-subject-tagissue:5652948219
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/dnsjava/dnsjava/418/issue_layout
twitter:imagehttps://opengraph.githubassets.com/cc275acfe10ca52e07700c4eb5eeb27c709c0eb591a956b3d8eada913f247b1f/dnsjava/dnsjava/issues/418
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/cc275acfe10ca52e07700c4eb5eeb27c709c0eb591a956b3d8eada913f247b1f/dnsjava/dnsjava/issues/418
og:image:altSummary When a UDP response is larger than the EDNS payload size the query advertised, SimpleResolver fails with WireParseException ("end of input" / "truncated record"). It does not retry over TCP...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamepssamudr
hostnamegithub.com
expected-hostnamegithub.com
None47127d2f2009e000f3401193f8b4163109ac669adad0804de1ee0e6333ca7b9e
turbo-cache-controlno-preview
go-importgithub.com/dnsjava/dnsjava git https://github.com/dnsjava/dnsjava.git
octolytics-dimension-user_id6755615
octolytics-dimension-user_logindnsjava
octolytics-dimension-repository_id17084567
octolytics-dimension-repository_nwodnsjava/dnsjava
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id17084567
octolytics-dimension-repository_network_root_nwodnsjava/dnsjava
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release0760ea46a027ba5099cdef7abd54f27865eb4f44
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/dnsjava/dnsjava/issues/418#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fdnsjava%2Fdnsjava%2Fissues%2F418
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fdnsjava%2Fdnsjava%2Fissues%2F418
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=dnsjava%2Fdnsjava
Reloadhttps://github.com/dnsjava/dnsjava/issues/418
Reloadhttps://github.com/dnsjava/dnsjava/issues/418
Reloadhttps://github.com/dnsjava/dnsjava/issues/418
dnsjavahttps://github.com/dnsjava
dnsjavahttps://github.com/dnsjava/dnsjava
Codehttps://github.com/dnsjava/dnsjava
Issues16 (16)https://github.com/dnsjava/dnsjava/issues
Pull requests3 (3)https://github.com/dnsjava/dnsjava/pulls
Actionshttps://github.com/dnsjava/dnsjava/actions
Security and quality8 (8)https://github.com/dnsjava/dnsjava/security
Insightshttps://github.com/dnsjava/dnsjava/insights
https://github.com/dnsjava/dnsjava
New issuehttps://github.com/login?return_to=https://github.com/dnsjava/dnsjava/issues/418
New issuehttps://github.com/login?return_to=https://github.com/dnsjava/dnsjava/issues/418
#421https://github.com/dnsjava/dnsjava/pull/421
SimpleResolver: UDP response larger than the EDNS buffer fails with WireParseException instead of falling back to TCPhttps://github.com/dnsjava/dnsjava/issues/418#top
#421https://github.com/dnsjava/dnsjava/pull/421
https://github.com/ibauersachs
https://github.com/pssamudr
pssamudrhttps://github.com/pssamudr
on Sep 30, 2026https://github.com/dnsjava/dnsjava/issues/418#issue-5652948219
#240https://github.com/dnsjava/dnsjava/issues/240
https://github.com/ibauersachs
ibauersachshttps://github.com/ibauersachs
on Oct 20, 2026https://github.com/dnsjava/dnsjava/issues/418#issuecomment-6301665389
@allenfluxhttps://github.com/allenflux
ibauersachshttps://github.com/ibauersachs
on Oct 20, 2026https://github.com/dnsjava/dnsjava/issues/418#event-33786388102
https://github.com/allenflux
allenfluxhttps://github.com/allenflux
on Oct 21, 2026https://github.com/dnsjava/dnsjava/issues/418#issuecomment-6305811583
#418https://github.com/dnsjava/dnsjava/issues/418
#421https://github.com/dnsjava/dnsjava/pull/421
@pssamudrhttps://github.com/pssamudr
https://github.com/pssamudr
pssamudrhttps://github.com/pssamudr
on Oct 21, 2026https://github.com/dnsjava/dnsjava/issues/418#issuecomment-6305868225
https://github.com/ibauersachs
ibauersachshttps://github.com/ibauersachs
on Oct 24, 2026https://github.com/dnsjava/dnsjava/issues/418#issuecomment-6385401786
@allenfluxhttps://github.com/allenflux
Sign up for freehttps://github.com/signup?return_to=https://github.com/dnsjava/dnsjava/issues/418
Sign in to commenthttps://github.com/login?return_to=https://github.com/dnsjava/dnsjava/issues/418
ibauersachshttps://github.com/ibauersachs
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Response headers:
Servergithub.com
Content-Typetext/html; charset=utf-8
Cache-Controlmax-age=0, private, must-revalidate

Viewport: width=device-width


URLs of crawlers that visited me.