Kea issueshttps://gitlab.isc.org/isc-projects/kea/-/issues2024-03-25T12:34:33Zhttps://gitlab.isc.org/isc-projects/kea/-/issues/3310Documentation should include more examples with IPv6 addresses in URLs2024-03-25T12:34:33ZFrancis DupontDocumentation should include more examples with IPv6 addresses in URLsThe reason is the syntax is no so trivial... I suggest to add at least one in ARM (hooks-ha.rst) and in kea6 examples.The reason is the syntax is no so trivial... I suggest to add at least one in ARM (hooks-ha.rst) and in kea6 examples.backloghttps://gitlab.isc.org/isc-projects/kea/-/issues/3256fix issues pointed out in 2.5.5 sanity checks2024-03-27T13:51:03ZWlodzimierz Wencelfix issues pointed out in 2.5.5 sanity checkscomments copied from isc-projects/kea#3238
1.
couple unused warnings reported on freebsd-13.0-amd64 when running distcheck:
```
18:49:50 --- run_unittests-interval_timer_unittest.o ---
18:49:50 ../../../../../../src/lib/asiolink/test...comments copied from isc-projects/kea#3238
1.
couple unused warnings reported on freebsd-13.0-amd64 when running distcheck:
```
18:49:50 --- run_unittests-interval_timer_unittest.o ---
18:49:50 ../../../../../../src/lib/asiolink/tests/interval_timer_unittest.cc:55:28: warning: private field 'test_obj_' is not used [-Wunused-private-field]
18:49:50 IntervalTimerTest* test_obj_;
18:49:50 ^
18:49:50 ../../../../../../src/lib/asiolink/tests/interval_timer_unittest.cc:141:28: warning: private field 'test_obj_' is not used [-Wunused-private-field]
18:49:50 IntervalTimerTest* test_obj_;
18:49:50 ^
18:49:50 2 warnings generated.
```
```
18:49:50 CXX run_unittests-tls_listener_unittests.o
18:49:50 ../../../../../../src/lib/tcp/tests/tls_listener_unittests.cc:38:12: warning: unused variable 'REQUEST_TIMEOUT' [-Wunused-const-variable]
18:49:50 const long REQUEST_TIMEOUT = 10000;
18:49:50 ^
18:49:50 ../../../../../../src/lib/tcp/tests/tls_listener_unittests.cc:42:12: warning: unused variable 'SHORT_REQUEST_TIMEOUT' [-Wunused-const-variable]
18:49:50 const long SHORT_REQUEST_TIMEOUT = 200;
18:49:50 ^
18:49:50 2 warnings generated.
18:49:50 --- run_unittests-tcp_listener_unittests.o ---
18:49:50 ../../../../../../src/lib/tcp/tests/tcp_listener_unittests.cc:43:12: warning: unused variable 'REQUEST_TIMEOUT' [-Wunused-const-variable]
18:49:50 const long REQUEST_TIMEOUT = 10000;
18:49:50 ^
18:49:50 ../../../../../../src/lib/tcp/tests/tcp_listener_unittests.cc:47:12: warning: unused variable 'SHORT_REQUEST_TIMEOUT' [-Wunused-const-variable]
18:49:50 const long SHORT_REQUEST_TIMEOUT = 200;
18:49:50 ^
18:49:50 2 warnings generated.
18:49:50 --- run_unittests ---
```
```
18:49:50 CXX libkea_dhcpsrv_la-ncr_generator.lo
18:49:50 --- libkea_dhcpsrv_la-mysql_lease_mgr.lo ---
18:49:50 ../../../../../src/lib/dhcpsrv/mysql_lease_mgr.cc:89:14: warning: unused variable 'HOSTNAME_MAX_LEN' [-Wunused-const-variable]
18:49:50 const size_t HOSTNAME_MAX_LEN = 255;
18:49:50 ^
18:49:50 ../../../../../src/lib/dhcpsrv/mysql_lease_mgr.cc:95:14: warning: unused variable 'ADDRESS6_TEXT_MAX_LEN' [-Wunused-const-variable]
18:49:50 const size_t ADDRESS6_TEXT_MAX_LEN = 39;
18:49:50 ^
18:49:50 ../../../../../src/lib/dhcpsrv/mysql_lease_mgr.cc:98:14: warning: unused variable 'USER_CONTEXT_MAX_LEN' [-Wunused-const-variable]
18:49:50 const size_t USER_CONTEXT_MAX_LEN = 8192;
18:49:50 ^
18:49:50 3 warnings generated.
18:49:50 --- libkea_dhcpsrv_la-mysql_host_data_source.lo ---
18:49:50 ../../../../../src/lib/dhcpsrv/mysql_host_data_source.cc:1803:25: warning: unused variable 'OPTION_ID_COL' [-Wunused-const-variable]
18:49:50 static const size_t OPTION_ID_COL = 0;
18:49:50 ^
18:49:50 ../../../../../src/lib/dhcpsrv/mysql_host_data_source.cc:1804:25: warning: unused variable 'CODE_COL' [-Wunused-const-variable]
18:49:50 static const size_t CODE_COL = 1;
18:49:50 ^
18:49:50 ../../../../../src/lib/dhcpsrv/mysql_host_data_source.cc:1805:25: warning: unused variable 'VALUE_COL' [-Wunused-const-variable]
18:49:50 static const size_t VALUE_COL = 2;
18:49:50 ^
18:49:50 ../../../../../src/lib/dhcpsrv/mysql_host_data_source.cc:1806:25: warning: unused variable 'FORMATTED_VALUE_COL' [-Wunused-const-variable]
18:49:50 static const size_t FORMATTED_VALUE_COL = 3;
18:49:50 ^
18:49:50 ../../../../../src/lib/dhcpsrv/mysql_host_data_source.cc:1807:25: warning: unused variable 'SPACE_COL' [-Wunused-const-variable]
18:49:50 static const size_t SPACE_COL = 4;
18:49:50 ^
18:49:50 ../../../../../src/lib/dhcpsrv/mysql_host_data_source.cc:1808:25: warning: unused variable 'PERSISTENT_COL' [-Wunused-const-variable]
18:49:50 static const size_t PERSISTENT_COL = 5;
18:49:50 ^
18:49:50 ../../../../../src/lib/dhcpsrv/mysql_host_data_source.cc:1809:25: warning: unused variable 'CANCELLED_COL' [-Wunused-const-variable]
18:49:50 static const size_t CANCELLED_COL = 6;
18:49:50 ^
18:49:50 ../../../../../src/lib/dhcpsrv/mysql_host_data_source.cc:1810:25: warning: unused variable 'USER_CONTEXT_COL' [-Wunused-const-variable]
18:49:50 static const size_t USER_CONTEXT_COL = 7;
18:49:50 ^
18:49:50 ../../../../../src/lib/dhcpsrv/mysql_host_data_source.cc:1811:25: warning: unused variable 'DHCP_SUBNET_ID_COL' [-Wunused-const-variable]
18:49:50 static const size_t DHCP_SUBNET_ID_COL = 8;
18:49:50 ^
18:49:50 ../../../../../src/lib/dhcpsrv/mysql_host_data_source.cc:1812:25: warning: unused variable 'HOST_ID_COL' [-Wunused-const-variable]
18:49:50 static const size_t HOST_ID_COL = 9;
18:49:50 ^
18:49:50 10 warnings generated.
```
on ubuntu-20.04-amd64 and ubuntu-22.04-amd64 running distcheck:
```
19:19:17 make[6]: Entering directory '/home/ubuntu/workspace/kea-dev/ut-distcheck/kea-2.5.5-git/_build/sub/src/lib/mysql'
19:19:17 CXX mysql_connection.lo
19:19:17 CXX mysql_binding.lo
19:19:17 ../../../../../src/lib/mysql/mysql_connection.cc: In member function ‘void isc::db::MySqlConnection::openDatabase()’:
19:19:17 ../../../../../src/lib/mysql/mysql_connection.cc:231:34: warning: ‘bool mysql_ssl_set(MYSQL*, const char*, const char*, const char*, const char*, const char*)’ is deprecated: Use mysql_options() instead. [-Wdeprecated-declarations]
19:19:17 231 | cipher_list);
19:19:17 | ^
19:19:17 In file included from ../../../../../src/lib/mysql/mysql_constants.h:10,
19:19:17 from ../../../../../src/lib/mysql/mysql_binding.h:18,
19:19:17 from ../../../../../src/lib/mysql/mysql_connection.h:15,
19:19:17 from ../../../../../src/lib/mysql/mysql_connection.cc:12:
19:19:17 /usr/include/mysql/mysql.h:464:1: note: declared here
19:19:17 464 | mysql_ssl_set(MYSQL *mysql, const char *key, const char *cert, const char *ca,
19:19:17 | ^~~~~~~~~~~~~
19:19:17 ../../../../../src/lib/mysql/mysql_connection.cc:231:34: warning: ‘bool mysql_ssl_set(MYSQL*, const char*, const char*, const char*, const char*, const char*)’ is deprecated: Use mysql_options() instead. [-Wdeprecated-declarations]
19:19:17 231 | cipher_list);
19:19:17 | ^
19:19:17 In file included from ../../../../../src/lib/mysql/mysql_constants.h:10,
19:19:17 from ../../../../../src/lib/mysql/mysql_binding.h:18,
19:19:17 from ../../../../../src/lib/mysql/mysql_connection.h:15,
19:19:17 from ../../../../../src/lib/mysql/mysql_connection.cc:12:
19:19:17 /usr/include/mysql/mysql.h:464:1: note: declared here
19:19:17 464 | mysql_ssl_set(MYSQL *mysql, const char *key, const char *cert, const char *ca,
19:19:17 | ^~~~~~~~~~~~~
```
```
19:19:17
19:19:17 [----------] 20 tests from MySqlConnectionTest
19:19:17 [ RUN ] MySqlConnectionTest.select
19:19:17 WARNING: MYSQL_OPT_RECONNECT is deprecated and will be removed in a future version.
19:19:17 [ OK ] MySqlConnectionTest.select (861 ms)
19:19:17 [ RUN ] MySqlConnectionTest.selectNullInteger
19:19:17 WARNING: MYSQL_OPT_RECONNECT is deprecated and will be removed in a future version.
```
running ut-extended on debian-11-aarch64 and debian-12-aarch64:
```
16:06:36 /bin/bash ../../../libtool --tag=CXX --mode=compile ccache c++ -DHAVE_CONFIG_H -I. -I../../.. -I../../../src/lib -I../../../src/lib -DOS_LINUX -I../../.. -I../../.. -Wall -Wextra -Wnon-virtual-dtor -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare -pthread -Wno-missing-field-initializers -fPIC -g3 -ggdb -O0 -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -MT simple_parser.lo -MD -MP -MF .deps/simple_parser.Tpo -c -o simple_parser.lo simple_parser.cc
16:06:36 libtool: compile: ccache c++ -DHAVE_CONFIG_H -I. -I../../.. -I../../../src/lib -I../../../src/lib -DOS_LINUX -I../../.. -I../../.. -Wall -Wextra -Wnon-virtual-dtor -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare -pthread -Wno-missing-field-initializers -fPIC -g3 -ggdb -O0 -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -MT server_tag.lo -MD -MP -MF .deps/server_tag.Tpo -c server_tag.cc -fPIC -DPIC -o .libs/server_tag.o
16:06:36 libtool: compile: ccache c++ -DHAVE_CONFIG_H -I. -I../../.. -I../../../src/lib -I../../../src/lib -DOS_LINUX -I../../.. -I../../.. -Wall -Wextra -Wnon-virtual-dtor -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare -pthread -Wno-missing-field-initializers -fPIC -g3 -ggdb -O0 -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -MT simple_parser.lo -MD -MP -MF .deps/simple_parser.Tpo -c simple_parser.cc -fPIC -DPIC -o .libs/simple_parser.o
16:06:37 data.cc: In member function ‘virtual void isc::data::StringElement::toJSON(std::ostream&) const’:
16:06:37 data.cc:905:21: warning: comparison is always true due to limited range of data type [-Wtype-limits]
16:06:37 905 | if (((c >= 0) && (c < 0x20)) || (c < 0) || (c >= 0x7f)) {
16:06:37 | ~~^~~~
16:06:37 data.cc:905:48: warning: comparison is always false due to limited range of data type [-Wtype-limits]
16:06:37 905 | if (((c >= 0) && (c < 0x20)) || (c < 0) || (c >= 0x7f)) {
16:06:37 |
```
```
16:08:33 /bin/bash ../../../libtool --tag=CXX --mode=compile ccache c++ -DHAVE_CONFIG_H -I. -I../../.. -I../../../src/lib -I../../../src/lib -DOS_LINUX -I../../.. -I../../.. -Wall -Wextra -Wnon-virtual-dtor -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare -pthread -Wno-missing-field-initializers -fPIC -g3 -ggdb -O0 -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -MT libkea_http_la-http_message_parser_base.lo -MD -MP -MF .deps/libkea_http_la-http_message_parser_base.Tpo -c -o libkea_http_la-http_message_parser_base.lo `test -f 'http_message_parser_base.cc' || echo './'`http_message_parser_base.cc
16:08:33 libtool: compile: ccache c++ -DHAVE_CONFIG_H -I. -I../../.. -I../../../src/lib -I../../../src/lib -DOS_LINUX -I../../.. -I../../.. -Wall -Wextra -Wnon-virtual-dtor -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare -pthread -Wno-missing-field-initializers -fPIC -g3 -ggdb -O0 -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -MT libkea_http_la-http_message_parser_base.lo -MD -MP -MF .deps/libkea_http_la-http_message_parser_base.Tpo -c http_message_parser_base.cc -fPIC -DPIC -o .libs/libkea_http_la-http_message_parser_base.o
16:08:33 http_message_parser_base.cc: In member function ‘bool isc::http::HttpMessageParserBase::isChar(char) const’:
16:08:33 http_message_parser_base.cc:266:15: warning: comparison is always true due to limited range of data type [-Wtype-limits]
16:08:33 266 | return (c >= 0);
16:08:33 | ~~^~~~
16:08:33 http_message_parser_base.cc: In member function ‘bool isc::http::HttpMessageParserBase::isCtl(char) const’:
16:08:33 http_message_parser_base.cc:271:17: warning: comparison is always true due to limited range of data type [-Wtype-limits]
16:08:33 271 | return (((c >= 0) && (c <= 31)) || (c == 127));
16:08:33 |
```
2.
On macOS 14.2.1 got a build problem during sanity checks:
```
mysql_legal_log.cc:33:1: error: implicit instantiation of undefined template 'boost::array<isc::db::TaggedStatement, 1>'
tagged_statements = { {
^
/usr/local/include/boost/lexical_cast/detail/converter_lexical.hpp:56:11: note: template is declared here
class array;
^
1 error generated.
```
Fixed by adding an explicit include of boost/array.hpp
3.
compilation erro on macOS:
```
mysql_connection.cc:230:9: error: use of undeclared identifier 'mysql_ssl_set'
mysql_ssl_set(mysql_, key_file, cert_file, ca_file, ca_dir,
^
1 error generated.
make[5]: *** [mysql_connection.lo] Error 1
```
fix:
```
< mysql_ssl_set(mysql_, key_file, cert_file, ca_file, ca_dir,
< cipher_list);
---
> mysql_options(mysql_, MYSQL_OPT_SSL_KEY, key_file);
> mysql_options(mysql_, MYSQL_OPT_SSL_CERT, cert_file);
> mysql_options(mysql_, MYSQL_OPT_SSL_CA, ca_file);
> mysql_options(mysql_, MYSQL_OPT_SSL_CAPATH, ca_dir);
> mysql_options(mysql_, MYSQL_OPT_SSL_CIPHER, cipher_list); cipher_list);
```
4.
also minor:
```
../../../../src/lib/mysql/mysql_connection.h:579:22: warning: 'mysql_stmt_bind_param' is deprecated: Use mysql_stmt_bind_named_param() instead. [-Wdeprecated-declarations]
int status = mysql_stmt_bind_param(getStatement(index),
^
./mysql_cb_impl.h:294:23: note: in instantiation of function template specialization 'isc::db::MySqlConnection::updateDeleteQuery<int>' requested here
return (conn_.updateDeleteQuery(index, in_bindings));
^
/usr/local/Cellar/mysql/8.3.0/include/mysql/mysql.h:764:3: note: 'mysql_stmt_bind_param' has been explicitly marked deprecated here
[[deprecated("Use mysql_stmt_bind_named_param() instead.")]]
^
In file included from mysql_cb_impl.cc:9:
In file included from ./mysql_cb_impl.h:25:
../../../../src/lib/mysql/mysql_connection.h:535:22: warning: 'mysql_stmt_bind_param' is deprecated: Use mysql_stmt_bind_named_param() instead. [-Wdeprecated-declarations]
int status = mysql_stmt_bind_param(getStatement(index),
^
mysql_cb_impl.cc:208:11: note: in instantiation of function template specialization 'isc::db::MySqlConnection::insertQuery<int>' requested here
conn_.insertQuery(index, in_bindings);
^
/usr/local/Cellar/mysql/8.3.0/include/mysql/mysql.h:764:3: note: 'mysql_stmt_bind_param' has been explicitly marked deprecated here
[[deprecated("Use mysql_stmt_bind_named_param() instead.")]]
^
In file included from mysql_cb_impl.cc:9:
In file included from ./mysql_cb_impl.h:25:
../../../../src/lib/mysql/mysql_connection.h:460:22: warning: 'mysql_stmt_bind_param' is deprecated: Use mysql_stmt_bind_named_param() instead. [-Wdeprecated-declarations]
status = mysql_stmt_bind_param(getStatement(index),
^
mysql_cb_impl.cc:247:15: note: in instantiation of function template specialization 'isc::db::MySqlConnection::selectQuery<int>' requested here
conn_.selectQuery(index, in_bindings, out_bindings,
^
/usr/local/Cellar/mysql/8.3.0/include/mysql/mysql.h:764:3: note: 'mysql_stmt_bind_param' has been explicitly marked deprecated here
[[deprecated("Use mysql_stmt_bind_named_param() instead.")]]
^
In file included from mysql_cb_callouts.cc:16:
In file included from ./mysql_cb_impl.h:25:
../../../../src/lib/mysql/mysql_connection.h:579:22: warning: 'mysql_stmt_bind_param' is deprecated: Use mysql_stmt_bind_named_param() instead. [-Wdeprecated-declarations]
int status = mysql_stmt_bind_param(getStatement(index),
^
./mysql_cb_impl.h:294:23: note: in instantiation of function template specialization 'isc::db::MySqlConnection::updateDeleteQuery<int>' requested here
return (conn_.updateDeleteQuery(index, in_bindings));
^
/usr/local/Cellar/mysql/8.3.0/include/mysql/mysql.h:764:3: note: 'mysql_stmt_bind_param' has been explicitly marked deprecated here
[[deprecated("Use mysql_stmt_bind_named_param() instead.")]]
^
In file included from mysql_cb_dhcp6.cc:10:
In file included from ./mysql_cb_dhcp6.h:10:
In file included from ./mysql_cb_impl.h:25:
../../../../src/lib/mysql/mysql_connection.h:579:22: warning: 'mysql_stmt_bind_param' is deprecated: Use mysql_stmt_bind_named_param() instead. [-Wdeprecated-declarations]
int status = mysql_stmt_bind_param(getStatement(index),
^
./mysql_cb_impl.h:294:23: note: in instantiation of function template specialization 'isc::db::MySqlConnection::updateDeleteQuery<int>' requested here
return (conn_.updateDeleteQuery(index, in_bindings));
^
/usr/local/Cellar/mysql/8.3.0/include/mysql/mysql.h:764:3: note: 'mysql_stmt_bind_param' has been explicitly marked deprecated here
[[deprecated("Use mysql_stmt_bind_named_param() instead.")]]
^
In file included from mysql_cb_dhcp4.cc:9:
In file included from ./mysql_cb_dhcp4.h:10:
In file included from ./mysql_cb_impl.h:25:
../../../../src/lib/mysql/mysql_connection.h:579:22: warning: 'mysql_stmt_bind_param' is deprecated: Use mysql_stmt_bind_named_param() instead. [-Wdeprecated-declarations]
int status = mysql_stmt_bind_param(getStatement(index),
^
./mysql_cb_impl.h:294:23: note: in instantiation of function template specialization 'isc::db::MySqlConnection::updateDeleteQuery<int>' requested here
return (conn_.updateDeleteQuery(index, in_bindings));
^
/usr/local/Cellar/mysql/8.3.0/include/mysql/mysql.h:764:3: note: 'mysql_stmt_bind_param' has been explicitly marked deprecated here
[[deprecated("Use mysql_stmt_bind_named_param() instead.")]]
^
In file included from mysql_cb_dhcp6.cc:10:
In file included from ./mysql_cb_dhcp6.h:10:
In file included from ./mysql_cb_impl.h:25:
../../../../src/lib/mysql/mysql_connection.h:579:22: warning: 'mysql_stmt_bind_param' is deprecated: Use mysql_stmt_bind_named_param() instead. [-Wdeprecated-declarations]
int status = mysql_stmt_bind_param(getStatement(index),
^
mysql_cb_dhcp6.cc:251:19: note: in instantiation of function template specialization 'isc::db::MySqlConnection::updateDeleteQuery<isc::dhcp::MySqlConfigBackendDHCPv6Impl::StatementIndex>' requested here
if (conn_.updateDeleteQuery(MySqlConfigBackendDHCPv6Impl::UPDATE_GLOBAL_PARAMETER6,
^
/usr/local/Cellar/mysql/8.3.0/include/mysql/mysql.h:764:3: note: 'mysql_stmt_bind_param' has been explicitly marked deprecated here
[[deprecated("Use mysql_stmt_bind_named_param() instead.")]]
^
In file included from mysql_cb_dhcp6.cc:10:
In file included from ./mysql_cb_dhcp6.h:10:
In file included from ./mysql_cb_impl.h:25:
../../../../src/lib/mysql/mysql_connection.h:535:22: warning: 'mysql_stmt_bind_param' is deprecated: Use mysql_stmt_bind_named_param() instead. [-Wdeprecated-declarations]
int status = mysql_stmt_bind_param(getStatement(index),
^
mysql_cb_dhcp6.cc:257:19: note: in instantiation of function template specialization 'isc::db::MySqlConnection::insertQuery<isc::dhcp::MySqlConfigBackendDHCPv6Impl::StatementIndex>' requested here
conn_.insertQuery(MySqlConfigBackendDHCPv6Impl::INSERT_GLOBAL_PARAMETER6,
^
/usr/local/Cellar/mysql/8.3.0/include/mysql/mysql.h:764:3: note: 'mysql_stmt_bind_param' has been explicitly marked deprecated here
[[deprecated("Use mysql_stmt_bind_named_param() instead.")]]
^
In file included from mysql_cb_dhcp6.cc:10:
In file included from ./mysql_cb_dhcp6.h:10:
In file included from ./mysql_cb_impl.h:25:
../../../../src/lib/mysql/mysql_connection.h:460:22: warning: 'mysql_stmt_bind_param' is deprecated: Use mysql_stmt_bind_named_param() instead. [-Wdeprecated-declarations]
status = mysql_stmt_bind_param(getStatement(index),
^
mysql_cb_dhcp6.cc:407:15: note: in instantiation of function template specialization 'isc::db::MySqlConnection::selectQuery<isc::dhcp::MySqlConfigBackendDHCPv6Impl::StatementIndex>' requested here
conn_.selectQuery(index, in_bindings, out_bindings,
^
/usr/local/Cellar/mysql/8.3.0/include/mysql/mysql.h:764:3: note: 'mysql_stmt_bind_param' has been explicitly marked deprecated here
[[deprecated("Use mysql_stmt_bind_named_param() instead.")]]
^
In file included from mysql_cb_dhcp4.cc:9:
In file included from ./mysql_cb_dhcp4.h:10:
In file included from ./mysql_cb_impl.h:25:
../../../../src/lib/mysql/mysql_connection.h:579:22: warning: 'mysql_stmt_bind_param' is deprecated: Use mysql_stmt_bind_named_param() instead. [-Wdeprecated-declarations]
int status = mysql_stmt_bind_param(getStatement(index),
^
mysql_cb_dhcp4.cc:242:19: note: in instantiation of function template specialization 'isc::db::MySqlConnection::updateDeleteQuery<isc::dhcp::MySqlConfigBackendDHCPv4Impl::StatementIndex>' requested here
if (conn_.updateDeleteQuery(MySqlConfigBackendDHCPv4Impl::UPDATE_GLOBAL_PARAMETER4,
^
/usr/local/Cellar/mysql/8.3.0/include/mysql/mysql.h:764:3: note: 'mysql_stmt_bind_param' has been explicitly marked deprecated here
[[deprecated("Use mysql_stmt_bind_named_param() instead.")]]
^
In file included from mysql_cb_dhcp4.cc:9:
In file included from ./mysql_cb_dhcp4.h:10:
In file included from ./mysql_cb_impl.h:25:
../../../../src/lib/mysql/mysql_connection.h:535:22: warning: 'mysql_stmt_bind_param' is deprecated: Use mysql_stmt_bind_named_param() instead. [-Wdeprecated-declarations]
int status = mysql_stmt_bind_param(getStatement(index),
^
mysql_cb_dhcp4.cc:248:19: note: in instantiation of function template specialization 'isc::db::MySqlConnection::insertQuery<isc::dhcp::MySqlConfigBackendDHCPv4Impl::StatementIndex>' requested here
conn_.insertQuery(MySqlConfigBackendDHCPv4Impl::INSERT_GLOBAL_PARAMETER4,
^
/usr/local/Cellar/mysql/8.3.0/include/mysql/mysql.h:764:3: note: 'mysql_stmt_bind_param' has been explicitly marked deprecated here
[[deprecated("Use mysql_stmt_bind_named_param() instead.")]]
^
In file included from mysql_cb_dhcp4.cc:9:
In file included from ./mysql_cb_dhcp4.h:10:
In file included from ./mysql_cb_impl.h:25:
../../../../src/lib/mysql/mysql_connection.h:460:22: warning: 'mysql_stmt_bind_param' is deprecated: Use mysql_stmt_bind_named_param() instead. [-Wdeprecated-declarations]
status = mysql_stmt_bind_param(getStatement(index),
^
mysql_cb_dhcp4.cc:371:15: note: in instantiation of function template specialization 'isc::db::MySqlConnection::selectQuery<isc::dhcp::MySqlConfigBackendDHCPv4Impl::StatementIndex>' requested here
conn_.selectQuery(index, in_bindings, out_bindings,
^
/usr/local/Cellar/mysql/8.3.0/include/mysql/mysql.h:764:3: note: 'mysql_stmt_bind_param' has been explicitly marked deprecated here
[[deprecated("Use mysql_stmt_bind_named_param() instead.")]]
^
```
```
In file included from mysql_cb_impl_unittest.cc:8:
In file included from ../../../../../src/hooks/dhcp/mysql_cb/mysql_cb_impl.h:25:
../../../../../src/lib/mysql/mysql_connection.h:579:22: warning: 'mysql_stmt_bind_param' is deprecated: Use mysql_stmt_bind_named_param() instead. [-Wdeprecated-declarations]
int status = mysql_stmt_bind_param(getStatement(index),
^
../../../../../src/hooks/dhcp/mysql_cb/mysql_cb_impl.h:294:23: note: in instantiation of function template specialization 'isc::db::MySqlConnection::updateDeleteQuery<int>' requested here
return (conn_.updateDeleteQuery(index, in_bindings));
^
/usr/local/Cellar/mysql/8.3.0/include/mysql/mysql.h:764:3: note: 'mysql_stmt_bind_param' has been explicitly marked deprecated here
[[deprecated("Use mysql_stmt_bind_named_param() instead.")]]
^
1 warning generated.
In file included from mysql_cb_dhcp4_mgr_unittest.cc:10:
In file included from ../../../../../src/hooks/dhcp/mysql_cb/mysql_cb_dhcp4.h:10:
In file included from ../../../../../src/hooks/dhcp/mysql_cb/mysql_cb_impl.h:25:
../../../../../src/lib/mysql/mysql_connection.h:579:22: warning: 'mysql_stmt_bind_param' is deprecated: Use mysql_stmt_bind_named_param() instead. [-Wdeprecated-declarations]
int status = mysql_stmt_bind_param(getStatement(index),
^
../../../../../src/hooks/dhcp/mysql_cb/mysql_cb_impl.h:294:23: note: in instantiation of function template specialization 'isc::db::MySqlConnection::updateDeleteQuery<int>' requested here
return (conn_.updateDeleteQuery(index, in_bindings));
^
/usr/local/Cellar/mysql/8.3.0/include/mysql/mysql.h:764:3: note: 'mysql_stmt_bind_param' has been explicitly marked deprecated here
[[deprecated("Use mysql_stmt_bind_named_param() instead.")]]
^
In file included from mysql_cb_dhcp6_mgr_unittest.cc:10:
In file included from ../../../../../src/hooks/dhcp/mysql_cb/mysql_cb_dhcp6.h:10:
In file included from ../../../../../src/hooks/dhcp/mysql_cb/mysql_cb_impl.h:25:
../../../../../src/lib/mysql/mysql_connection.h:579:22: warning: 'mysql_stmt_bind_param' is deprecated: Use mysql_stmt_bind_named_param() instead. [-Wdeprecated-declarations]
int status = mysql_stmt_bind_param(getStatement(index),
^
../../../../../src/hooks/dhcp/mysql_cb/mysql_cb_impl.h:294:23: note: in instantiation of function template specialization 'isc::db::MySqlConnection::updateDeleteQuery<int>' requested here
return (conn_.updateDeleteQuery(index, in_bindings));
^
/usr/local/Cellar/mysql/8.3.0/include/mysql/mysql.h:764:3: note: 'mysql_stmt_bind_param' has been explicitly marked deprecated here
[[deprecated("Use mysql_stmt_bind_named_param() instead.")]]
^
1 warning generated.
1 warning generated.
In file included from mysql_cb_dhcp4_unittest.cc:15:
In file included from ../../../../../src/lib/dhcpsrv/testutils/mysql_generic_backend_unittest.h:11:
../../../../../src/lib/mysql/mysql_connection.h:579:22: warning: 'mysql_stmt_bind_param' is deprecated: Use mysql_stmt_bind_named_param() instead. [-Wdeprecated-declarations]
int status = mysql_stmt_bind_param(getStatement(index),
^
../../../../../src/hooks/dhcp/mysql_cb/mysql_cb_impl.h:294:23: note: in instantiation of function template specialization 'isc::db::MySqlConnection::updateDeleteQuery<int>' requested here
return (conn_.updateDeleteQuery(index, in_bindings));
^
/usr/local/Cellar/mysql/8.3.0/include/mysql/mysql.h:764:3: note: 'mysql_stmt_bind_param' has been explicitly marked deprecated here
[[deprecated("Use mysql_stmt_bind_named_param() instead.")]]
^
In file included from mysql_cb_dhcp6_unittest.cc:15:
In file included from ../../../../../src/lib/dhcpsrv/testutils/mysql_generic_backend_unittest.h:11:
../../../../../src/lib/mysql/mysql_connection.h:579:22: warning: 'mysql_stmt_bind_param' is deprecated: Use mysql_stmt_bind_named_param() instead. [-Wdeprecated-declarations]
int status = mysql_stmt_bind_param(getStatement(index),
^
../../../../../src/hooks/dhcp/mysql_cb/mysql_cb_impl.h:294:23: note: in instantiation of function template specialization 'isc::db::MySqlConnection::updateDeleteQuery<int>' requested here
return (conn_.updateDeleteQuery(index, in_bindings));
^
/usr/local/Cellar/mysql/8.3.0/include/mysql/mysql.h:764:3: note: 'mysql_stmt_bind_param' has been explicitly marked deprecated here
[[deprecated("Use mysql_stmt_bind_named_param() instead.")]]
^
1 warning generated.
```
```
mysql_legal_log.cc:382:18: warning: 'mysql_stmt_bind_param' is deprecated: Use mysql_stmt_bind_named_param() instead. [-Wdeprecated-declarations]
int status = mysql_stmt_bind_param(ctx->conn_.getStatement(INSERT_LOG),
^
/usr/local/Cellar/mysql/8.3.0/include/mysql/mysql.h:764:3: note: 'mysql_stmt_bind_param' has been explicitly marked deprecated here
[[deprecated("Use mysql_stmt_bind_named_param() instead.")]]
^
1 warning generated.
```
Reported by @razvan and @fdupont , thank you :)kea2.6.0https://gitlab.isc.org/isc-projects/kea/-/issues/3221Minor doc update: server limitations update after ping-check2024-03-20T11:29:29ZTomek MrugalskiMinor doc update: server limitations update after ping-checkThe section 8.12 (DHCPv4 server limitations) still claims this:
> _The DHCPv4 server does not verify that an assigned address is unused. According to RFC 2131, the allocating server should verify that an address is not used by sending a...The section 8.12 (DHCPv4 server limitations) still claims this:
> _The DHCPv4 server does not verify that an assigned address is unused. According to RFC 2131, the allocating server should verify that an address is not used by sending an ICMP echo request._
This is no longer true after ping-check was implemented.kea2.6.0https://gitlab.isc.org/isc-projects/kea/-/issues/3203DHCPINFORM is only logged on DEBUG level2024-03-27T13:50:18ZBernhard SchmidtDHCPINFORM is only logged on DEBUG level**Describe the bug**
I'm currently working on a project to migrate a Windows DHCP server environment to Kea. Right now both are active and I'm looking at logs and tcpdump captures while fiddling with the config.
I got confused because ...**Describe the bug**
I'm currently working on a project to migrate a Windows DHCP server environment to Kea. Right now both are active and I'm looking at logs and tcpdump captures while fiddling with the config.
I got confused because there were DHCPACK messages originated by the Kea server while there was not a single log entry visible. Increasing the logging verbosity to DEBUG shows a large number of messages, all with severity DEBUG.
Kea should not interact with clients over the network without logging.
**To Reproduce**
Steps to reproduce the behavior:
1. Run Kea dhcpv4 with a logging config like https://gitlab.isc.org/isc-projects/kea/-/blob/master/doc/examples/kea4/single-subnet.json?ref_type=heads
2. have a client send DHCPINFORM while running tcpdump
3. observe a DHCPACK being generated in tcpdump with Kea not logging a single line
**Expected behavior**
At least one line should be logged on INFO level when Kea is receiving and answering a DHCPINFORM request.
**Environment:**
- Kea version: 2.4.1
- OS: Debian Bookworm
**Additional Information**
```
2024-01-02 20:14:36.523 DEBUG [kea-dhcp4.packets/1.140376903606784] DHCP4_BUFFER_RECEIVED received buffer from 10.1.0.142:68 to 255.255.255.255:67 over interface ens19
dhcp4_1 | 2024-01-02 20:14:36.524 DEBUG [kea-dhcp4.dhcpsrv/1.140376869664512] DHCPSRV_SUBNET4_SELECT_NO_RAI_OPTIONS No RAI options found to use for subnet selection.
dhcp4_1 | 2024-01-02 20:14:36.524 DEBUG [kea-dhcp4.dhcpsrv/1.140376869664512] DHCPSRV_SUBNET4_SELECT_NO_RELAY_ADDRESS Relay address (giaddr) in client packet is empty.
dhcp4_1 | 2024-01-02 20:14:36.524 DEBUG [kea-dhcp4.dhcpsrv/1.140376869664512] DHCPSRV_SUBNET4_SELECT_BY_INTERFACE_NO_MATCH No subnet matches interface: ens19
dhcp4_1 | 2024-01-02 20:14:36.524 DEBUG [kea-dhcp4.dhcpsrv/1.140376869664512] DHCPSRV_CFGMGR_SUBNET4_ADDR selected subnet 10.1.0.0/16 for packet received by matching address 10.1.4.1
dhcp4_1 | 2024-01-02 20:14:36.524 DEBUG [kea-dhcp4.packets/1.140376869664512] DHCP4_SUBNET_SELECTED [hwtype=1 ee:bd:63:c3:73:93], cid=[01:ee:bd:63:c3:73:93], tid=0xfe6e0c6f: the subnet with ID 10001000 was selected for client assignments
dhcp4_1 | 2024-01-02 20:14:36.524 DEBUG [kea-dhcp4.packets/1.140376869664512] DHCP4_PACKET_RECEIVED [hwtype=1 ee:bd:63:c3:73:93], cid=[01:ee:bd:63:c3:73:93], tid=0xfe6e0c6f: DHCPINFORM (type 8) received from 10.1.0.142 to 255.255.255.255 on interface ens19
dhcp4_1 | 2024-01-02 20:14:36.524 DEBUG [kea-dhcp4.dhcpsrv/1.140376869664512] DHCPSRV_SUBNET4_SELECT_NO_RAI_OPTIONS No RAI options found to use for subnet selection.
dhcp4_1 | 2024-01-02 20:14:36.524 DEBUG [kea-dhcp4.dhcpsrv/1.140376869664512] DHCPSRV_SUBNET4_SELECT_NO_RELAY_ADDRESS Relay address (giaddr) in client packet is empty.
dhcp4_1 | 2024-01-02 20:14:36.524 DEBUG [kea-dhcp4.dhcpsrv/1.140376869664512] DHCPSRV_SUBNET4_SELECT_BY_INTERFACE_NO_MATCH No subnet matches interface: ens19
dhcp4_1 | 2024-01-02 20:14:36.524 DEBUG [kea-dhcp4.dhcpsrv/1.140376869664512] DHCPSRV_CFGMGR_SUBNET4_ADDR selected subnet 10.1.0.0/16 for packet received by matching address 10.1.4.1
dhcp4_1 | 2024-01-02 20:14:36.524 DEBUG [kea-dhcp4.packets/1.140376869664512] DHCP4_SUBNET_SELECTED [hwtype=1 ee:bd:63:c3:73:93], cid=[01:ee:bd:63:c3:73:93], tid=0xfe6e0c6f: the subnet with ID 10001000 was selected for client assignments
dhcp4_1 | 2024-01-02 20:14:36.524 DEBUG [kea-dhcp4.hosts/1.140376869664512] HOSTS_CFG_GET_ONE_SUBNET_ID_IDENTIFIER get one host with IPv4 reservation for subnet id 0, identified by hwaddr=EEBD63C37393
dhcp4_1 | 2024-01-02 20:14:36.524 DEBUG [kea-dhcp4.hosts/1.140376869664512] HOSTS_CFG_GET_ALL_IDENTIFIER get all hosts with reservations using identifier: hwaddr=EEBD63C37393
dhcp4_1 | 2024-01-02 20:14:36.524 DEBUG [kea-dhcp4.hosts/1.140376869664512] HOSTS_CFG_GET_ALL_IDENTIFIER_COUNT using identifier hwaddr=EEBD63C37393, found 1 host(s)
dhcp4_1 | 2024-01-02 20:14:36.524 DEBUG [kea-dhcp4.hosts/1.140376869664512] HOSTS_CFG_GET_ONE_SUBNET_ID_IDENTIFIER_NULL host not found using subnet id 0 and identifier hwaddr=EEBD63C37393
dhcp4_1 | 2024-01-02 20:14:36.524 DEBUG [kea-dhcp4.hosts/1.140376869664512] HOSTS_CFG_GET_ONE_SUBNET_ID_IDENTIFIER get one host with IPv4 reservation for subnet id 0, identified by client-id=01EEBD63C37393
dhcp4_1 | 2024-01-02 20:14:36.524 DEBUG [kea-dhcp4.hosts/1.140376869664512] HOSTS_CFG_GET_ALL_IDENTIFIER get all hosts with reservations using identifier: client-id=01EEBD63C37393
dhcp4_1 | 2024-01-02 20:14:36.524 DEBUG [kea-dhcp4.hosts/1.140376869664512] HOSTS_CFG_GET_ALL_IDENTIFIER_COUNT using identifier client-id=01EEBD63C37393, found 0 host(s)
dhcp4_1 | 2024-01-02 20:14:36.524 DEBUG [kea-dhcp4.hosts/1.140376869664512] HOSTS_CFG_GET_ONE_SUBNET_ID_IDENTIFIER_NULL host not found using subnet id 0 and identifier client-id=01EEBD63C37393
dhcp4_1 | 2024-01-02 20:14:36.524 DEBUG [kea-dhcp4.hosts/1.140376869664512] HOSTS_CFG_GET_ONE_SUBNET_ID_IDENTIFIER get one host with IPv4 reservation for subnet id 10001000, identified by hwaddr=EEBD63C37393
dhcp4_1 | 2024-01-02 20:14:36.524 DEBUG [kea-dhcp4.hosts/1.140376869664512] HOSTS_CFG_GET_ALL_IDENTIFIER get all hosts with reservations using identifier: hwaddr=EEBD63C37393
dhcp4_1 | 2024-01-02 20:14:36.524 DEBUG [kea-dhcp4.hosts/1.140376869664512] HOSTS_CFG_GET_ALL_IDENTIFIER_COUNT using identifier hwaddr=EEBD63C37393, found 1 host(s)
dhcp4_1 | 2024-01-02 20:14:36.524 DEBUG [kea-dhcp4.hosts/1.140376869664512] HOSTS_CFG_GET_ONE_SUBNET_ID_IDENTIFIER_HOST using subnet id 10001000 and identifier hwaddr=EEBD63C37393, found host: hwaddr=EEBD63C37393 ipv4_subnet_id=10001000 hostname=(empty) ipv4_reservation=10.1.0.142 siaddr=(no) sname=(empty) file=(empty) key=(empty) ipv6_reservations=(none)
dhcp4_1 | 2024-01-02 20:14:36.524 DEBUG [kea-dhcp4.dhcp4/1.140376869664512] DHCP4_CLASS_ASSIGNED [hwtype=1 ee:bd:63:c3:73:93], cid=[01:ee:bd:63:c3:73:93], tid=0xfe6e0c6f: client packet has been assigned to the following class(es): KNOWN
dhcp4_1 | 2024-01-02 20:14:36.524 DEBUG [kea-dhcp4.dhcp4/1.140376869664512] DHCP4_CLASS_ASSIGNED [hwtype=1 ee:bd:63:c3:73:93], cid=[01:ee:bd:63:c3:73:93], tid=0xfe6e0c6f: client packet has been assigned to the following class(es): ALL, VENDOR_CLASS_MSFT 5.0, KNOWN
dhcp4_1 | 2024-01-02 20:14:36.524 DEBUG [kea-dhcp4.packets/1.140376869664512] DHCP4_PACKET_SEND [hwtype=1 ee:bd:63:c3:73:93], cid=[01:ee:bd:63:c3:73:93], tid=0xfe6e0c6f: trying to send packet DHCPACK (type 5) from 10.1.4.1:67 to 10.1.0.142:68 on interface ens19
```kea2.6.0https://gitlab.isc.org/isc-projects/kea/-/issues/3185Coverity detected invalid iterator in perfdhcp2024-02-21T10:10:08ZPiotrek ZadrogaCoverity detected invalid iterator in perfdhcpThis might be a false positive, but it could be double checked anyway:
> In `isc::perfdhcp::AvalancheScen::resendPackets(isc::perfdhcp::ExchangeType):` An invalid or past-the-end iterator is being used
```c++
// get some th...This might be a false positive, but it could be double checked anyway:
> In `isc::perfdhcp::AvalancheScen::resendPackets(isc::perfdhcp::ExchangeType):` An invalid or past-the-end iterator is being used
```c++
// get some things from previous retransmissions
auto start_time = pkt->getTimestamp();
int current_pkt_resent_cnt = 0;
auto r_it = retrans.find(trans_id);
if (r_it != retrans.end()) {
start_time = (*start_times.find(trans_id)).second;
current_pkt_resent_cnt = (*r_it).second;
} else {
start_times[trans_id] = start_time;
}
```
> Dereferencing iterator `start_times->find(trans_id)` though it is already past the end of its container.
`CID 1533337`kea2.5.6Razvan BecheriuRazvan Becheriuhttps://gitlab.isc.org/isc-projects/kea/-/issues/3182Avoid copy in range-based for loops2023-12-05T09:30:15ZFrancis DupontAvoid copy in range-based for loopsAs coverity reports there are some range-based for loops in Kea code where the range-expression (ab)using the `auto` keyword is copied at eache iterations when a better declaration (i.e. `const auto&`) works well with a better performanc...As coverity reports there are some range-based for loops in Kea code where the range-expression (ab)using the `auto` keyword is copied at eache iterations when a better declaration (i.e. `const auto&`) works well with a better performance (compilers should infer a better type but this is not specified for C++...).https://gitlab.isc.org/isc-projects/kea/-/issues/3160Too many nullable fields in DB schema?2023-11-23T14:48:53ZDavid KraeutmannToo many nullable fields in DB schema?I'm writing an admin tool for the Kea DB and noticed that a lot of fields in lease4/lease6 are nullable even when they shouldn't be. This adds a lot of handling overhead.
For example, in lease4, most of the columns are nullable, but onl...I'm writing an admin tool for the Kea DB and noticed that a lot of fields in lease4/lease6 are nullable even when they shouldn't be. This adds a lot of handling overhead.
For example, in lease4, most of the columns are nullable, but only relay_id and remote_id are actually possibly set to NULL in the Kea code.
What is the design decision behind that?backloghttps://gitlab.isc.org/isc-projects/kea/-/issues/3130ax_gtest.m4 needs further small improvement2024-02-21T16:25:39ZPiotrek Zadrogaax_gtest.m4 needs further small improvementDuring Kea 2.5.3 rc2 sanity checks it turned out that in case `./configure --with-gtest-source` is called with a path with trailing slash `/`, e.g.
```
--with-gtest-source=/usr/src/googletest/googletest/
```
the gtest version could not b...During Kea 2.5.3 rc2 sanity checks it turned out that in case `./configure --with-gtest-source` is called with a path with trailing slash `/`, e.g.
```
--with-gtest-source=/usr/src/googletest/googletest/
```
the gtest version could not be correctly detected (https://gitlab.isc.org/isc-projects/kea/-/issues/3126#note_412356).
This is a follow up to #3065
Trailing slash is a special case and the script needs small patch for that.kea2.5.6Piotrek ZadrogaPiotrek Zadrogahttps://gitlab.isc.org/isc-projects/kea/-/issues/3119Coverity scan issues2024-02-06T12:55:09ZPiotrek ZadrogaCoverity scan issuesI triaged new issues detected by Coverity scan and below ones could be checked more carefully:
- High: `time_t` casting to `uint_32` - assuming we are doing `static_cast`, we should be ok until year 2106. One cases misses the `static_ca...I triaged new issues detected by Coverity scan and below ones could be checked more carefully:
- High: `time_t` casting to `uint_32` - assuming we are doing `static_cast`, we should be ok until year 2106. One cases misses the `static_cast`.
- https://scan5.scan.coverity.com/reports.htm#v60426/p10289/fileInstanceId=250303669&defectInstanceId=53277773&mergedDefectId=1533185
- Medium: dereferencing invalid iterator - in most cases it seems to be false positive, but there is one place where it could be checked - this could have separate ticket
- https://scan5.scan.coverity.com/reports.htm#v60426/p10289/fileInstanceId=250303968&defectInstanceId=53270168&mergedDefectId=1533337
- Low: used `auto` causing copy - this is low priority, but could be fixed anyway, just `const auto&` could be used.
- https://scan5.scan.coverity.com/reports.htm#v60426/p10289/fileInstanceId=250303713&defectInstanceId=53363199&mergedDefectId=1539484
- https://scan5.scan.coverity.com/reports.htm#v60426/p10289/fileInstanceId=250303704&defectInstanceId=53363142&mergedDefectId=1539483
- https://scan5.scan.coverity.com/reports.htm#v60426/p10289/fileInstanceId=250303706&defectInstanceId=53363182&mergedDefectId=1539482
- https://scan5.scan.coverity.com/reports.htm#v60426/p10289/fileInstanceId=250304018&defectInstanceId=53270328&mergedDefectId=1532980 and all others in `src/hooks/dhcp/lease_cmds/lease_cmds.cc`
- https://scan5.scan.coverity.com/reports.htm#v60426/p10289/fileInstanceId=250304037&defectInstanceId=53270311&mergedDefectId=1532961 and all others in `src/hooks/dhcp/mysql_cb/mysql_cb_dhcp*.cc`
- https://scan5.scan.coverity.com/reports.htm#v60426/p10289/fileInstanceId=250304057&defectInstanceId=53270884&mergedDefectId=1532978 and all others in `src/hooks/dhcp/pgsql_cb/pgsql_cb_dhcp*.cc`kea2.5.5Razvan BecheriuRazvan Becheriuhttps://gitlab.isc.org/isc-projects/kea/-/issues/3103RADIUS realm config entry does nothing2023-11-09T15:41:47ZFrancis DupontRADIUS realm config entry does nothingFour possible solutions:
- to nothing (or put the ticket in Outstanding)
- add a note in ARM saying it is not yet supported
- remove it from the config
- implement it (i.e. adding @<realm> to all User-Name attributes)Four possible solutions:
- to nothing (or put the ticket in Outstanding)
- add a note in ARM saying it is not yet supported
- remove it from the config
- implement it (i.e. adding @<realm> to all User-Name attributes)next-stable-2.6https://gitlab.isc.org/isc-projects/kea/-/issues/3095DHCPv4 option 21 policy-filter example may be misleading2023-10-20T13:42:39ZPiotrek ZadrogaDHCPv4 option 21 policy-filter example may be misleadingExample of that Option that is currently in the source code (`all-options.json`) may be misleading.
```
/*
Code Len Address 1 Mask 1
+-----+-----+-----+-----+-----+-----+-----+-----+-----+--...Example of that Option that is currently in the source code (`all-options.json`) may be misleading.
```
/*
Code Len Address 1 Mask 1
+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+
| 21 | n | a1 | a2 | a3 | a4 | m1 | m2 | m3 | m4 |
+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+
Address 2 Mask 2
+-----+-----+-----+-----+-----+-----+-----+-----+---
| a1 | a2 | a3 | a4 | m1 | m2 | m3 | m4 | ...
+-----+-----+-----+-----+-----+-----+-----+-----+---
*/
// Type: array of {IPv4 address}
{
"code": 21,
"data": "192.0.2.21, 192.0.2.22",
"name": "policy-filter"
},
```
`data` should be rather pairs of (IPv4, mask), e.g.
```
"data": "192.0.2.0, 255.255.255.0",
```
or
```
"data": "192.0.2.0, 255.255.255.0, 10.2.0.0, 255.255.0.0",
```kea2.5.3Piotrek ZadrogaPiotrek Zadrogahttps://gitlab.isc.org/isc-projects/kea/-/issues/3018motd (message of the day) in kea2023-08-24T13:35:43ZTomek Mrugalskimotd (message of the day) in keaWe could implement a message in Kea, the if configured, would be logged when Kea is started or reconfigured. Trivial to implement.
This would be useful in Docker. We need to put some config file in a Docker image, with the expectation t...We could implement a message in Kea, the if configured, would be logged when Kea is started or reconfigured. Trivial to implement.
This would be useful in Docker. We need to put some config file in a Docker image, with the expectation that the user will replace it with a real config. If the user doesn't, Kea should start, but print something like "please edit your config file, map your volume when starting Docker image, etc.". The text would be configurable in a config file.
This is similar to Unix idea of `/etc/motd` (its content is printed as a welcome message to the user every time he/she logs in).backloghttps://gitlab.isc.org/isc-projects/kea/-/issues/2999configure makes erroneous assumption to discover location of OpenSSL librarie...2023-08-10T13:50:53ZMark Priorconfigure makes erroneous assumption to discover location of OpenSSL libraries on macOSThe configure script supplied in the tarball aborts when trying to determine support for OpenSSL routines on macOS due to an erroneous assumption.
The configure script builds code snippets to determine availability of various EVP routin...The configure script supplied in the tarball aborts when trying to determine support for OpenSSL routines on macOS due to an erroneous assumption.
The configure script builds code snippets to determine availability of various EVP routines. To determine the location of the OpenSSL libraries it executes the following code
```
# Now search for the system OpenSSL library.
if test "${use_openssl}" = "yes" ; then
for d in /usr /usr/local /usr/local/ssl /usr/local/opt/openssl /usr/pkg /usr/sfw; do
if test -f $d/include/openssl/opensslv.h; then
use_openssl="${d}"
openssl_headers="${d}/include"
for l in lib lib64; do
if test -f "${d}/${l}/libssl.so"; then
openssl_libraries="${d}/${l}"
break
fi
done
if test -n "${openssl_headers}" && test -n "${openssl_libraries}"; then
break
fi
fi
done
fi
```
macOS does not use .so type libraries and so even though this code successfully sets use_openssl and openssl_headers if OpenSSL is installed it fails to set openssl_libraries.
The following code is then executed
```
if test "${openssl_headers}" = "/usr/include" ; then
CRYPTO_CFLAGS=""
CRYPTO_INCLUDES=""
CRYPTO_LIBS="-lssl -lcrypto"
else
CRYPTO_CFLAGS=""
CRYPTO_INCLUDES="-I${openssl_headers}"
case $host in
*-solaris*)
CRYPTO_LIBS="-L${openssl_libraries} -R${openssl_libraries} -lssl -lcrypto"
;;
*-hp-hpux*)
CRYPTO_LIBS="-L${openssl_libraries} -Wl,+b: -lssl -lcrypto"
;;
*-apple-darwin*)
if test -f "${openssl_libraries}/libcrypto.dylib" ; then
CRYPTO_LIBS="-L${openssl_libraries} -lssl -lcrypto"
else
CRYPTO_LIBS="${openssl_libraries}/libssl.a ${openssl_libraries}/libcrypto.a"
fi
;;
*)
CRYPTO_LIBS="-L${openssl_libraries} -lssl -lcrypto"
;;
esac
fi
```
If openssl_headers is NOT `/usr/include`, which is likely on macOS since it's not an Apple supplied library and a standard build of OpenSSL will install in `/usr/local` instead of `/usr`, then CRYPTO_LIBS will be set to `/libssl.a /lib/crypto.a`, neither of which exist.
This will cause the following code snippets that test the existence of various EVP routing to all fail and hence configure aborts.
**Environment:**
- Kea version: kea-2.4.0
- OS: macOS 10.13.6next-stable-2.6https://gitlab.isc.org/isc-projects/kea/-/issues/2875perfdhcp enhancements: do not allow -6 -J usage without -A2023-06-15T16:13:14ZPiotrek Zadrogaperfdhcp enhancements: do not allow -6 -J usage without -AWhile working on #2834 it occurred to me that using `perfdhcp -6 -J` without `-A1` makes no sense.
It could be considered as an exception and some nice hint could be returned to the user.While working on #2834 it occurred to me that using `perfdhcp -6 -J` without `-A1` makes no sense.
It could be considered as an exception and some nice hint could be returned to the user.backloghttps://gitlab.isc.org/isc-projects/kea/-/issues/2855kea-admin lease-upload (2.2.0) invokes kea-lfc without -4 or -6 resulting in ...2023-07-17T13:58:21ZMarco Munarimar23+w.isc.org@allerta.itkea-admin lease-upload (2.2.0) invokes kea-lfc without -4 or -6 resulting in misleading error (Unknown argument) if no dhcp version was specified to kea-admin---
name: Bug report
about: Create a report to help us improve
---
**Describe the bug**
After reading the (concise) documentation of `kea-admin` https://kea.readthedocs.io/en/kea-2.2.0/arm/admin.html
and the command line output reporte...---
name: Bug report
about: Create a report to help us improve
---
**Describe the bug**
After reading the (concise) documentation of `kea-admin` https://kea.readthedocs.io/en/kea-2.2.0/arm/admin.html
and the command line output reported below, I expected to have briefly understood how to use the `lease-upload` command,
as for example `kea-admin lease-upload pgsql -u kea -n database_name -i lease4file.csv` gave instead error "Unknown argument."
```kea-admin 2.2.0
This is a kea-admin script that conducts administrative tasks on
the Kea installation.
Usage: /usr/local/sbin/kea-admin COMMAND BACKEND [parameters]
COMMAND: Currently supported operations are:
- db-init: Initializes new database. Useful for first time installation.
- db-version: Checks version of the existing database schema. Useful
- for checking database version when preparing for an upgrade.
- db-upgrade: Upgrades your database schema.
- lease-dump: Dumps current leases to a memfile-ready CSV file.
- lease-upload: Uploads leases from a CSV file to the database.
- stats-recount: Recounts lease statistics.
BACKEND - one of the supported backends: memfile|mysql|pgsql
PARAMETERS: Parameters are optional in general, but may be required
for specific operations.
-h or --host hostname - specifies a hostname of a database to connect to
-P or --port port - specifies the TCP port to use for the database connection
-u or --user name - specifies username when connecting to a database
-p or --password [password] - specifies a password for the database connection;
if omitted from the command line,
then the user will be prompted for a password
-n or --name database - specifies a database name to connect to
-d or --directory - path to upgrade scripts (default: /usr/local/share/kea/scripts)
-v or --version - print kea-admin version and quit.
-x or --extra - specifies extra argument(s) to pass to the database command
Parameters specific to lease-dump, lease-upload:
-4 to dump IPv4 leases to file
-6 to dump IPv6 leases to file
-i or --input to specify the name of file from which leases will be uploaded
-o or --output to specify the name of file to which leases will be dumped
-y or --yes - assume yes on overwriting temporary files
```
**To Reproduce**
Steps to reproduce the behavior:
1. Prepare Kea daemon dhcpv4 using pgsql as in the following config
```
"Dhcp4": {
//...
"hosts-database": {
"type": "postgresql",
"name": "database_name",
"user": "kea",
"password": "bugreporting",
"host": "localhost",
"port": 5432
}
```
start the previously initialized PosgreSQL database service and the kea service.
(My environment was OpenBSD 7.3 where I installed PostgreSQL and kea from ports
but is probably unrelated)
2. Prepare a valid lease4file.csv (as from /var/lib/kea/kea-leases4.csv)
3. Run:
`kea-admin lease-upload pgsql -u kea -n database_name -i lease4file.csv`
4. See error, it says "Unknown argument"
5. wander what it is (`kea-admin` invokes `kea-lfc` with or without the `-4` or `-6` argument as `kea-admin` was executed by the user)
`kea-admin` doesn't document clearly that either `-4` or `-6` is necessary for the `lease-upload` command, and when not specified it doesn't care to invoke `kea-lfc` which pretend such argument without saying that clearly either).
**Expected behavior**
At least should say "missing argument" (dhcp version) and the documentation or the code should specify that the `kea-admin lease-upload` command needs either -4 or -6, because such information is detected by the file nor by the configuration
**Environment:**
- kea-dhcp4 -V:
```
2.2.0
tarball
linked with:
log4cplus 1.2.2
LibreSSL 3.7.2
database:
PostgreSQL backend 13.0, library 150002
Memfile backend 2.1
```
- OS: OpenBSD 7.3
- Which features were compiled in (in particular which backends): port package kea-2.2.0p0-postgresql
- If/which hooks where loaded in: left as default = no hooks/libraries configured yet
**Additional Information**
**Contacting you**
How can ISC reach you to discuss this matter further? If you do not specify any means such as e-mail, jabber id or a telephone, we may send you a message on github with questions when we have them.
I specified the email address while registering in gitlab.isc.org, this requirement of contact details seems to me obsolete, or I might say
you can contact me by email. I'm able to write the code to fix the issue which affects new users, not anymore neither me because I did learn the expected (by the command) way to use the command (by debugging, not messages).kea2.4.0Piotrek ZadrogaPiotrek Zadrogahttps://gitlab.isc.org/isc-projects/kea/-/issues/2833Errata of broken URLs and typos for the Kea 2.4.0 release2023-07-17T13:58:20ZAndrei Pavelandrei@isc.orgErrata of broken URLs and typos for the Kea 2.4.0 releaseThere is a list of broken URLs and typos detected by https://jenkins.aws.isc.org/job/kea-dev/job/errata/Errata/.
The typos have more false positives, but the broken URLs are accurate enough. Here they are:
```
http://bind10.isc.org/wik...There is a list of broken URLs and typos detected by https://jenkins.aws.isc.org/job/kea-dev/job/errata/Errata/.
The typos have more false positives, but the broken URLs are accurate enough. Here they are:
```
http://bind10.isc.org/wiki/IxfrSystemTests
http://bind10.isc.org/wiki/StatisticsItems
http://blogs.sun.com/sga/entry/boost_mini_howto
http://cdn.mathjax.org/mathjax/latest
http://googletest.googlecode.com/svn/trunk
http://kea.isc.org/wiki/IscForge
http://kea.isc.org/wiki/LFCDesign
http://oldkea.isc.org/ticket/2405
http://oldkea.isc.org/ticket/3265
http://oldkea.isc.org/ticket/5014
http://oldkea.isc.org/ticket/nnnn
http://www.archivum.info/mailing.openbsd.bugs/2009-02/00017/
http://www.domain.dom/ca-crl.pem
https://app.vagrantup.com/api/v1/box/
https://developer.apple.com/library/archive/featuredarticles/Doxy
https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
https://gitlab.isc.org/isc-projects/kea/merge_requests/new
https://jenkins.isc.org/job/kea-dev/job/performance/KeaPerformanceReport/
https://oldkea.isc.org/ticket/5543#comment:6
https://svn.boost.org/trac/boost/ticket/11989
https://svn.boost.org/trac/boost/ticket/3477
https://svn.boost.org/trac/boost/ticket/8080
https://www.comcast.com/
https://www.microsoft.com/en-us/download/details.aspx?id 21138
https://www.redhat.com/archives/libguestfs/2013-February/msg00102.html
https://www.tenforums.com/tutorials/51456-windows-server-2016-setup-local-domain-controller.html
```kea2.4.0Suzanne GoldlustSuzanne Goldlusthttps://gitlab.isc.org/isc-projects/kea/-/issues/2798d_controller uses COMMAND_SUCCESS and COMMAND_ERROR instead of CONTROL_RESULT...2023-07-17T13:58:21ZRazvan Becheriud_controller uses COMMAND_SUCCESS and COMMAND_ERROR instead of CONTROL_RESULT_SUCCESS and CONTROL_RESULT_ERRORthere are 2 defines used for createAnswer function, currently both have same values, but code should be cleaned up to use only one definition
d_process.h:
```
/// @brief Returned by the process to indicate a command was successful.
stat...there are 2 defines used for createAnswer function, currently both have same values, but code should be cleaned up to use only one definition
d_process.h:
```
/// @brief Returned by the process to indicate a command was successful.
static const int COMMAND_SUCCESS = 0;
/// @brief Returned by the process to indicates a command failed.
static const int COMMAND_ERROR = 1;
/// @brief Returned by the process to indicates a command is not valid.
static const int COMMAND_INVALID = 2;
```
command_interpreter.h
```
/// @brief Status code indicating a successful operation
const int CONTROL_RESULT_SUCCESS = 0;
/// @brief Status code indicating a general failure
const int CONTROL_RESULT_ERROR = 1;
/// @brief Status code indicating that the specified command is not supported.
const int CONTROL_RESULT_COMMAND_UNSUPPORTED = 2;
/// @brief Status code indicating that the specified command was completed
/// correctly, but failed to produce any results. For example, get
/// completed the search, but couldn't find the object it was looking for.
const int CONTROL_RESULT_EMPTY = 3;
/// @brief Status code indicating that the command was unsuccessful due to a
/// conflict between the command arguments and the server state. For example,
/// a lease4-add fails when the subnet identifier in the command does not
/// match the subnet identifier in the server configuration.
const int CONTROL_RESULT_CONFLICT = 4;
```
only in d_controller.cc the COMMAND_SUCCESS and COMMAND_ERROR are used (COMMAND_INVALID not used anywhere):
```
./src/lib/process/d_controller.cc: ConstElementPtr error = createAnswer(COMMAND_ERROR,
./src/lib/process/d_controller.cc: return (createAnswer(COMMAND_SUCCESS, config));
./src/lib/process/d_controller.cc: return (createAnswer(COMMAND_ERROR, "Argument must be a map"));
./src/lib/process/d_controller.cc: return (createAnswer(COMMAND_ERROR,
./src/lib/process/d_controller.cc: return (createAnswer(COMMAND_ERROR,
./src/lib/process/d_controller.cc: return (createAnswer(COMMAND_ERROR,
./src/lib/process/d_controller.cc: return (createAnswer(COMMAND_ERROR,
./src/lib/process/d_controller.cc: ConstElementPtr error = createAnswer(COMMAND_ERROR,
./src/lib/process/d_controller.cc: return (createAnswer(COMMAND_SUCCESS, response));
./src/lib/process/d_controller.cc: return (createAnswer(COMMAND_SUCCESS, status));
./src/lib/process/d_controller.cc: answer = createAnswer(COMMAND_SUCCESS, getVersion(false), arguments);
./src/lib/process/d_controller.cc: return (createAnswer(COMMAND_SUCCESS, isc::detail::getConfigReport()));
./src/lib/process/d_controller.cc: return (createAnswer(COMMAND_SUCCESS, "Process has not been initialized"));
```kea2.3.8Razvan BecheriuRazvan Becheriuhttps://gitlab.isc.org/isc-projects/kea/-/issues/2747unrecognized compiler flags2023-09-26T14:30:24ZAndrei Pavelandrei@isc.orgunrecognized compiler flagsCompiling Kea with the GNU compiler (`g++`) mentions an unrecognized flag because it's not compatible with said compiler:
```
cc1plus: note: unrecognized command-line option ‘-Wno-unused-private-field’ may have been intended to silence ...Compiling Kea with the GNU compiler (`g++`) mentions an unrecognized flag because it's not compatible with said compiler:
```
cc1plus: note: unrecognized command-line option ‘-Wno-unused-private-field’ may have been intended to silence earlier diagnostics
```
This flag is added in a Makefile. There are a few others like this.
Some include it inside the scope of `if USE_GXX`. I would instead remove these flags from Makefiles. Including a flag only for a library is arbitrary. If it should be included, it should either be for the entire repo, or not at all.
People who want to enable custom flags can use the `CXXFLAGS` environment variable which should be set before running `./configure`.
```
export CXXFLAGS="-Wno-unused-private-field"
./configure
```backloghttps://gitlab.isc.org/isc-projects/kea/-/issues/2731Remove dead code in command processing2023-02-09T14:18:22ZTomek MrugalskiRemove dead code in command processingWhile reviewing #2693, @andrei discovered that adding log messages in ControlledDhcpv4Srv::processCommand() section that handles libreload doesn't actually gets triggered when the command are sent over CA or directly over UNIX socket. Th...While reviewing #2693, @andrei discovered that adding log messages in ControlledDhcpv4Srv::processCommand() section that handles libreload doesn't actually gets triggered when the command are sent over CA or directly over UNIX socket. This should be investigated further. Perhaps processCommand() is no longer needed?
See background and details here: https://gitlab.isc.org/isc-projects/kea/-/merge_requests/1895?commit_id=877d1cfad37bd41d7d7db105ff6de0b83ca710e2#note_345720outstandinghttps://gitlab.isc.org/isc-projects/kea/-/issues/2721naming inconsistency between keactrl parameters and the servers acted upon2023-07-31T12:45:46ZAndrei Pavelandrei@isc.orgnaming inconsistency between keactrl parameters and the servers acted uponIt's unclear what parameter should be specified to, for example, start `kea-dhcp6`. The usage message is not clear on that:
```
$ keactrl
ERROR/keactrl: missing command
usage is keactrl command [-c keactrl-config-file] [-s server[,serve...It's unclear what parameter should be specified to, for example, start `kea-dhcp6`. The usage message is not clear on that:
```
$ keactrl
ERROR/keactrl: missing command
usage is keactrl command [-c keactrl-config-file] [-s server[,server,..]]
commands: start stop reload status version
```
They end up being different than the server names. Without the leading `kea-`, and with dashes turned to underscores:
```
$ keactrl version -s dhcp4,dhcp6,dhcp_ddns,ctrl_agent,netconf
keactrl: 2.3.4-git
kea-dhcp4: 2.3.4-git
kea-dhcp6: 2.3.4-git
kea-dhcp-ddns: 2.3.4-git
kea-ctrl-agent: 2.3.4-git
kea-netconf: 2.3.4-git
```
There is a mention of the parameters in `man keactrl`:
```
-s|--server server[,server,...]
Specifies a subset of the enabled servers to which the command should be issued. The list of servers should be separated by commas, with
no intervening spaces. Acceptable values are:
dhcp4 DHCPv4 server (kea-dhcp4).
dhcp6 DHCPv6 server (kea-dhcp6).
dhcp_ddns
DHCP DDNS server (kea-dhcp-ddns).
ctrl_agent
Control Agent (kea-ctrl-agent).
netconf
NETCONF agent (kea-netconf).
all All servers, including NETCONF if it was configured to be built. This is the default.
```
It would be nice to have the parameter names be the same as the server names to avoid ambiguity.
First reported here: https://lists.isc.org/pipermail/kea-users/2022-July/003497.htmlbacklog