Commit Graph

49 Commits

Author SHA1 Message Date
W.C.A. Wijngaards
5bea29b01c - For #1110: Test for fallthrough attribute in configure and add
fallthrough attribute annotations.
2024-07-23 09:47:42 +02:00
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
George Thessalonikefs
d5522c3480 Fixes for dns64 fallback to plain AAAA when no A records:
- Cleanup if condition.
- Rename variable for readability.
2023-10-18 12:03:40 +02:00
Daniel Gröber via Unbound-users
c1e5e6781e dns64: Fall back to plain AAAA query with synthall but no A records
Networks which only have tunneled IPv6 access but still want to go
IPv6-only internally can use unbound's DNS64 module together with the
dns64-synthall or dns64-ignore-aaaa options to direct most traffic (any
dualstack domain) to their NAT64.

There is only one problem with this setup, currently domains with only AAAA
records will fail to resolve.

To allow for this use-case arrange for the A sub-query to make the AAAA
super query advance along the module stack when no records are returned.

Signed-off-by: Daniel Gröber <dxld@darkboxed.org>
2023-10-18 12:03:40 +02:00
George Thessalonikefs
dd086e5bfd Fixes for dns64 readability refactoring:
- Move declarations to the top for C90 compliance.
- Save cycles by not calling (yet) unneeded functions.
- Possible use of uninitialised value.
- Consistent formatting.
2023-10-18 12:03:40 +02:00
Daniel Gröber via Unbound-users
213bb7c6ed dns64: Fix misleading indentation
Signed-off-by: Daniel Gröber <dxld@darkboxed.org>
2023-10-18 12:03:40 +02:00
Daniel Gröber via Unbound-users
0c88f98a3b dns64: Refactor handle_event checks for readability
No functional change intended.

Signed-off-by: Daniel Gröber <dxld@darkboxed.org>
2023-10-18 12:03:40 +02:00
George Thessalonikefs
15b8d8b96a Merge branch 'master' into features/ede-caching 2023-07-13 11:25:59 +02:00
George Thessalonikefs
adb4aeb609 - For #722: Minor fixes, formatting and refactoring. 2023-05-01 18:23:13 +02:00
TCY16
5f309d0018 Add caching EDEs 2022-09-01 14:10:14 +02:00
W.C.A. Wijngaards
f6753a0f10 - Fix the novel ghost domain issues CVE-2022-30698 and CVE-2022-30699. 2022-08-01 13:24:40 +02:00
gthess
7adeba3690
Merge pull request #530 from Shchelk/bugfix
Fix: dereferencing a null pointer
2021-12-01 04:02:03 +01:00
Shchelkunov Artem
5730e7bb59
Fix: dereferencing a null pointer
Found by static analyzer svace
Static analyzer message: Return value of a function 'reply_info_copy'
is dereferenced at dns64.c:923 without checking, but it is usually
checked for this function (4/5).

on-behalf-of: @ideco-team <github@ideco.ru>
2021-08-20 17:52:18 +05:00
Artem Egorenkov
0d8dd6ec33 - memory management violations fixed 2021-08-06 14:11:12 +02:00
Christopher Zimmermann
1d23e0c920 Merge remote-tracking branch 'upstream/master' 2021-02-03 13:19:19 +01:00
Roland van Rijswijk-Deij
c4c849d878 Rebase on master 2021-01-22 16:44:56 +00:00
W.C.A. Wijngaards
f273716b80 - Fix declaration before statement and signed comparison warning in
dns64.
2021-01-18 10:23:01 +01:00
Florian Obser
285a7fdd21 Implement IPv4-Embedded addresses according to RFC6052.
The original algorithm assumed that any prefix length would be valid
and did not skip over bits 64 to 71 and set them to zero.
This means that only dns64 prefixes with length 32 and 96 generated
embedded addresses according to RFC6052, cf. Figure 1 in 2.2.
2021-01-14 19:15:30 +01:00
Ubuntu
506dad946b Ensure packet_rrset_data is always initialised to zero upon allocation 2020-07-29 15:26:42 +00:00
Christopher Zimmermann
c96e4ca121 allow privileged initialisation of modules 2020-05-10 22:30:25 +02:00
George Thessalonikefs
c5897dc058 - Fix compiler warning in dns64/dns64.c. 2020-03-02 11:52:33 +01:00
W.C.A. Wijngaards
ebad5416d7 - Fix comments for doxygen in dns64. 2019-11-20 15:22:20 +01:00
W.C.A. Wijngaards
2a4e840be4 - Fix Unchecked NULL Pointer in dns64_inform_super()
and ipsecmod_new(), reported by X41 D-Sec.
2019-11-19 15:48:18 +01:00
W.C.A. Wijngaards
a839a8ae01 And check the buffer size precisely. 2019-11-19 12:11:28 +01:00
W.C.A. Wijngaards
79a6e9fbe2 - Fixes to please lint checks. 2019-11-19 12:10:03 +01:00
Wouter Wijngaards
023411f975 - Fix for crash in dns64 module if response is null.
git-svn-id: file:///svn/unbound/trunk@5025 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-12-12 16:03:05 +00:00
Wouter Wijngaards
42244e1b4d - Fix dns64 allocation in wrong region for returned internal queries.
git-svn-id: file:///svn/unbound/trunk@5013 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-12-06 08:04:37 +00:00
Wouter Wijngaards
f532367412 Review fix.
git-svn-id: file:///svn/unbound/trunk@4980 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-11-27 09:05:00 +00:00
Wouter Wijngaards
94996b8a29 - Fix DNS64 to not store intermediate results in cache, this avoids
other threads from picking up the wrong data.  The module restores
  the previous no_cache_store setting when the the module is finished.


