Commit Graph

55 Commits

Author SHA1 Message Date
W.C.A. Wijngaards
a335e601e4 ipset-pf-support, move startup and destartup to the front of the module
func block functions, modstack call deinit function names, and detect
module change when no startup functions are needed.
2024-07-03 13:53:44 +02:00
W.C.A. Wijngaards
ff653a7ef8 Call module init init again, and new function startup and destartup.
NULL can be used if the function is not used. Open shared ports during
reload. Deinit is called during reload.
2024-07-01 16:10:07 +02:00
W.C.A. Wijngaards
3953f827fb Merge branch 'master' of https://github.com/madroach/unbound into ipset-pf-support 2024-07-01 14:36:33 +02:00
W.C.A. Wijngaards
7c5e765b3b - Fix cachedb with serve-expired-client-timeout disabled. The edns
subnet module deletes global cache and cachedb cache when it
  stores a result, and serve-expired is enabled, so that the global
  reply, that is older than the ecs reply, does not return after
  the ecs reply expires.
2024-04-26 13:32:15 +02:00
Wouter Wijngaards
ced9762b14
Merge pull request #1041 from NLnetLabs/stubfwd-unshare
Stub and Forward unshare
2024-04-25 11:11:00 +02:00
W.C.A. Wijngaards
52aff65e35 - Fix edns subnet to sort rrset references when storing messages
in the cache. This fixes a race condition in the rrset locks.
2024-04-22 13:44:42 +02:00
W.C.A. Wijngaards
f2fb498c69 - fast-reload, unshare forwards, making the structure locked, with an rwlock. 2024-04-03 13:55:54 +02:00
W.C.A. Wijngaards
eb3e1ae24f - Fix #1032: The size of subnet_msg_cache calculation mistake cause
memory usage increased beyond expectations.
2024-03-27 11:45:34 +01:00
W.C.A. Wijngaards
6d0812b567 - Fix edns subnet so that queries with a source prefix of zero cause
the recursor send no edns subnet option to the upstream.
2023-10-09 12:21:22 +02:00
George Thessalonikefs
a952ac17be Merge branch 'tilan7663-subnet_cache_prefetch' into subnet_cache_prefetch 2023-07-07 16:50:58 +02:00
George Thessalonikefs
40e47bf767 - For #664: easier code flow for subnetcache prefetching.
- For #664: add testcase.
2023-07-06 22:22:21 +02:00
Philip Homburg
fb06364014 Fix issue #825: interaction between ECS and serve-expired. 2023-02-21 09:20:28 +01:00
George Thessalonikefs
d7a9def160 - Clear documentation for interactivity between the subnet module and
the serve-expired and prefetch configuration options.
2022-11-30 14:45:36 +01:00
Yorgos Thessalonikefs
c4e51a4cfe
PROXYv2 downstream support (#760) 2022-10-03 15:29:47 +02:00
W.C.A. Wijngaards
0f08cc6d55 - Fix edns subnet so that scope 0 answers only match sourcemask 0
queries for answers from cache if from a query with sourcemask 0.
2022-08-02 14:13:55 +02:00
Philip Homburg
3bade62c8a Fix use after free issue with edns options (https://github.com/NLnetLabs/unbound/issues/663) 2022-06-22 15:00:28 +02:00
George Thessalonikefs
459b73018f - Fix for edns client subnet to respect not looking in its cache when
instructed to do so (e.g., prefetch).
2022-06-03 16:11:35 +02:00
George Thessalonikefs
91c298c901 Merge branch 'subnet_cache_prefetch' of https://github.com/tilan7663/unbound into tilan7663-subnet_cache_prefetch 2022-05-17 16:16:09 +03:00
George Thessalonikefs
daf316ea1b - Fix #417: prefetch and ECS causing cache corruption when used
together.
2022-05-12 00:56:01 +02:00
Tian Lan
8afbc0944f Add prefetch support for subnet cache entries
- Entries in the subnet cache should now be prefetched.

- Rename testdata subnet_*.crpl to subnet_*.rpl so they are visible to
  make test

Signed-off-by: Tian Lan <tian.lan@twosigma.com>
2022-04-29 11:46:05 -04:00
W.C.A. Wijngaards
7749d98a14 - Fix for edns client subnet option add fix in removal code, from review. 2022-02-28 14:51:35 +01:00
W.C.A. Wijngaards
8e8ccfe3c3 - Fix edns client subnet to add the option based on the option list,
so that it is not state dependent, after the state fix of #605 for
  double EDNS options.
2022-02-28 14:39:48 +01:00
Dimitris Apostolou
c21d6af617
Fix typos 2021-11-13 16:56:15 +02:00
W.C.A. Wijngaards
55ba863440 - Fix that nxdomain synthesis does not happen above the stub or
forward definition.
2021-04-13 13:52:57 +02:00
George Thessalonikefs
d69132b921 - Fix #384: (1) A minor request to improve the log (2) A minor bug in
one log message.
2021-02-24 12:00:11 +01:00
Christopher Zimmermann
1d23e0c920 Merge remote-tracking branch 'upstream/master' 2021-02-03 13:19:19 +01:00
Ralph Dolmans
99fd6cf711 - Cache ECS answers with longest scope of CNAME chain. 2020-05-15 13:13:49 +02:00
Christopher Zimmermann
c96e4ca121 allow privileged initialisation of modules 2020-05-10 22:30:25 +02:00
gthess
f7fe95ad7b
Serve stale (#159)
- Added serve-stale functionality as described in
  draft-ietf-dnsop-serve-stale-10. `serve-expired-*` options can be used
  to configure the behavior.
- Updated cachedb to honor `serve-expired-ttl`; Fixes #107.
- Renamed statistic `num.zero_ttl` to `num.expired` as expired replies
  come with a configurable TTL value (`serve-expired-reply-ttl`).
- Fixed stats when replying with cached, cname-aliased records.
- Added missing default values for redis cachedb backend.
2020-02-05 14:20:27 +01:00
W.C.A. Wijngaards
e3453711e5 - Fix edns-subnet locks, in error cases the lock was not unlocked. 2019-05-07 16:10:22 +02:00
Wouter Wijngaards
0ff5c52657 - Fix #4208: 'stub-no-cache' and 'forward-no-cache' not work.
git-svn-id: file:///svn/unbound/trunk@4981 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-11-27 10:29:14 +00:00
Ralph Dolmans
640d1cf929 - Bugfix min-client-subnet-ipv6
git-svn-id: file:///svn/unbound/trunk@4958 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-11-06 09:44:10 +00:00
Ralph Dolmans
6021341118 - Add min-client-subnet-ipv6 and min-client-subnet-ipv4 options.
git-svn-id: file:///svn/unbound/trunk@4951 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-10-25 08:53:50 +00:00
Ralph Dolmans
140a165ab2 - Add markdel function to ECS slabhash.
- Limit ECS scope returned to client to the scope used for caching.      
 - Make lint like previous #4154 fix. 


git-svn-id: file:///svn/unbound/trunk@4946 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-10-24 13:50:18 +00:00
Wouter Wijngaards
5fec1c8b1f - Fix #4154: make ECS_MAX_TREESIZE configurable, with
the max-ecs-tree-size-ipv4 and max-ecs-tree-size-ipv6 options.


git-svn-id: file:///svn/unbound/trunk@4945 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-10-22 14:54:28 +00:00
Wouter Wijngaards
8893735a2d edns-subnet retain rcode when no return_msg, for log-servfail.
git-svn-id: file:///svn/unbound/trunk@4868 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-08-21 14:25:07 +00:00
Wouter Wijngaards
00ba747be7 - #4146: num.query.subnet and num.query.subnet_cache counters.
git-svn-id: file:///svn/unbound/trunk@4867 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-08-21 14:14:28 +00:00
Wouter Wijngaards
5b7942d197 - Fixes for clang static analyzer, the missing ; in
edns-subnet/addrtree.c after the assert made clang analyzer
  produce a failure to analyze it.


git-svn-id: file:///svn/unbound/trunk@4538 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-02-16 10:31:48 +00:00
Wouter Wijngaards
b02f855df8 Fix more critical regions. Cleans tests.
git-svn-id: file:///svn/unbound/trunk@4498 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-02-02 11:08:50 +00:00
Wouter Wijngaards
632ea0d02e - lock subnet new item before insertion to please checklocks,
no modification of critical regions outside of lock region.


git-svn-id: file:///svn/unbound/trunk@4497 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-02-02 10:52:44 +00:00
Ralph Dolmans
3427b992f7 - Fix #1400: allowing use of global cache on ECS-forwarding unless
always-forward.


git-svn-id: file:///svn/unbound/trunk@4352 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-09-18 09:09:10 +00:00
Wouter Wijngaards
7d17a926ac - Spelling fixes, from Phil Porada.
git-svn-id: file:///svn/unbound/trunk@4344 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-09-15 14:29:28 +00:00
Wouter Wijngaards
acada5a8f6 - Free callback in edns-subnetmod on exit and restart.
git-svn-id: file:///svn/unbound/trunk@4229 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-06-16 07:31:30 +00:00
Ralph Dolmans
998793998d - Added domain name based ECS whitelist.
git-svn-id: file:///svn/unbound/trunk@4217 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-06-08 14:44:55 +00:00
Ralph Dolmans
dae84a96fb - Fix #1253: unused variable in edns-subnet/addrtree.c:getbit().
git-svn-id: file:///svn/unbound/trunk@4126 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-04-18 13:25:09 +00:00
Ralph Dolmans
1c02193ddb - Fix #1249: unbound doesn't return FORMERR to bogus ECS.
git-svn-id: file:///svn/unbound/trunk@4110 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-04-12 13:12:21 +00:00
Ralph Dolmans
22339c9ba9 - Fix #1247: unbound does not shorten source prefix length when forwarding ECS.
git-svn-id: file:///svn/unbound/trunk@4108 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-04-12 11:47:18 +00:00
Ralph Dolmans
8fedcffc02 - Display ECS module memory usage.
git-svn-id: file:///svn/unbound/trunk@4106 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-04-11 13:10:30 +00:00
Ralph Dolmans
d7304e7c75 - Zero initialize addrtree allocation.
git-svn-id: file:///svn/unbound/trunk@4102 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-04-10 10:46:54 +00:00
Ralph Dolmans
a5c7c469ee - Remove ECS option after REFUSED answer
- Fix small memory leak in edns_opt_copy_alloc



git-svn-id: file:///svn/unbound/trunk@4100 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-04-10 09:12:04 +00:00