Skip to content

netbios: fix unhashable list cache key in nbns_resolve (fixes #5202) - #5232

Open
laasyapriya2007 wants to merge 1 commit into
secdev:masterfrom
laasyapriya2007:fix-nbns-resolve-cache-hash
Open

laasyapriya2007 wants to merge 1 commit into
secdev:masterfrom
laasyapriya2007:fix-nbns-resolve-cache-hash

Conversation

@laasyapriya2007

Copy link
Copy Markdown
Contributor

Brief description of changes

Fixes #5202.

When nbns_resolve() is called with a list or tuple of query names, _nbns_cache.get(cache_ident) previously raised TypeError: unhashable type: 'list' because the list was directly placed in the cache tuple key.

This PR:

  • Normalizes elements of lists/tuples via any2i and converts the cache key to a hashable tuple.
  • Returns None early if an empty list of query names is provided.
  • Adds a regression test to test/scapy/layers/netbios.uts.

@laasyapriya2007
laasyapriya2007 force-pushed the fix-nbns-resolve-cache-hash branch from 667f7ea to 4602079 Compare October 18, 2026 06:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

netbios: nbns_resolve with a list of names now raises TypeError: unhashable type: 'list' (since #5115)

1 participant