<div dir="ltr"><div class="gmail_default" style="font-family:tahoma,sans-serif;font-size:small">I noticed DEBUG log saying:<br>DEBUG FLEX_ID_NO_IDENTIFIER_EXPRESSION identifier-expression is either not specified or empty<br></div><div class="gmail_default" style="font-family:tahoma,sans-serif;font-size:small">How is this possible ?</div></div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">czw., 20 lis 2025 o 21:03 Marcin Jurczuk <<a href="mailto:spock@omegastar.eu">spock@omegastar.eu</a>> napisał(a):<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div style="font-family:tahoma,sans-serif;font-size:small" class="gmail_default">Hi,</div><div style="font-family:tahoma,sans-serif;font-size:small" class="gmail_default"><br></div><div style="font-family:tahoma,sans-serif;font-size:small" class="gmail_default"><br></div><div style="font-family:tahoma,sans-serif;font-size:small" class="gmail_default">I'm trying to have flex-id reservation based on option 82.1. I can't force KEA to do correct loopup in DB. I've enabled postgresql query snooping and I don't see correct query:<br><br></div><div style="font-family:tahoma,sans-serif;font-size:small" class="gmail_default">Here is my setup:</div><div style="font-family:tahoma,sans-serif;font-size:small" class="gmail_default">..</div><div style="font-family:tahoma,sans-serif;font-size:small" class="gmail_default"> {<br> "library": "/usr/lib/kea/hooks/libdhcp_flex_id.so",<br> "parameters": {<br> "identifier-expression": "substring(relay4[1].text, 0, 12)",<br> "replace-client-id": true<br> }<br> }<br><br>"host-reservation-identifiers": [ "hw-address", "duid", "circuit-id", "client-id", "flex-id" ],<br><br></div><div style="font-family:tahoma,sans-serif;font-size:small" class="gmail_default">I've added reservation via API:<br>{<br> "command": "reservation-add",<br> "arguments": {<br> "operation-target":"database",<br> "reservation": {<br> "flex-id": "'DSNGCF232E15'"<br> }<br> }<br>}<br><br></div><div style="font-family:tahoma,sans-serif;font-size:small" class="gmail_default">I see it reservation in db table after adding it</div><div style="font-family:tahoma,sans-serif;font-size:small" class="gmail_default">SQL logging shows number of queries like this;<br>postgres-1 | 2025-11-20 19:56:40 UTC [361]: [59-1] user=kea,db=keadhcp,app=[unknown],client=172.18.0.8 DETAIL: parameters: $1 = '0', $2 = '0', $3 = '\x04f41c435c8c'<br>postgres-1 | 2025-11-20 19:56:40 UTC [361]: [60-1] user=kea,db=keadhcp,app=[unknown],client=172.18.0.8 LOG: execute get_host_subid4_dhcpid: SELECT h.host_id, h.dhcp_identifier, h.dhcp_identifier_type, h.dhcp4_subnet_id, h.dhcp6_subnet_id, h.ipv4_address, h.hostname, h.dhcp4_client_classes, h.dhcp6_client_classes, h.user_context, h.dhcp4_next_server, h.dhcp4_server_hostname, h.dhcp4_boot_file_name, h.auth_key, o.option_id, o.code, o.value, o.formatted_value, <a href="http://o.space" target="_blank">o.space</a>, o.persistent, o.cancelled, o.user_context, o.client_classes FROM hosts AS h LEFT JOIN dhcp4_options AS o ON h.host_id = o.host_id WHERE h.dhcp4_subnet_id = $1 AND h.dhcp_identifier_type = $2 AND h.dhcp_identifier = $3 ORDER BY h.host_id, o.option_id<br><br></div><div style="font-family:tahoma,sans-serif;font-size:small" class="gmail_default">$2 parameter (h.dhcp_identifier_type) is tested by lea only for 0,2,3 - flex_id is 4..<br><br></div><div style="font-family:tahoma,sans-serif;font-size:small" class="gmail_default">Am I missing something else ?<br><br></div></div>
</div>
</blockquote></div>