Commit graph

71 commits

Author SHA1 Message Date
Diego Fronza
8781aef52e Refactored dns_message_t for using attach/detach semantics
This commit will be used as a base for the next code updates in order
to have a better control of dns_message_t objects' lifetime.
2020-09-30 13:33:43 +02:00
Evan Hunt
400171aee8 update all copyright headers to eliminate the typo 2020-09-14 17:00:40 -07:00
Ondřej Surý
5fd1df8cfa Disable MSB8028 warning
All our MSVS Project files share the same intermediate directory.  We
know that this doesn't cause any problems, so we can just disable the
detection in the project files.

Example of the warning:

  warning MSB8028: The intermediate directory (.\Release\) contains files shared from another project (dnssectool.vcxproj).  This can lead to incorrect clean and rebuild behavior.

(cherry picked from commit b6c2012d93)
2020-04-16 08:12:39 +02:00
Ondřej Surý
1eb5a77baa Set WarningLevel to Level1 for Release, treat warnings as errors
Our vcxproj files set the WarningLevel to Level3, which is too verbose
for a code that needs to be portable.  That basically leads to ignoring
all the errors that MSVC produces.  This commits downgrades the
WarningLevel to Level1 and enables treating warnings as errors for
Release builds.  For the Debug builds the WarningLevel got upgraded to
Level4, and treating warnings as errors is explicitly disabled.

We should eventually make the code clean of all MSVC warnings, but it's
a long way to go for Level4, so it's more reasonable to start at Level1.

For reference[1], these are the warning levels as described by MSVC
documentation:

  * /W0 suppresses all warnings. It's equivalent to /w.
  * /W1 displays level 1 (severe) warnings. /W1 is the default setting
    in the command-line compiler.
  * /W2 displays level 1 and level 2 (significant) warnings.
  * /W3 displays level 1, level 2, and level 3 (production quality)
    warnings. /W3 is the default setting in the IDE.
  * /W4 displays level 1, level 2, and level 3 warnings, and all level 4
    (informational) warnings that aren't off by default. We recommend
    that you use this option to provide lint-like warnings. For a new
    project, it may be best to use /W4 in all compilations. This option
    helps ensure the fewest possible hard-to-find code defects.
  * /Wall displays all warnings displayed by /W4 and all other warnings
    that /W4 doesn't include — for example, warnings that are off by
    default.
  * /WX treats all compiler warnings as errors. For a new project, it
    may be best to use /WX in all compilations; resolving all warnings
    ensures the fewest possible hard-to-find code defects.

1. https://docs.microsoft.com/en-us/cpp/build/reference/compiler-option-warning-level?view=vs-2019

(cherry picked from commit 789d253e3d)
2020-04-16 08:12:39 +02:00
Michał Kępień
61e4c9198a Make VS solution upgrading unnecessary
Until now, the build process for BIND on Windows involved upgrading the
solution file to the version of Visual Studio used on the build host.
Unfortunately, the executable used for that (devenv.exe) is not part of
Visual Studio Build Tools and thus there is no clean way to make that
executable part of a Windows Server container.

Luckily, the solution upgrade process boils down to just adding XML tags
to Visual Studio project files and modifying certain XML attributes - in
files which we pregenerate anyway using win32utils/Configure.  Thus,
extend win32utils/Configure with three new command line parameters that
enable it to mimic what "devenv.exe bind9.sln /upgrade" does.  This
makes the devenv.exe build step redundant and thus facilitates building
BIND in Windows Server containers.

(cherry picked from commit 0476e8f1ac)
2019-09-27 12:13:39 +02:00
Evan Hunt
7de12aaa34 add a search for GeoIP2 libraries in configure
- "--with-geoip" is used to enable the legacy GeoIP library.
- "--with-geoip2" is used to enable the new GeoIP2 library
  (libmaxminddb), and is on by default if the library is found.
- using both "--with-geoip" and "--with-geoip2" at the same time
  is an error.
- an attempt is made to determine the default GeoIP2 database path at
  compile time if pkg-config is able to report the module prefix. if
  this fails, it will be necessary to set the path in named.conf with
  geoip-directory
- Makefiles have been updated, and a stub lib/dns/geoip2.c has been
  added for the eventual GeoIP2 search implementation.

