Commit graph

70 commits

Author SHA1 Message Date
W.C.A. Wijngaards
d8809c672a - Fix Weak Entropy Used For Nettle,
reported by X41 D-Sec.
2019-11-20 11:28:53 +01:00
W.C.A. Wijngaards
7dfbcdf276 - Fix #99: Memory leak in ub_ctx (event_base will never be freed). 2019-10-24 09:58:45 +02:00
W.C.A. Wijngaards
a5027f5f56 - Fix character buffer size in ub_ctx_hosts. 2019-08-15 15:11:04 +02:00
W.C.A. Wijngaards
21f740d313 - Fix #52 #53, fix for example fail program. 2019-08-01 09:34:44 +02:00
W.C.A. Wijngaards
e860d39f54 - For #52 #53, second context does not close logfile override. 2019-08-01 09:15:33 +02:00
W.C.A. Wijngaards
1ec96d8f07 - Fix #39: In libunbound, leftover logfile is close()d unpredictably. 2019-06-17 12:13:12 +02:00
Wouter Wijngaards
3d2dfc4769 - ub_ctx_set_tls call for libunbound that enables DoT for the machines
set with ub_ctx_set_fwd.  Patch from Florian Obser.


git-svn-id: file:///svn/unbound/trunk@5080 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-01-28 08:22:08 +00:00
Wouter Wijngaards
3028fa50a8 - Patch from Florian Obser fixes some compiler warnings:
include mini_event.h to have a prototype for mini_ev_cmp
  include edns.h to have a prototype for apply_edns_options
  sldns_wire2str_edns_keepalive_print is only called in the wire2str,
  module declare it static to get rid of compiler warning:
  no previous prototype for function
  infra_find_ip_ratedata() is only called in the infra module,
  declare it static to get rid of compiler warning:
  no previous prototype for function
  do not shadow local variable buf in authzone
  auth_chunks_delete and az_nsec3_findnode are only called in the
  authzone module, declare them static to get rid of compiler warning:
  no previous prototype for function...
  copy_rrset() is only called in the respip module, declare it
  static to get rid of compiler warning:
  no previous prototype for function 'copy_rrset'
  no need for another variable "r"; gets rid of compiler warning:
  declaration shadows a local variable in libunbound.c
  no need for another variable "ns"; gets rid of compiler warning:
  declaration shadows a local variable in iterator.c



git-svn-id: file:///svn/unbound/trunk@5072 be551aaa-1e26-0410-a405-d3ace91eadb9
2019-01-24 16:05:00 +00:00
Wouter Wijngaards
9a82526b91 - exit log routine is annotated as noreturn function.
- free memory leaks in config strlist and str2list insert functions.
- do not move unused argv variable after getopt.
- Remove unused if clause in testcode.


git-svn-id: file:///svn/unbound/trunk@4896 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-09-13 08:58:21 +00:00
Wouter Wijngaards
6d7e5df98f fix to please gcc 8 and lint.
git-svn-id: file:///svn/unbound/trunk@4678 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-05-03 14:29:15 +00:00
Wouter Wijngaards
1d5d95c8cb And cast here.
git-svn-id: file:///svn/unbound/trunk@4677 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-05-03 14:17:56 +00:00
Wouter Wijngaards
8f886fc6dd - Fix function type cast warning in libunbound context callback type.
git-svn-id: file:///svn/unbound/trunk@4676 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-05-03 14:12:19 +00:00
Wouter Wijngaards
6fc79a70a3 Fixup tests for checklocks. Add auth axfr test for socket code.
git-svn-id: file:///svn/unbound/trunk@4511 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-02-05 15:33:32 +00:00
Wouter Wijngaards
0362614f94 auth zone, make depend, fallback, create and delete, and lease_time,
and lock fixes.


git-svn-id: file:///svn/unbound/trunk@4466 be551aaa-1e26-0410-a405-d3ace91eadb9
2018-01-30 10:35:20 +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
Ralph Dolmans
a2bc93547f - Generalise inplace callback (de)registration
- (de)register inplace callbacks for module id
- No unbound-control set_option for ECS options
- Deprecated client-subnet-opcode config option
- Introduced client-subnet-always-forward config option
- Changed max-client-subnet-ipv6 default to 56 (as in RFC)
- Removed extern ECS config options
- module_restart_next now calls clear on all following modules
- Also create ECS module qstate on module_event_pass event