git-svn-id: file:///svn/unbound/trunk@4979 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-11-27 08:43:38 +00:00
Wouter Wijngaards
0f83653e76 Move rcode code back.
git-svn-id: file:///svn/unbound/trunk@4948 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-10-25 07:49:49 +00:00
Wouter Wijngaards
20f0e8ad55 - Fix #4191: NXDOMAIN vs SERVFAIL during dns64 PTR query.
git-svn-id: file:///svn/unbound/trunk@4947 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-10-25 07:45:00 +00:00
Ralph Dolmans
2e5e31e8ac - Added serve-expired-ttl and serve-expired-ttl-reset options.
git-svn-id: file:///svn/unbound/trunk@4876 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-08-28 14:21:56 +00:00
Wouter Wijngaards
efe5c8e6be - Fix #4144: dns64 module caches wrong (negative) information.
git-svn-id: file:///svn/unbound/trunk@4850 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-08-10 08:03:17 +00:00
Wouter Wijngaards
2beae211ee - dns64-ignore-aaaa: config option to list domain names for which the
existing AAAA is ignored and dns64 processing is used on the A
  record.


git-svn-id: file:///svn/unbound/trunk@4762 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-06-29 12:58:52 +00:00
Ralph Dolmans
9a727c3c1a - Use RCODE from A response on DNS64 synthesized answer.
git-svn-id: file:///svn/unbound/trunk@4365 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-10-05 13:55:04 +00:00
Wouter Wijngaards
abb6cfdebd - upgrade aclocal(pkg.m4 0.29.1), config.guess(2016-10-02),
config.sub(2016-09-05).
- annotate case statement fallthrough for gcc 7.1.1.
- flex output from flex 2.6.1.
- snprintf of thread number does not warn about truncated string.


git-svn-id: file:///svn/unbound/trunk@4278 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-07-24 09:04:18 +00:00
Wouter Wijngaards
cae9809e11 - Response actions based on IP address from Jinmei Tatuya (Infoblox).
git-svn-id: file:///svn/unbound/trunk@4035 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-03-07 14:58:51 +00:00
George Thessalonikefs
7b948b0647 - Added generic EDNS code for registering known EDNS option codes,
bypassing the cache response stage and uniquifying mesh states. Four EDNS
  option lists were added to module_qstate (module_qstate.edns_opts_*) to
  store EDNS options from/to front/back side.
- Added two flags to module_qstate (no_cache_lookup, no_cache_store) that
  control the modules' cache interactions.
- Added code for registering inplace callback functions. The registered
  functions can be called just before replying with local data or Chaos,
  replying from cache, replying with SERVFAIL, replying with a resolved
  query, sending a query to a nameserver. The functions can inspect the
  available data and maybe change response/query related data (i.e. append
  EDNS options).
- Updated Python module for the above.
- Updated Python documentation.



git-svn-id: file:///svn/unbound/trunk@3947 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-12-06 13:42:51 +00:00
Wouter Wijngaards
1508a5bb2c - Fix incomplete prototypes reported by Dag-Erling Smørgrav.
git-svn-id: file:///svn/unbound/trunk@3848 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-09-05 07:23:23 +00:00
Wouter Wijngaards
36dc04734e - Fix #766: dns64 should synthesize results on timeout/errors.
git-svn-id: file:///svn/unbound/trunk@3721 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-05-20 06:35:49 +00:00
Wouter Wijngaards
b4a7e9ad8d - Fix segfault in the dns64 module in the formaterror error path.
git-svn-id: file:///svn/unbound/trunk@3506 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-10-15 09:02:01 +00:00
Wouter Wijngaards
6feb8fb6a5 - Fixes to add integer overflow checks on allocation (defense in depth).
git-svn-id: file:///svn/unbound/trunk@3372 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-03-20 15:36:25 +00:00
Wouter Wijngaards
b781f2d48d - Fix that CD flag disables DNS64 processing, returning the DNSSEC
signed AAAA denial.


git-svn-id: file:///svn/unbound/trunk@3273 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-11-18 15:15:57 +00:00
Wouter Wijngaards
e752c94cf6 please doxygen.
git-svn-id: file:///svn/unbound/trunk@3202 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-07-31 08:48:31 +00:00
Wouter Wijngaards
a03340dc52 please lint for dns64.
git-svn-id: file:///svn/unbound/trunk@3201 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-07-31 08:21:09 +00:00
Wouter Wijngaards
04bacd679b - Changes from DNS64:
strcpy changed to memmove.
  arraybound check fixed from prefix_net/8/4 to prefix_net/8+4.
  allocation of result consistently in the correct region.
  time_t is now used for ttl in unbound (since the patch's version).


git-svn-id: file:///svn/unbound/trunk@3199 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-07-31 08:00:38 +00:00
Wouter Wijngaards
45022b6add - DNS64 from Viagenie (BSD Licensed), written by Simon Perrault.
Initial commit of the patch from the FreeBSD base (with its fixes).
  This adds a module (for module-config in unbound.conf) dns64 that
  performs DNS64 processing, see README.DNS64.


git-svn-id: file:///svn/unbound/trunk@3198 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-07-31 07:15:33 +00:00