(cherry picked from commit fea6b5bf10)
(cherry picked from commit 6a7e805796)
2019-07-02 12:28:14 -07:00
Ondřej Surý
1084b40b44 Replace custom isc_boolean_t with C standard bool type
(cherry picked from commit 994e656977)
(cherry picked from commit 884929400c)
2018-08-10 15:20:57 +02:00
Ondřej Surý
aaa76dc654 Replace custom isc_u?intNN_t types with C99 u?intNN_t types
(cherry picked from commit cb6a185c69)
(cherry picked from commit d61e6a3111)
2018-08-10 15:20:57 +02:00
Ondřej Surý
188526f41c Remove $Id markers, Principal Author and Reviewed tags from the full source tree
(cherry picked from commit 55a10b7acd)
2018-05-11 14:25:15 +02:00
Michał Kępień
ecea678dac Use dns_fixedname_initname() where possible
Replace dns_fixedname_init() calls followed by dns_fixedname_name()
calls with calls to dns_fixedname_initname() where it is possible
without affecting current behavior and/or performance.

This patch was mostly prepared using Coccinelle and the following
semantic patch:

    @@
    expression fixedname, name;
    @@
    -	dns_fixedname_init(&fixedname);
    	...
    -	name = dns_fixedname_name(&fixedname);
    +	name = dns_fixedname_initname(&fixedname);

The resulting set of changes was then manually reviewed to exclude false
positives and apply minor tweaks.

It is likely that more occurrences of this pattern can be refactored in
an identical way.  This commit only takes care of the low-hanging fruit.