git-svn-id: file:///svn/unbound/trunk@4092 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-04-06 13:13:06 +00:00
Wouter Wijngaards
ff1b857f90 compile fix
git-svn-id: file:///svn/unbound/trunk@3990 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-01-19 11:34:21 +00:00
Wouter Wijngaards
c010e93d4a - Fix to rename internally used types from _t to _type, because _t
type names are reserved by POSIX.
- iana portlist update


git-svn-id: file:///svn/unbound/trunk@3989 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-01-19 10:25:41 +00:00
Wouter Wijngaards
5d522b0017 - Fix to Rename ub_callback_t to ub_callback_type, because POSIX
reserves _t typedefs.


git-svn-id: file:///svn/unbound/trunk@3988 be551aaa-1e26-0410-a405-d3ace91eadb9
2017-01-19 09:08:15 +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
29cd24bbc6 - Fix time in case answer comes from cache in ub_resolve_event().
git-svn-id: file:///svn/unbound/trunk@3732 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-05-30 12:48:11 +00:00
Willem Toorop
bcfbe0d9c4 User defined pluggable event mechanism (for review)
git-svn-id: file:///svn/unbound/branches/ub_event@3647 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-03-07 14:10:06 +00:00
Wouter Wijngaards
d858886499 prettier, now for the zone syntax check.
git-svn-id: file:///svn/unbound/trunk@3637 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-02-23 13:29:35 +00:00
Wouter Wijngaards
4c8230d2ce Prettier code.
git-svn-id: file:///svn/unbound/trunk@3636 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-02-23 13:21:13 +00:00
Wouter Wijngaards
36d3966e60 - ub_ctx_set_stub() function for libunbound to config stub zones.
git-svn-id: file:///svn/unbound/trunk@3632 be551aaa-1e26-0410-a405-d3ace91eadb9
2016-02-23 10:43:10 +00:00
Wouter Wijngaards
2f8f3cca82 Fixup nothread compile on Linux.
git-svn-id: file:///svn/unbound/trunk@3524 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-10-28 10:37:53 +00:00
Wouter Wijngaards
f2426b7796 - Fix #705: ub_ctx_set_fwd() return value mishandled on windows.
git-svn-id: file:///svn/unbound/trunk@3489 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-09-22 08:59:10 +00:00
Wouter Wijngaards
b68fcc28c4 fix windows portability
git-svn-id: file:///svn/unbound/trunk@3474 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-08-13 15:06:01 +00:00
Wouter Wijngaards
6da360d3bb - Reap the child process that libunbound spawns.
git-svn-id: file:///svn/unbound/trunk@3473 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-08-13 14:17:44 +00:00
Wouter Wijngaards
4dae17108b - Fix #674: Do not free pointers given by getenv.
git-svn-id: file:///svn/unbound/trunk@3432 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-06-02 07:31:43 +00:00
Wouter Wijngaards
cdeb81f219 And skip dos-newlines for only addrs on line.
git-svn-id: file:///svn/unbound/trunk@3385 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-04-07 07:54:30 +00:00
Wouter Wijngaards
11b13d5928 - Libunbound skips dos-line-endings from etc/hosts.
git-svn-id: file:///svn/unbound/trunk@3384 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-04-07 07:51:43 +00:00
Wouter Wijngaards
b2bdce46be - rename ldns subdirectory to sldns to avoid name collision.
git-svn-id: file:///svn/unbound/trunk@3380 be551aaa-1e26-0410-a405-d3ace91eadb9
2015-03-26 10:21:38 +00:00
Wouter Wijngaards
973f7a2225 - Add ub_ctx_add_ta_autr function to add a RFC5011 automatically
tracked trust anchor to libunbound.


git-svn-id: file:///svn/unbound/trunk@3251 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-11-04 09:11:59 +00:00
Wouter Wijngaards
339a6be27d More unsigned chasts for toupper/tolower/ctype
git-svn-id: file:///svn/unbound/trunk@3242 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-10-13 08:35:00 +00:00
Wouter Wijngaards
2b90f38a70 And fix #551 REGENT to COPYRIGHT HOLDER in license in file headings.
git-svn-id: file:///svn/unbound/trunk@3079 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-02-07 13:28:39 +00:00
Wouter Wijngaards
1a24208658 - speed up unbound (reports say it could be up to 10%), by reducing
lock contention on localzones.lock.  It is changed to an rwlock.


