Kea issueshttps://gitlab.isc.org/isc-projects/kea/-/issues2023-06-19T12:22:48Zhttps://gitlab.isc.org/isc-projects/kea/-/issues/2524Support multiple vendor options in expression evaluation2023-06-19T12:22:48ZFrancis DupontSupport multiple vendor options in expression evaluationCurrently expressions handle vendor IDs in the syntax but the code and unit tests are not prepared to have multiple vendor options (v4 124 and 125, v6 16 and 17) i.e. the first vendor option masks others.Currently expressions handle vendor IDs in the syntax but the code and unit tests are not prepared to have multiple vendor options (v4 124 and 125, v6 16 and 17) i.e. the first vendor option masks others.backloghttps://gitlab.isc.org/isc-projects/kea/-/issues/2521Change v4 vivco-suboptions definition2023-11-02T13:20:23ZFrancis DupontChange v4 vivco-suboptions definitionChange the Vendor-Identifying Vendor class option (name "vivco-suboptions", code 124) from uint32 + binary to uint32 + uint8 + tuple array. Even if the RFC 3925 layout is more an array of records we have a trouble with multiple vendor id...Change the Vendor-Identifying Vendor class option (name "vivco-suboptions", code 124) from uint32 + binary to uint32 + uint8 + tuple array. Even if the RFC 3925 layout is more an array of records we have a trouble with multiple vendor id (the uint32 field): either a second vendor id is different and parsing uses the same value without reading it which is incorrect, or the second id is the same and it is not allowed by the RFC. See also #2520 about arrays and record types.
RFC 3925 layout is:
```
1 1 1 1 1 1
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| option-code | option-len |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| enterprise-number1 |
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| data-len1 | |
+-+-+-+-+-+-+-+-+ |
/ vendor-class-data1 /
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ----
| enterprise-number2 | ^
| | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
| data-len2 | | optional
+-+-+-+-+-+-+-+-+ | |
/ vendor-class-data2 / |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
~ ... ~ V
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ----
...
The vendor-class-data comprises a series of separate items, each of
which describes some characteristic of the client's hardware
configuration or capabilities. Examples of vendor-class-data
instances might include the version of the operating system the
client is running or the amount of memory installed on the client.
Each instance of the vendor-class-data is formatted as follows:
1 1 1 1 1 1
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| data-len | |
+-+-+-+-+-+-+-+-+ opaque-data |
/ /
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
```
Note this includes a rewrite of the OptionVendorClass code in simpler (only one set of tuples, only the check of the data-len (uint8 / second field) to add) and **must** be considered when #1518 will be merged.backloghttps://gitlab.isc.org/isc-projects/kea/-/issues/2489Add support for logging and stat collection related to IPv6 HR conflicts2023-06-19T12:21:15ZDan TheisenAdd support for logging and stat collection related to IPv6 HR conflictsThis is related to #2419
Investigate code paths related to IPv6 Host Reservation conflicts, and add a `ALLOC_ENGINE_V6_DISCOVER_ADDRESS_CONFLICT` log message as well as `v6-reservation-conflicts` and `subnet[id].v6-reservation-conflicts...This is related to #2419
Investigate code paths related to IPv6 Host Reservation conflicts, and add a `ALLOC_ENGINE_V6_DISCOVER_ADDRESS_CONFLICT` log message as well as `v6-reservation-conflicts` and `subnet[id].v6-reservation-conflicts` stats to reflect issues with allocating IPv6 Host Reservations.backloghttps://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.backloghttps://gitlab.isc.org/isc-projects/kea/-/issues/2374kea-admin lease-dump file permisions2022-11-02T15:10:41ZMarcin Godzinakea-admin lease-dump file permisionsCommand `kea-admin lease-dump` exports database as memfile file with permissions of user running the command.
If Kea is running from packages on Ubuntu it expects `/var/lib/kea/kea-leases4.csv`(or v6) file to be owned by `_kea` user/gro...Command `kea-admin lease-dump` exports database as memfile file with permissions of user running the command.
If Kea is running from packages on Ubuntu it expects `/var/lib/kea/kea-leases4.csv`(or v6) file to be owned by `_kea` user/group.
**In this case, we can not directly copy exported file without changing its permissions, or Kea will not be able to read the file and start.**
The problem was discovered during forge tests. The test Starts Kea with database and exports database to the memfile location. Then it restarts Kea using the exported file.
Test failed on Ubuntu using deb packages.
**Possible solutions:**
- We can modify the forge test to account for different permissions and modify help text of `lease-dump` command to warn user about possible permission clash.
- We can modify `lease-dump` script to detect what permissions the file should have, and apply them during export. This will solve import and export on the same system, but the problem will still exist if migrating to other systems with a different way of installing Kea.backloghttps://gitlab.isc.org/isc-projects/kea/-/issues/2373Examples / documentation for MySQL support of SSL/TLS on Debian2022-11-02T15:10:41ZFrancis DupontExamples / documentation for MySQL support of SSL/TLS on DebianOn Debian the support of SSL/TLS in MySQL does not use OpenSSL but GnuTLS as the inspection of the have_openssl MySQL global variable shows. This breaks the examples on at least two points:
- the private keys must be in PKCS#1 aka RSA f...On Debian the support of SSL/TLS in MySQL does not use OpenSSL but GnuTLS as the inspection of the have_openssl MySQL global variable shows. This breaks the examples on at least two points:
- the private keys must be in PKCS#1 aka RSA format
- the choice of the cipher fails for a reason to determine
Here's [KB article](https://kb.isc.org/docs/securing-the-mysql-connection) about securing MySQL connections using OpenSSL. Maybe this could be extended with Debian specific stuff or a separate (similar) one could be written.backloghttps://gitlab.isc.org/isc-projects/kea/-/issues/2359Flex option hook should support unspecified number of encapsulation levels (j...2023-07-31T13:32:51ZRazvan BecheriuFlex option hook should support unspecified number of encapsulation levels (just like the core code does). - Follow-up from "Draft: Resolve "[ISC-support #20152] Support for custom spaces in flex_option hook""Flex option hook should support unspecified number of encapsulation levels (just like the core code does).
Core supported spaces and options:
```
#define ISC_V6_OPTION_SPACE "4o6"
#define MAPE_V6_OPTION_SPACE "s...Flex option hook should support unspecified number of encapsulation levels (just like the core code does).
Core supported spaces and options:
```
#define ISC_V6_OPTION_SPACE "4o6"
#define MAPE_V6_OPTION_SPACE "s46-cont-mape-options"
#define MAPT_V6_OPTION_SPACE "s46-cont-mapt-options"
#define LW_V6_OPTION_SPACE "s46-cont-lw-options"
#define V4V6_RULE_OPTION_SPACE "s46-rule-options"
#define V4V6_BIND_OPTION_SPACE "s46-v4v6bind-options"
D6O_DHCPV4_MSG = 87, /* RFC7341 */
D6O_DHCPV4_O_DHCPV6_SERVER = 88, /* RFC7341 */
D6O_S46_RULE = 89, /* RFC7598 */
D6O_S46_BR = 90, /* RFC7598 */
D6O_S46_DMR = 91, /* RFC7598 */
D6O_S46_V4V6BIND = 92, /* RFC7598 */
D6O_S46_PORTPARAMS = 93, /* RFC7598 */
D6O_S46_CONT_MAPE = 94, /* RFC7598 */
D6O_S46_CONT_MAPT = 95, /* RFC7598 */
D6O_S46_CONT_LW = 96, /* RFC7598 */
```
The following discussion from !1600 should be addressed:
- [X] @razvan started a [discussion](https://gitlab.isc.org/isc-projects/kea/-/merge_requests/1600#note_274971): (+2 comments)
> we can have "sub-options" here also and we will effectively have unlimited encapsulation levels (of course limited by user definitions and configuration text), and we can call parseSubOptions in parseSubOptions recursively.backloghttps://gitlab.isc.org/isc-projects/kea/-/issues/2345Kea 2.0.0 Fails to Allocate Leases2022-11-02T15:10:41ZALOK KUMAR SINGHKea 2.0.0 Fails to Allocate LeasesWe are using Kea 2.0.0 version with backend database postgresql and observer an issue where lease not getting allocated/extended and producing below error message.
Note: Kea and Postgresql database is installed on same VM and has timez...We are using Kea 2.0.0 version with backend database postgresql and observer an issue where lease not getting allocated/extended and producing below error message.
Note: Kea and Postgresql database is installed on same VM and has timezone EST set, also database timezone is set to EST but still this issue is happening, though this was running perfect from last 3 months after an upgrade from 1.5.0P1 to 2.0.0
```
2022-03-07 01:48:13.030 DEBUG [kea-dhcp4.dhcp4/1541.140278882691264] DHCP4_CLASS_ASSIGNED [hwtype=1 9c:ad:97:16:83:2f], cid=[01:9c:ad:97:16:83:2f], tid=0x23d07203: client packet has been assigned to the following class(es): UNKNOWN
2022-03-07 01:48:13.030 DEBUG [kea-dhcp4.dhcp4/1541.140278882691264] DHCP4_CLASS_ASSIGNED [hwtype=1 9c:ad:97:16:83:2f], cid=[01:9c:ad:97:16:83:2f], tid=0x23d07203: client packet has been assigned to the following class(es): ALL, HA_codcmdndh001, VENDOR_CLASS_MSFT 5.0, UNKNOWN
2022-03-07 01:48:13.030 DEBUG [kea-dhcp4.ddns/1541.140278882691264] DHCP4_CLIENT_FQDN_PROCESS [hwtype=1 9c:ad:97:16:83:2f], cid=[01:9c:ad:97:16:83:2f], tid=0x23d07203: processing Client FQDN option
2022-03-07 01:48:13.030 DEBUG [kea-dhcp4.ddns/1541.140278882691264] DHCP4_CLIENT_FQDN_DATA [hwtype=1 9c:ad:97:16:83:2f], cid=[01:9c:ad:97:16:83:2f], tid=0x23d07203: Client sent FQDN option: type=81 (CLIENT_FQDN), flags: (N=0, E=0, O=0, S=0), domain-name='compy' (partial)
2022-03-07 01:48:13.030 DEBUG [kea-dhcp4.ddns/1541.140278882691264] DHCP4_RESPONSE_FQDN_DATA [hwtype=1 9c:ad:97:16:83:2f], cid=[01:9c:ad:97:16:83:2f], tid=0x23d07203: including FQDN option in the server's response: type=81 (CLIENT_FQDN), flags: (N=1, E=0, O=0, S=0), domain-name='compy.' (full)
2022-03-07 01:48:13.031 DEBUG [kea-dhcp4.dhcpsrv/1541.140278882691264] DHCPSRV_PGSQL_GET_CLIENTID obtaining IPv4 leases for client ID 01:9c:ad:97:16:83:2f
2022-03-07 01:48:13.031 DEBUG [kea-dhcp4.hosts/1541.140278882691264] HOSTS_CFG_GET_ONE_SUBNET_ID_ADDRESS4 get one host with reservation for subnet id 2 and IPv4 address 10.52.67.126
2022-03-07 01:48:13.031 DEBUG [kea-dhcp4.hosts/1541.140278882691264] HOSTS_CFG_GET_ALL_ADDRESS4 get all hosts with reservations for IPv4 address 10.52.67.126
2022-03-07 01:48:13.031 DEBUG [kea-dhcp4.hosts/1541.140278882691264] HOSTS_CFG_GET_ALL_ADDRESS4_COUNT using address 10.52.67.126, found 0 host(s)
2022-03-07 01:48:13.031 DEBUG [kea-dhcp4.hosts/1541.140278882691264] HOSTS_CFG_GET_ONE_SUBNET_ID_ADDRESS4_NULL host not found using subnet id 2 and address 10.52.67.126
2022-03-07 01:48:13.031 DEBUG [kea-dhcp4.dhcpsrv/1541.140278882691264] DHCPSRV_PGSQL_GET_ADDR4 obtaining IPv4 lease for address 10.52.67.126
2022-03-07 01:48:13.031 DEBUG [kea-dhcp4.alloc-engine/1541.140278882691264] ALLOC_ENGINE_V4_REQUEST_EXTEND_LEASE [hwtype=1 9c:ad:97:16:83:2f], cid=[01:9c:ad:97:16:83:2f], tid=0x23d07203: extending lifetime of the lease for address 10.52.67.126
2022-03-07 01:48:13.031 DEBUG [kea-dhcp4.dhcpsrv/1541.140278882691264] DHCPSRV_PGSQL_UPDATE_ADDR4 updating IPv4 lease for address 10.52.67.126
2022-03-07 01:48:13.031 ERROR [kea-dhcp4.alloc-engine/1541.140278882691264] ALLOC_ENGINE_V4_ALLOC_ERROR [hwtype=1 9c:ad:97:16:83:2f], cid=[01:9c:ad:97:16:83:2f], tid=0x23d07203: error during attempt to allocate an IPv4 address: unable to update lease for address 10.52.67.126 as it does not exist
2022-03-07 01:48:13.031 DEBUG [kea-dhcp4.bad-packets/1541.140278882691264] DHCP4_PACKET_NAK_0004 [hwtype=1 9c:ad:97:16:83:2f], cid=[01:9c:ad:97:16:83:2f], tid=0x23d07203: failed to grant a lease, client sent ciaddr 0.0.0.0, requested-ip-address 10.52.67.126
2022-03-07 01:48:13.031 DEBUG [kea-dhcp4.callouts/1541.140278882691264] HOOKS_CALLOUTS_BEGIN begin all callouts for hook leases4_committed
```
[6mar.pcap](/uploads/819df2d10bd7335b39dae233f837379e/6mar.pcap)[kea-dhcp4.log.10](/uploads/64ac95d818035cf59d7ba2f75604e770/kea-dhcp4.log.10)backloghttps://gitlab.isc.org/isc-projects/kea/-/issues/2341Incorrect case-folding of hostnames2022-11-02T15:10:40ZVictor NawothnigIncorrect case-folding of hostnamesThe commit 44faa27e6d7c197de32b9d89cef039b20574d6f5 implements case-insensitive hostname comparisons by actually case-folding the hostname. This has the unfortunate consequence that when setting an uppercase hostname in a DHCP reservatio...The commit 44faa27e6d7c197de32b9d89cef039b20574d6f5 implements case-insensitive hostname comparisons by actually case-folding the hostname. This has the unfortunate consequence that when setting an uppercase hostname in a DHCP reservation, a client will receive the hostname lower-cased.
This actually caused quite a bit of friction in our infrastructure after a KEA upgrade.backloghttps://gitlab.isc.org/isc-projects/kea/-/issues/2313kea-dhcp6 has wrong hook label in exception catch block2022-11-02T15:10:40ZThomas Markwalderkea-dhcp6 has wrong hook label in exception catch blockkea-dhcp6 server has try-catch block around the call to leases6_committed hook callout. The catch block calls HookManager to drop parked packet but specifies the wrong hook name:
```
try {
// Call all installed cal...kea-dhcp6 server has try-catch block around the call to leases6_committed hook callout. The catch block calls HookManager to drop parked packet but specifies the wrong hook name:
```
try {
// Call all installed callouts
HooksManager::callCallouts(Hooks.hook_index_leases6_committed_,
*callout_handle);
} catch (...) {
// Make sure we don't orphan a parked packet.
HooksManager::drop("leases4_committed", query);
throw;
}
```
It should be "leases6_committed". I doubt this is having any real impact but it might represent a memory leak under certain error conditions.backloghttps://gitlab.isc.org/isc-projects/kea/-/issues/2312ALLOC_ENGINE_Vx_ALLOC_FAIL_CLASSES message does not make sense2022-11-02T15:10:41ZFrancis DupontALLOC_ENGINE_Vx_ALLOC_FAIL_CLASSES message does not make senseThe ALLOC_ENGINE_V4_ALLOC_FAIL_CLASSES message (and soon ALLOC_ENGINE_V6_ALLOC_FAIL_CLASSES message and associated counters) is triggered by a failed allocation for a query which has at least one class. As all queries are members of the ...The ALLOC_ENGINE_V4_ALLOC_FAIL_CLASSES message (and soon ALLOC_ENGINE_V6_ALLOC_FAIL_CLASSES message and associated counters) is triggered by a failed allocation for a query which has at least one class. As all queries are members of the ALL classes this does not make sense. Same for the KNOWN and UNKNOWN classes which are commonly used as guards too.
Note that to print classes is not a bad idea, the issue is only the assumption classes are related to the allocation failure.backloghttps://gitlab.isc.org/isc-projects/kea/-/issues/2305Kea should always return lease file location if memfile is used2022-11-02T15:10:41ZTomek MrugalskiKea should always return lease file location if memfile is usedThis issue came up during Stork sanity checks: https://gitlab.isc.org/isc-projects/stork/-/issues/667. The background of the problem is that Kea does not return lease file location if a default value is used. However, for an average user...This issue came up during Stork sanity checks: https://gitlab.isc.org/isc-projects/stork/-/issues/667. The background of the problem is that Kea does not return lease file location if a default value is used. However, for an average user to determine where the lease file is located, he'd have to figure out compilation options and what prefix was configured during compilation. This is not something average user can do.
The proposal is to always return the lease file location if memfile is used, even if the location is "the default" (because effectively, the default can change from one deployment to another).backloghttps://gitlab.isc.org/isc-projects/kea/-/issues/2300Deploy flawfinder in CI (SAST)2022-11-02T15:10:41ZTomek MrugalskiDeploy flawfinder in CI (SAST)There's [flawfinder](https://github.com/david-a-wheeler/flawfinder) tool that supposedly is useful for C/C++ code audit. We should:
1. [ ] try it and see if the results produced are useful
2. [ ] fix the problems it reported
3. [x] depl...There's [flawfinder](https://github.com/david-a-wheeler/flawfinder) tool that supposedly is useful for C/C++ code audit. We should:
1. [ ] try it and see if the results produced are useful
2. [ ] fix the problems it reported
3. [x] deploy it on CI
Each step depends on the previous one. If at any step we decide the whole thing doesn't make sense, the ticket should be closed.
It may be integrated with gitlab. Go to Security & Compliance -> Configuration, then Static Application Security Testing (SAST).backloghttps://gitlab.isc.org/isc-projects/kea/-/issues/2297'outbound_interface' support for DHCP6 server?2022-11-02T15:10:40ZKevin Fleming'outbound_interface' support for DHCP6 server?**Some initial questions**
- Are you sure your feature is not already implemented in the latest Kea version? Yes.
- Are you sure what you would like to do is not possible using some other mechanisms? It is possible, but inconvenient and ...**Some initial questions**
- Are you sure your feature is not already implemented in the latest Kea version? Yes.
- Are you sure what you would like to do is not possible using some other mechanisms? It is possible, but inconvenient and inconsistent.
- Have you discussed your idea on kea-users or kea-dev mailing lists? No.
**Is your feature request related to a problem? Please describe.**
I have a pair of Kea DHCP servers without direct connection to the clients (they receive all requests via relay). The machines have a 'transport' interface that is used to route traffic to the rest of the network, but is not the address used for services. The service interface is a 'dummy' interface, and that is the interface configured in the server config files. In spite of that, the server believes that requests are received on the 'transport' interface even though it is only bound to the 'mgmt' interface.
In the DHCP4 server, I can set `outbound_interface` to `use-routing` so that replies can be sent out without having a socket open on the 'transport' interface.
**Describe the solution you'd like**
In the DHCP6 server, support the same `outbound_interface` mechanism as the DHCP4 server supports.
**Describe alternatives you've considered**
If I *also* bind the server to the 'transport' interface, the server can send replies. That is my current configuration.
**Additional context**
I am using Kea 2.0.1, but have checked the docs for 2.1.2 and the code in the repo and this feature is not available in the DHCP6 server.
**Funding its development**
Kea is run by ISC, which is a small non-profit organization without any government funding or any permanent sponsorship organizations. Are you able and willing to participate financially in the development costs? Possibly.
**Participating in development**
Are you willing to participate in the feature development? ISC team always tries to make a feature as generic as possible, so it can be used in wide variety of situations. That means the proposed solution may be a bit different that you initially thought. Are you willing to take part in the design discussions? Are you willing to test an unreleased engineering code? Yes to all.backloghttps://gitlab.isc.org/isc-projects/kea/-/issues/2271Extend the infinite lifetime feature to full DHCP2022-11-02T15:10:41ZFrancis DupontExtend the infinite lifetime feature to full DHCPFollowup of #897 which uses infinite lifetime only for BOOTP.
Already discussed design points:
- skip Cassandra/CQL support
- add a new lease state to make static/sticky leases independent of the real lifetime
- by default static/sti...Followup of #897 which uses infinite lifetime only for BOOTP.
Already discussed design points:
- skip Cassandra/CQL support
- add a new lease state to make static/sticky leases independent of the real lifetime
- by default static/sticky leases can't be released
- add new config flags to allow infinite lifetimesbackloghttps://gitlab.isc.org/isc-projects/kea/-/issues/2263Kea database cluster issue2023-04-14T14:17:49Zkpramodk46Kea database cluster issuewhen we are using in postgres database cluster (Syn and async) for kea dhcp server then it will showing the error message and also remove the ip address when lease has been expired but when we are using single node database(without clust...when we are using in postgres database cluster (Syn and async) for kea dhcp server then it will showing the error message and also remove the ip address when lease has been expired but when we are using single node database(without cluster) it is perfectly fine. My database service and dhcp service are up.
What is issue? please help....
![Kea_error_issue](/uploads/f7db45c5b9c1b8c3b481d83d711206dc/Kea_error_issue.JPG)
```
Jan 06 17:22:04 stag-kea-dhcp.nic.in kea-dhcp4[3999]: INFO DHCP4_LEASE_ADVERT [hwtype=1 c0:3f:d5:46:32:48], cid=[01:c0:3f:d5:46:32:48>
Jan 06 17:22:04 stag-kea-dhcp.nic.in kea-dhcp4[3999]: ERROR ALLOC_ENGINE_V4_ALLOC_ERROR [hwtype=1 c0:3f:d5:46:32:48], cid=[01:c0:3f:d5>
Jan 06 17:22:04 stag-kea-dhcp.nic.in kea-dhcp4[3999]: INFO DHCP4_LEASE_ADVERT [hwtype=1 c0:3f:d5:46:32:48], cid=[01:c0:3f:d5:46:32:48>
Jan 06 17:22:04 stag-kea-dhcp.nic.in kea-dhcp4[3999]: ERROR ALLOC_ENGINE_V4_ALLOC_ERROR [hwtype=1 c0:3f:d5:46:32:48], cid=[01:c0:3f:d5>
Jan 06 17:22:04 stag-kea-dhcp.nic.in kea-dhcp4[3999]: INFO DHCP4_LEASE_ADVERT [hwtype=1 c0:3f:d5:46:32:48], cid=[01:c0:3f:d5:46:32:48>
Jan 06 17:22:04 stag-kea-dhcp.nic.in kea-dhcp4[3999]: ERROR ALLOC_ENGINE_V4_ALLOC_ERROR [hwtype=1 c0:3f:d5:46:32:48], cid=[01:c0:3f:d5>
Jan 06 17:22:04 stag-kea-dhcp.nic.in kea-dhcp4[3999]: INFO DHCP4_LEASE_ADVERT [hwtype=1 c0:3f:d5:46:32:48], cid=[01:c0:3f:d5:46:32:48>
Jan 06 17:22:04 stag-kea-dhcp.nic.in kea-dhcp4[3999]: ERROR ALLOC_ENGINE_V4_ALLOC_ERROR [hwtype=1 c0:3f:d5:46:32:48], cid=[01:c0:3f:d5>
Jan 06 17:22:04 stag-kea-dhcp.nic.in kea-dhcp4[3999]: INFO DHCP4_LEASE_ADVERT [hwtype=1 c0:3f:d5:46:32:48], cid=[01:c0:3f:d5:46:32:48>
Jan 06 17:22:04 stag-kea-dhcp.nic.in kea-dhcp4[3999]: ERROR ALLOC_ENGINE_V4_ALLOC_ERROR [hwtype=1 c0:3f:d5:46:32:48], cid=[01:c0:3f:d5>```backloghttps://gitlab.isc.org/isc-projects/kea/-/issues/2260minor bugs in lease4 commands2022-11-02T15:10:41ZMarcin Godzinaminor bugs in lease4 commands1. `lease4-get` error states "duid" and not "client-id"
```shell
{"command": "lease4-get",
"arguments": {"identifier": "ff:01:02:03:ff:05",
"identifier-type": "something",
"sub...1. `lease4-get` error states "duid" and not "client-id"
```shell
{"command": "lease4-get",
"arguments": {"identifier": "ff:01:02:03:ff:05",
"identifier-type": "something",
"subnet-id": 1}}
```
Should return: `"Incorrect identifier type: something, the only supported values are: address, hw-address, client-id"`
Returns: `"Incorrect identifier type: something, the only supported values are: address, hw-address, duid"`
2. `lease4-get-by-client-id` error states "duid" and not "client-id"
```shell
{"command": "lease4-get-by-client-id",
"arguments": {"client-id": ""}}
```
Should return: `"Empty client-id is not allowed"`
Returns: `"Empty DUIDs are not allowed"`
3. `lease4-get-all` accepts negative numbers as subnet number
Not necessary a problem.
```shell
{"command": "lease4-get-all",
"arguments": {"subnets": [-1]}}
```
4. `lease6-get` accepts `"subnet-id"` and `"identifier"` and `"identifier-type": "duid"` without `"iaid"`
but returns 0 leases found without complaining about lack of `iaid`
example:
```shell
{"command": "lease4-get",
"arguments": {"subnet-id": 1, "identifier": "1a:1b:1c:1d:1e:1f:20:21:22:23:24", "identifier-type": "duid"}}
```
will always return 0 leases found.backloghttps://gitlab.isc.org/isc-projects/kea/-/issues/2256Prepare subnet selection speedup: patrica trees2023-06-19T12:08:06ZFrancis DupontPrepare subnet selection speedup: patrica treesPatricia trees are the optimal general data structure for IP prefix lookup: the number of comparisons is bounded by the number of bits so 32 or 128 for IP, the real number depends on the number of nodes where children differs and in the ...Patricia trees are the optimal general data structure for IP prefix lookup: the number of comparisons is bounded by the number of bits so 32 or 128 for IP, the real number depends on the number of nodes where children differs and in the real world is far lower.
BTW the current code just iterates on all subnetworks so is linear in the number of subnets (average case N/2, N for the worst case which includes the not found case). The patricia tree gives also overlaps (equality or inclusion).backlogRazvan BecheriuRazvan Becheriuhttps://gitlab.isc.org/isc-projects/kea/-/issues/2255Prepare subnet selection speedup: auxiliary tables2023-07-31T13:32:51ZFrancis DupontPrepare subnet selection speedup: auxiliary tablesThere are at least two cases where an index can or should not be used/added to a multi index:
- when the corresponding data structure is not supported, e.g. patricia tree for IP prefixes
- when the default is very common: the multi ind...There are at least two cases where an index can or should not be used/added to a multi index:
- when the corresponding data structure is not supported, e.g. patricia tree for IP prefixes
- when the default is very common: the multi index works but gives a lot of values for this default value so it doubles the insert/delete operation time
- when a direct index value change is convenient: this breaks the multi index so must not be done (instead the multi index must be updated which is a complex (to code) and slow (to execute) operation)
The solution is to add in parallel of a multi index soem auxiliary tables which provide a specific lookup. The auxiliary table is a base type with add, delete and change (which is in general delete followed by add).backlogRazvan BecheriuRazvan Becheriu