Skip to content
forked from infinet/dnsmasq

dnsmasq fork with fast ipset/server/address lookup

License

GPL-2.0, GPL-3.0 licenses found

Licenses found

GPL-2.0
COPYING
GPL-3.0
COPYING-v3
Notifications You must be signed in to change notification settings

zjfdirk/dnsmasq

Repository files navigation

DNSMASQ fork for improving --ipsets and --server performance

Current status

The --ipsets and --server lookup has been rewritten. It scales well with thousands of --ipsets and --server entries.

           _______root_______
          /                  \
        com                   org
      /  |  \                /    \
     /   |   \              /      \
yahoo google twitter     debian  freebsd
  |      |                  |        |
 www    mail               cn       www
                            |
                           ftp

The lookup steps over domain name hierarchy top-down. All labels are stored in open addressing hash tables. Sub-level labels that belong to different parent nodes are stored separately. e.g. yahoo, google, and twitter are in one hash table, while debian and freebsd are in another.

The hash table size is power of 2, two hash functions are used to compute hash bucket. For locating a particular label from hash table, two hash values are compared first, only if they are match, should the more expensive string comparison be used to confirm the search.

The search should take constant time regardless the size of --ipset and --server rules.

Issues

[Contact me](mailto: [email protected])

About

dnsmasq fork with fast ipset/server/address lookup

Resources

License

GPL-2.0, GPL-3.0 licenses found

Licenses found

GPL-2.0
COPYING
GPL-3.0
COPYING-v3

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 92.5%
  • Perl 3.1%
  • HTML 1.6%
  • Shell 1.3%
  • Makefile 0.7%
  • Python 0.5%
  • Other 0.3%