2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-08-31 05:55:28 +00:00
Commit Graph

35888 Commits

Author SHA1 Message Date
Andrei Pavel
47cdf70020 [#2022] fix non-matching quotes and indentation 2024-02-19 17:53:37 +02:00
Francis Dupont
c3b45dca07 [#2022] Added max-pending-requests doc 2024-02-19 17:49:45 +02:00
Francis Dupont
96fcd7b382 [#2022] Checkpoint: last version of parking code 2024-02-19 17:49:45 +02:00
Thomas Markwalder
a1f225f56c [#3242] Fixed copyright date 2024-02-16 17:51:25 +00:00
Thomas Markwalder
14d348b507 [#3242] Addressed comments, added ChangeLog entry
Minor cosmetic fixes.
2024-02-16 17:51:25 +00:00
Thomas Markwalder
d251bf776c [#3209] Fixed .gitattributes file
modified:   src/hooks/dhcp/perfmon/.gitattributes
2024-02-16 17:51:25 +00:00
Thomas Markwalder
7202da7530 [#3242] Added bare-bones perfmon hook library
New files:
    arm/hooks-perfmon.rst
	src/hooks/dhcp/perfmon/.gitattributes
	src/hooks/dhcp/perfmon/.gitignore
	src/hooks/dhcp/perfmon/Makefile.am
	src/hooks/dhcp/perfmon/libloadtests/.gitignore
	src/hooks/dhcp/perfmon/libloadtests/Makefile.am
	src/hooks/dhcp/perfmon/libloadtests/load_unload_unittests.cc
	src/hooks/dhcp/perfmon/libloadtests/run_unittests.cc
	src/hooks/dhcp/perfmon/perfmon.dox
	src/hooks/dhcp/perfmon/perfmon_callouts.cc
	src/hooks/dhcp/perfmon/perfmon_log.cc
	src/hooks/dhcp/perfmon/perfmon_log.h
	src/hooks/dhcp/perfmon/perfmon_messages.cc
	src/hooks/dhcp/perfmon/perfmon_messages.h
	src/hooks/dhcp/perfmon/perfmon_messages.mes
	src/hooks/dhcp/perfmon/tests/.gitignore
	src/hooks/dhcp/perfmon/tests/Makefile.am
	src/hooks/dhcp/perfmon/tests/run_unittests.cc
	src/hooks/dhcp/perfmon/version.cc

Modified:
	configure.ac
	arm/hooks-perfmon.rst
	arm/hooks.rst
	arm/logging.rst
	arm/rst_arm_sources.mk
	conf.py
	src/hooks/dhcp/Makefile.am
2024-02-16 17:51:25 +00:00
Razvan Becheriu
1a0f209cfd [#3230] addressed review 2024-02-16 18:30:14 +02:00
Thomas Markwalder
c54c5729a7 [#3230] Added UT to BPF filter
modified:   tests/pkt_filter_bpf_unittest.cc
2024-02-16 10:01:31 -05:00
Thomas Markwalder
9524af1de7 [#3230] Added UTs for isSocketReceiveTimeSupported
src/lib/dhcp/tests/pkt_filter_inet6_unittest.cc
src/lib/dhcp/tests/pkt_filter_inet_unittest.cc
src/lib/dhcp/tests/pkt_filter_lpf_unittest.cc
    Added test for isSocketReceivedTimeSupported)
2024-02-16 09:51:43 -05:00
Thomas Markwalder
e235c2149c [#3230] Move isSocketReceivedSuppported()
Move isSocketReceivedSuppported() impls out of headers and into
cc files so we're sure SO_TIMESTAMP is known.
2024-02-16 09:29:25 -05:00
Thomas Markwalder
ff951201b4 [#3230] Addressed review comments
src/lib/dhcp/iface_mgr.*
    IfaceMgr::isSocketReceviedTimeSupported() - new function

src/lib/dhcp/pkt_filter.*
    PktFilter::isSocketReceviedTimeSupported() - new  pure virtual function

src/lib/dhcp/pkt_filter6.cc
src/lib/dhcp/pkt_filter_bpf.h
src/lib/dhcp/pkt_filter_inet.h
src/lib/dhcp/pkt_filter_inet6.h
src/lib/dhcp/pkt_filter_lpf.h
    Added implementation of isSocketReceivedTimeSupported()

src/lib/dhcp/pkt_filter_lpf.cc
    Removed WITH_CMSG and refactored receive() to be a single function
    with conditional codde based on SO_TIMESTAMP

Updated UTs accordingly
2024-02-16 08:10:38 -05:00
Razvan Becheriu
f28b162ad4 [#3230] addressed review 2024-02-15 19:57:19 +02:00
Thomas Markwalder
a4703a85dd [#3230] Initial commit
Adds dhcp::PktEvent, modifies packet filters and tests

src/lib/dhcp/pkt.*
    Add PktEvent class, add stack and methods to Pkt

src/lib/dhcp/pkt_filter_bpf.cc
    PktFilterBPF::receive() - fetch timestamp from bpfhdr,
    add SOCKET_RECEIVED and BUFFER_READ events

    PktFilterBPF::send() - add RESPONSE_SENT event

src/lib/dhcp/pkt_filter_inet.cc
    PktFilterInet::openSocket() - enable SO_TIMESTAMP socket option

    PktFilterInet::receive() - fetch SO_TIMESTAMP via CMSG,
    add SOCKET_RECEIVED and BUFFER_READ events

    PktFilterInet::send() - add RESPONSE_SENT event

src/lib/dhcp/pkt_filter_inet6.cc
    PktFilterInet6::openSocket() - enable SO_TIMESTAMP socket option

    PktFilterInet6::receive() - fetch SO_TIMESTAMP via CMSG,
    add SOCKET_RECEIVED and BUFFER_READ events

    PktFilterInet::send() - add RESPONSE_SENT event

src/lib/dhcp/pkt_filter_lpf.cc

    PktFilterLPF::openSocket() - enable SO_TIMESTAMP socket option
    PktFilterLPF::receive() - added conditonal compilation version based
    on WITH_CMSG macro that fetches SO_TIMESTAMP and add SOCKET_RECEIVED
    and BUFFER_READ events

    PktFilterLPF::send() - add RESPONSE_SENT event

src/lib/dhcp/tests/pkt4_unittest.cc
    TEST_F(Pkt4Test, PktEvents) - new test

src/lib/dhcp/tests/pkt6_unittest.cc
    TEST_F(Pkt6Test, PktEvents) - new test

src/lib/dhcp/tests/pkt_filter6_test_utils.cc
src/lib/dhcp/tests/pkt_filter6_test_utils.h
src/lib/dhcp/tests/pkt_filter_inet6_unittest.cc
src/lib/dhcp/tests/pkt_filter_inet_unittest.cc
src/lib/dhcp/tests/pkt_filter_test_utils.cc
src/lib/dhcp/tests/pkt_filter_test_utils.h
    Updated tests to check PktEvent stack contents

src/lib/dhcp/tests/pkt_filter_bpf_unittest.cc
src/lib/dhcp/tests/pkt_filter_lpf_unittest.cc
    Updated tests to check PktEvent stack contents,
    Changed DISABLED_ tests to use SKIP_IF(notRoot)
2024-02-15 08:13:44 +02:00
Thomas Markwalder
ef1f878f52 [#3209] Further review comments
modified:   encode/encode.cc
2024-02-07 13:58:47 +00:00
Thomas Markwalder
73c493ca84 [#3209] Addressed review comments
Minor clean up, added commentary
2024-02-07 13:58:47 +00:00
Razvan Becheriu
94ac8f4c45 [#3209] addressed review 2024-02-07 13:58:47 +00:00
Thomas Markwalder
51d67d63a4 [#3209] Updated copyrights 2024-02-07 13:58:47 +00:00
Thomas Markwalder
06fc63c9f5 [#3209] Remove internal bool vectors
src/lib/util/encode/encode.cc
    BaseNEncoder::encode()
    BaseNEncoder::decode() - eliminate use of bool vectors
    as "bit streams"
2024-02-07 13:58:47 +00:00
Thomas Markwalder
6949dd94a3 [#3209] Created new BaseNEncoder class
src/lib/util/encode/encode.h
src/lib/util/encode/encode.cc
    Reworked into new BaseNEncoder class and derivatives

src/lib/util/tests/Makefile.am
    Removed obsolete test files
    added new file encode_unittest.cc

new file:   src/lib/util/tests/encode_unittest.cc
deleted:    src/lib/util/tests/base32hex_unittest.cc
deleted:    src/lib/util/tests/base64_unittest.cc
deleted:    src/lib/util/tests/hex_unittest.cc
2024-02-07 13:58:47 +00:00
Thomas Markwalder
b75e0f4c50 [#3209] Initial commit
Rewrote encoding/decoding.

src/lib/util/Makefile.am
    Removed old files, added encode.cc, encode.h

src/lib/util/encode/encode.*
    New implemenentation encoding and decoding not based
    on boost.
2024-02-07 13:58:47 +00:00
Francis Dupont
02e7cb272b [#2022] Added PARK status handle 2024-02-05 08:57:37 +01:00
Francis Dupont
89a34eef90 [#2022] Finished RADIUS v6 server code 2024-02-05 08:57:37 +01:00
Francis Dupont
3b9cecff5f [#2022] Reorganized v6 code 2024-02-05 08:57:36 +01:00
Wlodek Wencel
6626e68696 [#3240] version in configure.ac changed to 2.5.6-git 2024-01-31 12:34:04 +01:00
Wlodek Wencel
c330651b75 [#3237] release changes Kea-2.5.5 2024-01-29 13:23:00 +01:00
Wlodek Wencel
783bc34daf [#3237] release changes 2024-01-29 13:11:19 +01:00
Wlodek Wencel
416a072394 [#3237] release changes 2024-01-29 10:17:26 +01:00
Andrei Pavel
a146a119a9 [#2788] add RAII struct for exhausting options 2024-01-26 19:47:41 +02:00
Andrei Pavel
c3507ebf21 [#2788] reset optarg
optarg is not reset in musl's getopt and it leaks values to other flags.
Reset it for all systems because it cannot hurt. If you remove the
optarg reset, you should see the bug in action on alpine systems in
DstubControllerTest.commandLineArgs when parsing argv2:
```
[ RUN      ] DStubControllerTest.commandLineArgs
d_controller_unittests.cc:102: Failure
Expected equality of these values:
  std::string(ex.what())
    Which is: "unsupported option: -b cfgName"
  "unsupported option: -b"
[  FAILED  ] DStubControllerTest.commandLineArgs (14 ms)
```
2024-01-26 19:47:41 +02:00
Andrei Pavel
697e9fad40 [#2788] exhaust options before throwing error
Prior to this change, if parseArgs() was called twice during the same
program lifetime and it stumbled on an unsupported option and throwed an
exception on the first call, the previous set of arguments lived on to
be parsed by the second call. This is a situation that likely arises
only in unit tests, but let us fix it properly to at least silence the unit
test failure on alpine, which was happening because of different
implementation of getopt from musl, and which motivated looking into how
getopt behaves. To make the bug evident even in a non-alpine environment, add an
EXPECT_THROW_MSG in DStubControllerTest.commandLineArgs when parsing argv3, and
see that it outputs "unsupported option: [s]" instead of
"extraneous command line information".
2024-01-26 19:47:41 +02:00
Andrei Pavel
f6bf9f925b [#2788] make all commandLineArgs tests more strict 2024-01-26 19:47:41 +02:00
Razvan Becheriu
a264e33224 [#3235] bump up library versions for 2.5.5 release 2024-01-26 14:59:07 +02:00
Razvan Becheriu
72340c0684 [#1790] updated list of CB parameters 2024-01-26 14:37:02 +02:00
Razvan Becheriu
4df43596e1 [#1790] added ChangeLog entry 2024-01-26 14:25:58 +02:00
Razvan Becheriu
063be34a9d [#1790] added parameters to ARM 2024-01-26 14:19:54 +02:00
Razvan Becheriu
7d3fb3d81c [#1790] addressed review comments 2024-01-26 14:19:54 +02:00
Razvan Becheriu
48a4661d36 [#1790] added UTs 2024-01-26 14:19:54 +02:00
Razvan Becheriu
e6d1fd5179 [#1790] add tool to parse CB parameters 2024-01-26 14:19:54 +02:00
Razvan Becheriu
a48e9ee568 [#1790] add support for top level maps in global CB parameters 2024-01-26 14:19:54 +02:00
Andrei Pavel
4d04d9169b [#3198] add ChangeLog entry 2024-01-26 12:48:18 +02:00
Andrei Pavel
84bd162648 [#3198] add tests for empty yang option data 2024-01-26 12:48:18 +02:00
Andrei Pavel
b37853da57 [#3198] add expectEqWithDiff to testutils 2024-01-26 12:48:18 +02:00
Andrei Pavel
3f7e8d65e0 [#3198] fix reinstall.sh for YANG modules 2024-01-26 12:48:18 +02:00
Andrei Pavel
b10991e563 [#3198] change --edit to --import in docs
to avoid ambiguities caused by the merge operation in sysrepocfg --edit
2024-01-26 12:48:18 +02:00
Andrei Pavel
d87a3e0f05 [#3198] ignore errors when regenerating hashes
The script complains about hashes missing, but that is only temporary until they
are regenerated. A second call to check-hashes.sh will now properly check them
at the end.
2024-01-26 12:48:18 +02:00
Andrei Pavel
2f0dd250cc [#3198] bump up revisions for YANG modules 2024-01-26 12:48:18 +02:00
Andrei Pavel
11de31d8ba [#3198] make data a key for option-data in code
- Add ability to set list element that only has keys in Translator::setItem.
- Explicitly set list elements in case they contain only keys which can
  be more common now that data is a key since it is likely one can have
  entries that only have code, space, and data.
- Handle no data as empty data when setting, and empty data as no data
  when getting. This avoids the need to add an empty "data" element to
  all options that lack it in all-options.json so that the unit tests
  pass. But this goes to show that data-less entries may be encountered
  in production as well, so more importantly this caters to that
  scenario.
- Adjust data in kea4/all-options.json to not contain singlequotes.
  There was only one occurrence of it. This is a limitation related
  to unit testing only. Opened issue 3216 about it.
- Add missing tests that are not strictly related to the data key, but
  they are related to option data:
  - TranslatorOptionDataListTestv6.getEmpty
  - TranslatorOptionDataListTestv4.get
  - TranslatorOptionDataListTestv6.setEmpty
  - TranslatorOptionDataListTestv4.set
- Add unit tests:
  - TranslatorOptionDataListTestv4.optionsSameCodeAndSpace
  - TranslatorOptionDataListTestv6.optionsSameCodeAndSpace
- Add snippet that tests setting of list element with keys only in
  TranslatorTest.setItem.
2024-01-26 12:48:18 +02:00
Andrei Pavel
5202cd149b [#3198] add data as key for option-data in YANG modules
Setting mandatory for keys is redundant as mentioned in RFC 7950 section
7.8.2: Any "mandatory" statements in the key leafs are ignored.

So they were removed. This now makes it consistent with how data is
declared in option-data as well.
2024-01-26 12:46:36 +02:00
Andrei Pavel
223dc3aad3 [#3229] hammer.py prepare-system --just-configure 2024-01-26 11:02:14 +02:00