git-svn-id: file:///svn/unbound/trunk@3048 be551aaa-1e26-0410-a405-d3ace91eadb9
2014-01-24 11:21:15 +00:00
Wouter Wijngaards
d3cbd76546 - Fix sldns to use sldns_ prefix for all ldns_ variables.
git-svn-id: file:///svn/unbound/trunk@3022 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-12-03 09:11:16 +00:00
Wouter Wijngaards
29e96e86c9 - separate ldns into core ldns inside ldns/ subdirectory. No more
--with-ldns is needed and unbound does not rely on libldns.


git-svn-id: file:///svn/unbound/trunk@2998 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-10-31 15:09:26 +00:00
Wouter Wijngaards
5e6ac36076 - Patch from Neel Goyal: Add an API call to set an event base on an
existing ub_ctx.  This basically just destroys the current worker and
  sets the event base to the current.  And fix a deadlock in
  ub_resolve_event – the cfglock is held when libworker_create is
  called.  This ends up trying to acquire the lock again in
  context_obtain_alloc in the call chain.


git-svn-id: file:///svn/unbound/trunk@2992 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-10-22 09:32:10 +00:00
Wouter Wijngaards
253d425ca8 - unbound-event.h is installed if configured --with-libevent. It
contains low-level library calls, that use libevent's event_base
  and an ldns_buffer for the wire return packet to perform async
  resolution in the client's eventloop.


git-svn-id: file:///svn/unbound/trunk@2970 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-09-26 08:34:14 +00:00
Wouter Wijngaards
05a9730e53 - More fixes for bug#519: for the threaded case test if the bg
thread has been killed, on ub_ctx_delete, to avoid hangs.


git-svn-id: file:///svn/unbound/trunk@2946 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-08-26 12:24:27 +00:00
Wouter Wijngaards
a7baa0f3b0 - Fix for const string literals in C++ for libunbound, from Karel
Slany.


git-svn-id: file:///svn/unbound/trunk@2913 be551aaa-1e26-0410-a405-d3ace91eadb9
2013-06-18 07:33:44 +00:00
Wouter Wijngaards
8b078cc509 - Added ub_version(). API version increase, with (binary) backwards
compatibility for the previous version.


git-svn-id: file:///svn/unbound/trunk@2584 be551aaa-1e26-0410-a405-d3ace91eadb9
2012-01-12 13:52:38 +00:00
Wouter Wijngaards
f042f0dd5d - Neat function prototypes, unshadowed local declarations.
git-svn-id: file:///svn/unbound/trunk@2188 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-07-07 13:13:36 +00:00
Wouter Wijngaards
147d47eee7 Move includes to code files.
git-svn-id: file:///svn/unbound/trunk@2035 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-03-12 15:17:48 +00:00
Wouter Wijngaards
423b4d8893 get and set option more accessible.
git-svn-id: file:///svn/unbound/trunk@1990 be551aaa-1e26-0410-a405-d3ace91eadb9
2010-02-23 13:53:10 +00:00
Wouter Wijngaards
62ab524058 Fix#282 libunbound memleak on error condition by Eric Sesterhenn.
git-svn-id: file:///svn/unbound/trunk@1906 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-11-16 13:36:54 +00:00
Wouter Wijngaards
f42d27e1a2 - Made new validator error string available from libunbound for
applications.  It is in result->why_bogus, a zero-terminated string.
	  unbound-host prints it by default if a result is bogus.
	  Also the errinf is public in module_qstate (for other modules).
	Binary API different. bumped library ABI version.


git-svn-id: file:///svn/unbound/trunk@1874 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-10-08 17:05:53 +00:00
Wouter Wijngaards
0fc43d4a62 Luca Bruno's patch.
git-svn-id: file:///svn/unbound/trunk@1806 be551aaa-1e26-0410-a405-d3ace91eadb9
2009-09-03 10:07:13 +00:00