(cherry picked from commit 4df4a8e731)
(cherry picked from commit 0041aeb751)
2018-04-10 13:26:23 -07:00
Evan Hunt
8b205089b7 update file headers to remove copyright years 2018-03-14 16:40:20 -07:00
Mark Andrews
22c6b2308e use %u instead of %d 2018-02-16 14:58:17 +11:00
Mark Andrews
c58169ff1c use %u instead of %d 2018-02-16 14:58:17 +11:00
Mark Andrews
8db1762d68 use %u instead of %d 2018-02-16 14:58:17 +11:00
Mark Andrews
f6dae15117 use %u instead of %d 2018-02-16 14:58:17 +11:00
Mark Andrews
8d9097b0b7 use %u instead of %d 2018-02-16 14:58:17 +11:00
Tinderbox User
83545641dd update copyright notice / whitespace 2018-02-08 23:48:55 +00:00
Mark Andrews
701a93f5a5 [v9_11] fix nsupdate test on windows
4888.	[test]		Initialize sockets correctly in sample-update so
			that nsupdate system test will will run on Windows.
			[RT #47097]

(cherry picked from commit 6757dc6488)
2018-02-08 13:35:43 -08:00
Mark Andrews
d72952cf25 4739. [cleanup] Address clang static analysis warnings. [RT #45952]
(cherry picked from commit f9f3f20d2d)
2017-09-27 10:58:44 +10:00
Tinderbox User
6fb9b25791 update copyright notice / whitespace 2017-07-21 23:46:43 +00:00
Mark Andrews
bfde61d519 4654. [cleanup] Don't use C++ keywords delete, new and namespace.
[RT #45538]

(cherry picked from commit 4bf32aa587)
2017-07-21 12:28:58 +10:00
Tinderbox User
2cda87d34f update copyright notice / whitespace 2017-07-20 23:45:50 +00:00
Mark Andrews
8ed6c49f1a 4653. [bug] Reorder includes to move @DST_OPENSSL_INC@ and
@ISC_OPENSSL_INC@ after shipped include directories.
                        [RT #45581]

(cherry picked from commit 124712666e)
2017-07-20 11:52:29 +10:00
Tinderbox User
8664a1bd40 update copyright notice / whitespace 2017-05-30 23:46:05 +00:00
Mark Andrews
032d2134a4 4629. [bug] dns_client_startupdate could not be called with a
running client. [RT #45277]

(cherry picked from commit e51d62ecae)
2017-05-30 09:52:45 +10:00
Mark Andrews
1bce43adcc 4585. [port] win32: Set CompileAS value. [RT #42474]
(cherry picked from commit 3742338a7b)
2017-04-20 12:42:39 +10:00
Mark Andrews
b8e7abc50e freeaddrinfo is called too early.
(cherry picked from commit c1870d0e44)
2016-12-15 09:39:51 +11:00
Tinderbox User
8852646542 update copyright notice / whitespace 2016-12-13 23:47:43 +00:00
Mark Andrews
45f206e6c1 4533. [bug] dns_client_update should terminate on prerequiste
failures (NXDOMAIN, YXDOMAIN, NXRRSET, YXRRSET)
                        and also on BADZONE.  [RT #43865]

(cherry picked from commit 8ca45ba01a)
2016-12-13 15:48:20 +11:00
Witold Krecicki
cc51cd2d20 4487. [test] Make system tests work on Windows. [RT #42931] 2016-10-19 17:21:13 +02:00
Mark Andrews
cccfafa311 4403. [bug] Rename variables and arguments that shadow: basename,
clone and gai_error.

(cherry picked from commit ecfa005085)
2016-06-29 11:26:49 +10:00
Mark Andrews
0c27b3fe77 4401. [misc] Change LICENSE to MPL 2.0. 2016-06-27 14:56:38 +10:00
Evan Hunt
30370d905e [master] removed /Gy- from VS project files
4302.	[port]		win32: fixed a build error in VS 2015. [RT #41426]
2016-01-27 15:27:57 -08:00
Tinderbox User
3865e18d3d update copyright notice / whitespace 2015-11-09 23:45:22 +00:00
Evan Hunt
e13d04fda9 [master] fix python script versions
4257.	[cleanup]	Python scripts reported incorrect version. [RT #41080]
2015-11-08 21:34:24 -08:00
Mark Andrews
7867d18ce0 Introduce end-of-line normalization 2015-09-29 08:25:35 +10:00
Mark Andrews
91f66e374b eol -> crlf 2015-08-26 12:43:08 +10:00
Evan Hunt
a32b6291aa [master] address regression
4126.	[bug]		Addressed a regression introduced in change #4121.
			[RT #39611]
2015-05-26 19:11:08 -07:00
Francis Dupont
3759f10fc5 added print.h includes, updated copyrights 2015-05-23 14:21:51 +02:00
Mark Andrews
29d52c001f 4081. [cleanup] Use dns_rdatalist_init consistently. [RT #38759] 2015-03-03 16:43:42 +11:00
Tinderbox User
5e93bad21b update copyright notice / whitespace 2015-03-01 23:45:20 +00:00
Mark Andrews
a8da00ef95 4079. [func] Preserve the case of the ownername of records to
the RRset level. [RT #37442]
2015-02-27 15:08:38 +11:00
Tinderbox User
c110d61b17 update copyright notice / whitespace 2015-01-20 23:45:26 +00:00
Evan Hunt
11463c0ac2 [master] clean up gcc -Wshadow warnings
4039.	[cleanup]	Cleaned up warnings from gcc -Wshadow. [RT #37381]
2015-01-20 13:29:18 -08:00
Mark Andrews
d8f2dd46cb 4025. [port] bsdi: failed to build. [RT #38047] 2014-12-19 12:06:35 +11:00
Evan Hunt
2ae159b376 [master] globally rename "delve" to "delv"
3817.	[func]		The "delve" command is now spelled "delv" to avoid
			a namespace collision with the Xapian project.
			[RT #35801]
2014-04-23 11:14:12 -07:00
Mark Andrews
03296893bc fix include path for out of source tree build 2014-03-15 13:25:27 +11:00
Evan Hunt
e71905610c [master] fixed out-of-tree build
3766.	[cleanup]	Fixed problems with building outside the source
			tree when using native PKCS#11. [RT #35459]
2014-02-27 16:49:35 -08:00
Tinderbox User
938440694b update copyright notice 2014-02-27 23:46:22 +00:00
Evan Hunt
98922b2b2b [master] merge several interdependent fixes
3760.   [bug]           Improve SIT with native PKCS#11 and on Windows.
			[RT #35433]

3759.   [port]          Enable delve on Windows. [RT #35441]

3758.   [port]          Enable export library APIs on windows. [RT #35382]
2014-02-26 19:00:05 -08:00