Ondřej Surý and Ondřej Surý
d685bbc822
Add helper function to enable DF (don't fragment) flag on UDP sockets
...
This commits add isc__nm_socket_dontfrag() helper functions.
2020-10-05 14:55:20 +02:00
Ondřej Surý and Ondřej Surý
5daaca7146
Add SO_REUSEPORT and SO_INCOMING_CPU helper functions
...
The setting of SO_REUSE**** and SO_INCOMING_CPU have been moved into a
separate helper functions.
2020-10-05 14:54:24 +02:00
Matthijs Mekking
1567524a4f
Merge branch '1749-rndc-dnssec-rollover' into 'main'
...
Resolve "rndc trigger rollover"
Closes #1749
See merge request isc-projects/bind9!4004
2020-10-05 09:46:48 +00:00
Matthijs Mekking
78c09f5622
Use default algorithm in kasp test if possible
...
These tests don't require a specific algorithm so they should use
the DEFAULT_ALGORITHM from 'conf.sh.common'.
2020-10-05 10:53:46 +02:00
Matthijs Mekking
70d1ec432f
Use explicit result codes for 'rndc dnssec' cmd
...
It is better to add new result codes than to overload existing codes.
2020-10-05 10:53:46 +02:00
Matthijs Mekking
edc53fc416
Various rndc dnssec -checkds fixes
...
While working on 'rndc dnssec -rollover' I noticed the following
(small) issues:
- The key files where updated with hints set to "-when" and that
should always be "now.
- The kasp system test did not properly update the test number when
calling 'rndc dnssec -checkds' (and ensuring that works).
- There was a missing ']' in the rndc.c help output.
2020-10-05 10:53:46 +02:00
Matthijs Mekking
fcd34abb9e
Test rndc rollover inactive key
...
When users (accidentally) try to roll an inactive key, throw an error.
2020-10-05 10:53:46 +02:00
Matthijs Mekking
e826facadb
Add rndc dnssec -rollover command
...
This command is similar in arguments as -checkds so refactor the
'named_server_dnssec' function accordingly. The only difference
are that:
- It does not take a "publish" or "withdrawn" argument.
- It requires the key id to be set (add a check to make sure).
Add tests that will trigger rollover immediately and one that
schedules a test in the future.
2020-10-05 10:53:45 +02:00
Matthijs Mekking
df8276aef0
Add manual key rollover logic
...
Add to the keymgr a function that will schedule a rollover. This
basically means setting the time when the key needs to retire,
and updating the key lifetime, then update the state file. The next
time that named runs the keymgr the new lifetime will be taken into
account.
2020-10-05 10:52:19 +02:00
Matthijs Mekking
b7c9a80dbe
Merge branch '1870-fix-after-backport-to-9_11_s' into 'main'
...
Change condition for rndc dumpdb -expired
See merge request isc-projects/bind9!4219
2020-10-05 08:47:07 +00:00
Matthijs Mekking
5614454c3b
Change condition for rndc dumpdb -expired
...
After backporting #1870 to 9.11-S I saw that the condition check there
is different than in the main branch. In 9.11-S "stale" can mean
stale and serve-stale, or not active (awaiting cleanup). In 9.16 and
later versions, "stale" is stale and serve-stale, and "ancient" means
not active (awaiting cleanup). An "ancient" RRset is one that is not
active (TTL expired) and is not eligble for serve-stale.
Update the condition for rndc dumpdb -expired to closer match what is
in 9.11-S.
2020-10-05 10:44:50 +02:00
Matthijs Mekking
45e68016d0
Merge branch '2171-dnssec-policy-weird-algo-15-bug' into 'main'
...
Resolve "dnssec-policy behaviour for algorithm 15 keys different to algorithm 8 keys"
Closes #2171
See merge request isc-projects/bind9!4199
2020-10-02 08:06:45 +00:00
Matthijs Mekking
af3b014976
Fix a timing issue in kasp system test
...
Sometimes, not all keys have been created in time before 'check_keys'
is called. Run a 'retry_quiet' on checking the number of keys before
continuing checking the key data.
2020-10-02 09:20:40 +02:00
Matthijs Mekking
7c555254fe
Fix kasp min key size bug
...
The minimal size for RSASHA1, RSASHA256 is 512, but due to bad
assignment it was set to 1024.
2020-10-02 09:20:40 +02:00
Matthijs Mekking
621093fe69
Test migration to dnssec-policy with views
...
This test case is unrelated to the fix for #2171 but was added to
reproduce the problem.
2020-10-02 09:20:40 +02:00
Matthijs Mekking
43c6806779
Minor fix in kasp system test
...
The 'wait_for_nsec' does not need to add TSIG because it calls
'dig_with_opts' and that already checks for TSIG.
2020-10-02 09:20:40 +02:00
Matthijs Mekking
d6d41e96a3
Add change and note for #2171
...
This is a bug that needs to be noted.
2020-10-02 09:20:39 +02:00
Matthijs Mekking
0e207392ec
Fix Ed25519 and Ed448 in dnssec-policy keymgr
...
The kasp code had bad implicit size values for the cryptographic
algorithms Ed25519 and Ed448. When creating keys they would never
match the dnssec-policy, leading to new attempts to create keys.
These algorithms were previously not yet added to the system tests,
due to lack of availability on some systems.
2020-10-02 09:20:19 +02:00
Matthijs Mekking
7be1835795
Add kasp tests for Ed25519 and Ed448
...
Use the testcrypto script to see if these algorithms are supported by
openssl. If so, add the specific configuration to the named.conf file
and touch a file to indicate support. If the file exists, the
corresponding setup and tests are performed.
2020-10-02 09:20:19 +02:00
Michał Kępień
e620f3a3ab
Merge branch '2139-rrset-order-fixes-and-cleanups' into 'main'
...
"rrset-order" fixes and cleanups
Closes #2139
See merge request isc-projects/bind9!4195
2020-10-02 06:50:02 +00:00
Michał Kępień
27c815a220
Add CHANGES entries
2020-10-02 08:41:43 +02:00
Michał Kępień
2ac04dc930
Rework "rrset-order" documentation
...
Certain parts of the existing documentation for the "rrset-order"
statement are incorrect, others are ambiguous. Rework the relevant
section of the ARM to make it clear and up-to-date with the source code.
2020-10-02 08:41:43 +02:00
Michał Kępień
abdd4c89fc
Add tests for "order none" RRset ordering rules
...
Make sure "order none" RRset ordering rules are tested in the
"rrsetorder" system test just like all other rule types are. As the
check for the case of no "rrset-order" rule matching a given RRset also
tests "order none" (rather than "order random", as the test code may
suggest at first glance), replace the test code for that case so that it
matches other "order none" tests.
2020-10-02 08:41:43 +02:00
Michał Kępień
dbcf683c1a
Allow "order none" in "rrset-order" rules
...
named-checkconf treats the following configuration as valid:
options {
rrset-order {
order none;
};
};
Yet, the above configuration causes named to crash on startup with:
order.c:74: REQUIRE(mode == 0x00000800 || mode == 0x00000400 || mode == 0x00800000) failed, back trace
Add DNS_RDATASETATTR_NONE to the list of RRset ordering modes accepted
by dns_order_add() to allow "order none" to be used in "rrset-order"
rules. This both prevents the aforementioned crashes and addresses the
discrepancy between named-checkconf and named.
2020-10-02 08:41:43 +02:00
Mark Andrews
b154abd393
Merge branch '2112-allow-task_test-subtests-to-be-selected-at-runtime' into 'main'
...
Resolve "Allow task_test and rdata_tests subtests to be selected at runtime."
Closes #2112
See merge request isc-projects/bind9!4059
2020-10-01 12:46:00 +00:00
Mark Andrews
6293682020
Add the ability select individual tests to rdata_test
2020-10-01 08:21:42 +00:00
Mark Andrews
a9c3374717
Add the ability to print out the list of test names (-l)
2020-10-01 08:21:42 +00:00
Mark Andrews
76837484e7
Add the ability to select tests to run
...
task_test [-t <test_name>]
2020-10-01 08:21:42 +00:00
Mark Andrews
96febe6b38
Alphabetise tests
2020-10-01 08:21:42 +00:00
Mark Andrews
c969cf86e8
Merge branch '2191-missing-locks-when-accessing-keynode-initial-and-keynode-managed-triggering-tsan' into 'main'
...
Resolve "Missing locks when accessing keynode.initial and keynode.managed triggered TSAN."
Closes #2191
See merge request isc-projects/bind9!4205
2020-10-01 08:12:29 +00:00
Mark Andrews
840cf7adb3
Add missing rwlock calls when access keynode.initial and keynode.managed
...
WARNING: ThreadSanitizer: data race
Write of size 1 at 0x000000000001 by thread T1 (mutexes: write M1):
#0 dns_keynode_trust lib/dns/keytable.c:836
#1 keyfetch_done lib/dns/zone.c:10187
#2 dispatch lib/isc/task.c:1152
#3 run lib/isc/task.c:1344
#4 <null> <null>
Previous read of size 1 at 0x000000000001 by thread T2 (mutexes: read M2):
#0 keynode_dslist_totext lib/dns/keytable.c:682
#1 dns_keytable_totext lib/dns/keytable.c:732
#2 named_server_dumpsecroots bin/named/server.c:11357
#3 named_control_docommand bin/named/control.c:264
#4 control_command bin/named/controlconf.c:390
#5 dispatch lib/isc/task.c:1152
#6 run lib/isc/task.c:1344
#7 <null> <null>
Location is heap block of size 241 at 0x000000000010 allocated by thread T3:
#0 malloc <null>
#1 default_memalloc lib/isc/mem.c:713
#2 mem_get lib/isc/mem.c:622
#3 mem_allocateunlocked lib/isc/mem.c:1268
#4 isc___mem_allocate lib/isc/mem.c:1288
#5 isc__mem_allocate lib/isc/mem.c:2453
#6 isc___mem_get lib/isc/mem.c:1037
#7 isc__mem_get lib/isc/mem.c:2432
#8 new_keynode lib/dns/keytable.c:346
#9 insert lib/dns/keytable.c:393
#10 dns_keytable_add lib/dns/keytable.c:421
#11 process_key bin/named/server.c:955
#12 load_view_keys bin/named/server.c:983
#13 configure_view_dnsseckeys bin/named/server.c:1140
#14 configure_view bin/named/server.c:5371
#15 load_configuration bin/named/server.c:9110
#16 loadconfig bin/named/server.c:10310
#17 named_server_reconfigcommand bin/named/server.c:10693
#18 named_control_docommand bin/named/control.c:250
#19 control_command bin/named/controlconf.c:390
#20 dispatch lib/isc/task.c:1152
#21 run lib/isc/task.c:1344
#22 <null> <null>
Mutex M1 is already destroyed.
Mutex M2 is already destroyed.
Thread T1 (running) created by main thread at:
#0 pthread_create <null>
#1 isc_thread_create pthreads/thread.c:73
#2 isc_taskmgr_create lib/isc/task.c:1434
#3 create_managers bin/named/main.c:915
#4 setup bin/named/main.c:1223
#5 main bin/named/main.c:1523
Thread T2 (running) created by main thread at:
#0 pthread_create <null>
#1 isc_thread_create pthreads/thread.c:73
#2 isc_taskmgr_create lib/isc/task.c:1434
#3 create_managers bin/named/main.c:915
#4 setup bin/named/main.c:1223
#5 main bin/named/main.c:1523
Thread T3 (running) created by main thread at:
#0 pthread_create <null>
#1 isc_thread_create pthreads/thread.c:73
#2 isc_taskmgr_create lib/isc/task.c:1434
#3 create_managers bin/named/main.c:915
#4 setup bin/named/main.c:1223
#5 main bin/named/main.c:1523
SUMMARY: ThreadSanitizer: data race lib/dns/keytable.c:836 in dns_keynode_trust
2020-10-01 17:26:09 +10:00
Mark Andrews
061fb5e07e
Merge branch '2192-tsan-error-accessing-listener-connections' into 'main'
...
Resolve "TSAN error accessing listener->connections"
Closes #2192
See merge request isc-projects/bind9!4206
2020-10-01 07:13:09 +00:00
Mark Andrews
bea1326cdc
Lock access to listener->connections
...
as it is accessed from multiple threads with libuv.
WARNING: ThreadSanitizer: data race
Write of size 8 at 0x000000000001 by thread T1:
#0 conn_reset bin/named/controlconf.c:574
#1 isc_nmhandle_detach netmgr/netmgr.c:1257
#2 isc__nm_uvreq_put netmgr/netmgr.c:1389
#3 tcp_send_cb netmgr/tcp.c:1030
#4 <null> <null>
#5 <null> <null>
Previous read of size 8 at 0x000000000001 by thread T2:
#0 conn_reset bin/named/controlconf.c:574
#1 isc_nmhandle_detach netmgr/netmgr.c:1257
#2 control_recvmessage bin/named/controlconf.c:556
#3 recv_data lib/isccc/ccmsg.c:110
#4 isc__nm_tcp_shutdown netmgr/tcp.c:1161
#5 shutdown_walk_cb netmgr/netmgr.c:1511
#6 uv_walk <null>
#7 process_queue netmgr/netmgr.c:656
#8 process_normal_queue netmgr/netmgr.c:582
#9 process_queues netmgr/netmgr.c:590
#10 async_cb netmgr/netmgr.c:548
#11 <null> <null>
#12 <null> <null>
Location is heap block of size 265 at 0x000000000017 allocated by thread T3:
#0 malloc <null>
#1 default_memalloc lib/isc/mem.c:713
#2 mem_get lib/isc/mem.c:622
#3 isc___mem_get lib/isc/mem.c:1044
#4 isc__mem_get lib/isc/mem.c:2432
#5 add_listener bin/named/controlconf.c:1127
#6 named_controls_configure bin/named/controlconf.c:1324
#7 load_configuration bin/named/server.c:9181
#8 run_server bin/named/server.c:9819
#9 dispatch lib/isc/task.c:1152
#10 run lib/isc/task.c:1344
#11 <null> <null>
Thread T1 (running) created by main thread at:
#0 pthread_create <null>
#1 isc_thread_create pthreads/thread.c:73
#2 isc_nm_start netmgr/netmgr.c:232
#3 create_managers bin/named/main.c:909
#4 setup bin/named/main.c:1223
#5 main bin/named/main.c:1523
Thread T2 (running) created by main thread at:
#0 pthread_create <null>
#1 isc_thread_create pthreads/thread.c:73
#2 isc_nm_start netmgr/netmgr.c:232
#3 create_managers bin/named/main.c:909
#4 setup bin/named/main.c:1223
#5 main bin/named/main.c:1523
Thread T3 (running) created by main thread at:
#0 pthread_create <null>
#1 isc_thread_create pthreads/thread.c:73
#2 isc_taskmgr_create lib/isc/task.c:1434
#3 create_managers bin/named/main.c:915
#4 setup bin/named/main.c:1223
#5 main bin/named/main.c:1523
SUMMARY: ThreadSanitizer: data race bin/named/controlconf.c:574 in conn_reset
2020-10-01 15:18:59 +10:00
Ondřej Surý
cdd9852447
Merge branch 'ondrej/remove-dot-at-start-of-the-line-rst' into 'main'
...
Remove the .key from the beginning of the line in rst file
See merge request isc-projects/bind9!4203
2020-09-30 19:39:58 +00:00
Ondřej Surý
a00ca65ae6
Remove the .key from the beginning of the line in rst file
...
The handling of . (dot) characted at the beginning of the line has
changed between the sphinx-doc versions, and it was constantly giving us
trouble when generating man pages when using different sphinx-doc. This
commit just changes the source rst file, so there's no more . (dot) the
beginning of the line.
2020-09-30 21:12:15 +02:00
Mark Andrews
cf64834630
Merge branch '2180-threadsanitizer-data-race-bin-named-server-c-9678-25-in-view_loaded' into 'main'
...
Resolve "ThreadSanitizer: data race bin/named/server.c:9678:25 in view_loaded"
Closes #2180
See merge request isc-projects/bind9!4167
2020-09-30 14:37:37 +00:00
Mark Andrews
b00ba7ac94
make (named_server_t).reload_status atomic
...
WARNING: ThreadSanitizer: data race
Write of size 4 at 0x000000000001 by thread T1:
#0 view_loaded bin/named/server.c:9678:25
#1 call_loaddone lib/dns/zt.c:308:3
#2 doneloading lib/dns/zt.c:582:3
#3 zone_asyncload lib/dns/zone.c:2322:3
#4 dispatch lib/isc/task.c:1152:7
#5 run lib/isc/task.c:1344:2
Previous read of size 4 at 0x000000000001 by thread T2:
#0 named_server_status bin/named/server.c:11903:14
#1 named_control_docommand bin/named/control.c:272:12
#2 control_command bin/named/controlconf.c:390:17
#3 dispatch lib/isc/task.c:1152:7
#4 run lib/isc/task.c:1344:2
Location is heap block of size 409 at 0x000000000011 allocated by main thread:
#0 malloc <null>
#1 default_memalloc lib/isc/mem.c:713:8
#2 mem_get lib/isc/mem.c:622:8
#3 mem_allocateunlocked lib/isc/mem.c:1268:8
#4 isc___mem_allocate lib/isc/mem.c:1288:7
#5 isc__mem_allocate lib/isc/mem.c:2453:10
#6 isc___mem_get lib/isc/mem.c:1037:11
#7 isc__mem_get lib/isc/mem.c:2432:10
#8 named_server_create bin/named/server.c:9978:27
#9 setup bin/named/main.c:1256:2
#10 main bin/named/main.c:1523:2
Thread T1 (running) created by main thread at:
#0 pthread_create <null>
#1 isc_thread_create lib/isc/pthreads/thread.c:73:8
#2 isc_taskmgr_create lib/isc/task.c:1434:3
#3 create_managers bin/named/main.c:915:11
#4 setup bin/named/main.c:1223:11
#5 main bin/named/main.c:1523:2
Thread T2 (running) created by main thread at:
#0 pthread_create <null>
#1 isc_thread_create lib/isc/pthreads/thread.c:73:8
#2 isc_taskmgr_create lib/isc/task.c:1434:3
#3 create_managers bin/named/main.c:915:11
#4 setup bin/named/main.c:1223:11
#5 main bin/named/main.c:1523:2
SUMMARY: ThreadSanitizer: data race bin/named/server.c:9678:25 in view_loaded
2020-09-30 14:19:09 +00:00
Mark Andrews
6e6ad6d303
Merge branch '2190-in-new-yaml-output-when-truncation-is-query-time-usec' into 'main'
...
dig: print timestamps with microsecond precision if "-u" is used in YAML output mode
Closes #2190
See merge request isc-projects/bind9!4193
2020-09-30 14:11:49 +00:00
Mark Andrews
b7512e87b1
add CHANGES
2020-09-30 23:56:49 +10:00
Mark Andrews
3fe7fa3db2
Output timestamps in yaml to the microsecond if -u is specified.
2020-09-30 23:56:18 +10:00
Mark Andrews
519b070618
Add ISO time stamps to the microsecond
2020-09-30 23:56:18 +10:00
Mark Andrews
f2762acd13
Merge branch '2188-bug-in-message-c-673-ensure-isc_mempool_getallocated-msg-namepool-0-failed' into 'main'
...
Resolve "Bug in message.c:673: ENSURE(isc_mempool_getallocated(msg->namepool) == 0) failed"
Closes #2188
See merge request isc-projects/bind9!4189
2020-09-30 13:43:20 +00:00
Mark Andrews
5b5f1ba0b2
Check that sig0 name is the root.
2020-09-30 13:24:29 +00:00
Mark Andrews
b736d86697
Have -d print out the message
2020-09-30 13:24:29 +00:00
Mark Andrews
450fab92b1
Always clean sig0name in msgresetsigs() and dns_message_renderreset()
...
The fuzzing harness operates on dns_message_t in non-standard ways
and if 'sig0name' is non-NULL when msgresetsigs() and
dns_message_renderreset() are called it should be cleaned up.
2020-09-30 13:24:29 +00:00
Mark Andrews
fc5c9e6bce
Add packet from issue #4189
2020-09-30 13:24:29 +00:00
Ondřej Surý
0665f01c97
Merge branch 'marka-regen-ddns-confgen.8in' into 'main'
...
regenerate ddns-confgen.8in
See merge request isc-projects/bind9!4198
2020-09-30 12:19:26 +00:00
Mark Andrews
eeafbddccc
regenerate ddns-confgen.8in
2020-09-30 15:52:54 +10:00
Ondřej Surý
6e156834e2
Merge branch '2124-fix-assertion-failure-in-dns-message' into 'main'
...
Resolve "Bind 9.16.6 Assertion failure message.c:4733: REQUIRE(msg->state == (-1)) failed"
Closes #2124
See merge request isc-projects/bind9!4194
2020-09-29 08:14:23 +00:00
Ondřej Surý
6179a38810
Add CHANGES and release note for GL #2124
2020-09-29 08:22:09 +02:00