client-subnet WIP: mainly cache changes
Status: all deckard tests succeed (non-ECS). Design plan: - It was decided to deviate from rfc7871, as full implementation would be potentially very cache-hungry (there are very many meaningful IP prefixes). Instead, a geo DB will be used to partition IPs into discrete categories. That's what the authoritative NSs use AFAIK. - For now the granularity would be a country, as used by https://www.maxmind.com/en/geoip2-databases - Cache deduplicates equal records for different locations. That's implemented by splitting the mapping into two: usual key + location -> hash, and usual key + hash -> RRdata. Timestamp and TTL of the RRset is stored in the first part, and the stored RRs have TTLs zeroed. (All this forced changes in lib/cache.h API.)
Showing
- Makefile 2 additions, 0 deletionsMakefile
- lib/cache.c 363 additions, 186 deletionslib/cache.c
- lib/cache.h 67 additions, 66 deletionslib/cache.h
- lib/client_subnet.h 18 additions, 0 deletionslib/client_subnet.h
- lib/layer/pktcache.c 28 additions, 30 deletionslib/layer/pktcache.c
- lib/layer/rrcache.c 25 additions, 23 deletionslib/layer/rrcache.c
- lib/resolve.c 4 additions, 2 deletionslib/resolve.c
- lib/rplan.c 2 additions, 0 deletionslib/rplan.c
- lib/rplan.h 1 addition, 0 deletionslib/rplan.h
- lib/utils.h 6 additions, 2 deletionslib/utils.h
- lib/zonecut.c 28 additions, 18 deletionslib/zonecut.c
- modules/client_subnet/client_subnet.c 209 additions, 0 deletionsmodules/client_subnet/client_subnet.c
- modules/client_subnet/client_subnet.mk 5 additions, 0 deletionsmodules/client_subnet/client_subnet.mk
- modules/modules.mk 6 additions, 0 deletionsmodules/modules.mk
- tests/test_cache.c 48 additions, 47 deletionstests/test_cache.c
Please register or sign in to comment