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/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/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/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/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.htmlbackloghttps://gitlab.isc.org/isc-projects/kea/-/issues/2695Regression: configure --with-sysrepo was changed to 4 different arguments.2023-01-19T14:59:24ZFrancis DupontRegression: configure --with-sysrepo was changed to 4 different arguments.The request is to be able to configure libyang and sysrepo with cpp using only one argument, either sysrepo to keep backward compatibility or a new one as --with-netconf (proposed by @andrei)The request is to be able to configure libyang and sysrepo with cpp using only one argument, either sysrepo to keep backward compatibility or a new one as --with-netconf (proposed by @andrei)backloghttps://gitlab.isc.org/isc-projects/kea/-/issues/2686Minor: MultiThreadingMgr::[gs]etMode are not MT safe.2023-01-19T14:45:45ZFrancis DupontMinor: MultiThreadingMgr::[gs]etMode are not MT safe.TSAN reports a race on enabled_ in MultiThreadingMgr::getMode and MultiThreadingMgr::setMode. It is only an issue if we want the code to be race free i.e. TSAN no longer reporting any race.TSAN reports a race on enabled_ in MultiThreadingMgr::getMode and MultiThreadingMgr::setMode. It is only an issue if we want the code to be race free i.e. TSAN no longer reporting any race.outstandinghttps://gitlab.isc.org/isc-projects/kea/-/issues/2618Wshadow warnings2023-09-26T14:30:24ZAndrei Pavelandrei@isc.orgWshadow warningsI wasted time on figuring out why a test fails just to see that the wrong variable with the same name declared in a nested scope was used. Since then, I'm passing `-Wshadow` to my compilation flags to detect such situations beforehand. I...I wasted time on figuring out why a test fails just to see that the wrong variable with the same name declared in a nested scope was used. Since then, I'm passing `-Wshadow` to my compilation flags to detect such situations beforehand. I would like to reduce the noise outputted by these warnings throughout the Kea code. There are several. Here is one of them:
```
data.cc: In member function ‘virtual void isc::data::MapElement::toJSON(std::ostream&) const’:
data.cc:900:51: warning: declaration of ‘m’ shadows a member of ‘isc::data::MapElement’ [-Wshadow]
900 | const std::map<std::string, ConstElementPtr>& m = mapValue();
| ^
In file included from data.cc:9:
../../../src/lib/cc/data.h:702:44: note: shadowed declaration is here
702 | std::map<std::string, ConstElementPtr> m;
|
```next-stable-2.6https://gitlab.isc.org/isc-projects/kea/-/issues/2540kea4 drops packet when server id option is included twice, but because of wro...2023-04-06T12:02:31ZWlodzimierz Wencelkea4 drops packet when server id option is included twice, but because of wrong reasonWe have pretty complicated test for fqdn sanitisation, we came across weird problem. When Kea gets v4 packet that include server id option twice - it's get dropped but Kea logs:
```
2022-08-19 02:35:41.529 DEBUG [kea-dhcp4.bad-packets/16...We have pretty complicated test for fqdn sanitisation, we came across weird problem. When Kea gets v4 packet that include server id option twice - it's get dropped but Kea logs:
```
2022-08-19 02:35:41.529 DEBUG [kea-dhcp4.bad-packets/169499.139645022918400] DHCP4_PACKET_DROP_0003 [hwtype=1 00:1f:d0:00:00:22], cid=[no info], tid=0x8c57ee, from interface enp0s9: it contains a foreign server identifier
```
interesting part is that value of server id is correct.
packet:
```
###[ Ethernet ]###
dst = ff:ff:ff:ff:ff:ff
src = 08:00:27:6d:ee:67
type = IPv4
###[ IP ]###
version = 4
ihl = None
tos = 0x0
len = None
id = 1
flags =
frag = 0
ttl = 64
proto = udp
chksum = None
src = 0.0.0.0
dst = 255.255.255.255
\options \
###[ UDP ]###
sport = bootpc
dport = bootps
len = None
chksum = None
###[ BOOTP ]###
op = BOOTREQUEST
htype = 1
hlen = 6
hops = 0
xid = 9197550
secs = 0
flags =
ciaddr = 0.0.0.0
yiaddr = 0.0.0.0
siaddr = 0.0.0.0
giaddr = 0.0.0.0
chaddr = b'\x00\x1f\xd0\x00\x00"'
sname = b''
file = b''
options = 'c\\x82Sc'
###[ DHCP options ]###
options = [message-type='request' server_id=192.168.50.252 server_id=192.168.50.252 requested_addr=192.168.50.11 client_FQDN='\x01\x00\x00client2.four.example.com.' end]
```backloghttps://gitlab.isc.org/isc-projects/kea/-/issues/2490logged messages in Dhcpv4Srv::selectSubnet4o6 use the same name as those in D...2023-07-05T10:39:18ZRazvan Becheriulogged messages in Dhcpv4Srv::selectSubnet4o6 use the same name as those in Dhcpv4Srv::selectSubnetnext-stable-2.6https://gitlab.isc.org/isc-projects/kea/-/issues/2417add support for option overload RFC33962022-05-19T14:01:36ZRazvan Becheriuadd support for option overload RFC3396Related to #2227.
long options should be stored in: sname space (64 bytes), and filename space (128 bytes)Related to #2227.
long options should be stored in: sname space (64 bytes), and filename space (128 bytes)outstandinghttps://gitlab.isc.org/isc-projects/kea/-/issues/2416Add support for storing long options in backends2023-07-31T12:45:46ZRazvan BecheriuAdd support for storing long options in backendsRelated to #2227.
the host manager and config backend should support storing long options.
to achieve this we need to call split before writing to database and call fuse after reading from the databaseRelated to #2227.
the host manager and config backend should support storing long options.
to achieve this we need to call split before writing to database and call fuse after reading from the databasebackloghttps://gitlab.isc.org/isc-projects/kea/-/issues/2380BSD and Solaris do not bind on ff02::1:2 when joining the multicast group2023-07-17T13:58:20ZRazvan BecheriuBSD and Solaris do not bind on ff02::1:2 when joining the multicast groupRelated to #1716.Related to #1716.backlog