<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;">
I also noticed when I used “config-get” API, it would return a has value at the end. I compared both API outputs and they are the same. 
<div><br>
</div>
<div><br>
</div>
<div><br>
<div><br>
</div>
<div>...</div>
<div>
<div style="background-color: rgb(255, 255, 254); line-height: 18px;">
<div><span style="white-space: pre; color: rgb(163, 21, 21);">"hash"</span><span style="white-space: pre;">:
</span><font color="#0451a5"><span style="caret-color: rgb(4, 81, 165); white-space: pre;">“</span></font><span style="white-space: pre; color: rgb(4, 81, 165);">8CBF975...C36A513A.ADDFCD6E5980...6E"</span></div>
<div style="white-space: pre;">},</div>
<div style="white-space: pre;"><span style="color: rgb(163, 21, 21);">"result"</span>:
<span style="color: rgb(9, 134, 88);">0</span></div>
<div style="white-space: pre;">}</div>
<div style="white-space: pre;">]</div>
</div>
<div><br>
<blockquote type="cite">
<div>On May 13, 2025, at 2:34 AM, Diogo André de Assumpção <daa@meta.com> wrote:</div>
<br class="Apple-interchange-newline">
<div>
<div class="WordSection1" style="page: WordSection1; caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;">
<div style="margin: 0in; font-size: 12pt; font-family: Aptos, sans-serif;">Yes, I did mean the config in /etc/kea. Getting the config with config-write seems to be the same as config-get, it returns the config with all the defaults, example:<o:p></o:p></div>
<div style="margin: 0in; font-size: 12pt; font-family: Aptos, sans-serif;"><o:p> </o:p></div>
<div style="margin: 0in; font-size: 12pt; font-family: Aptos, sans-serif;"><o:p> </o:p></div>
<div style="margin: 0in; font-size: 12pt; font-family: Aptos, sans-serif;"><o:p> </o:p></div>
<div style="margin: 0in; font-size: 12pt; font-family: Aptos, sans-serif;">From config-write:<o:p></o:p></div>
<div style="margin: 0in; font-size: 12pt; font-family: Aptos, sans-serif;"><o:p> </o:p></div>
<div style="margin: 0in; font-size: 12pt; font-family: Aptos, sans-serif;">{<o:p></o:p></div>
<div style="margin: 0in; font-size: 12pt; font-family: Aptos, sans-serif;">  "Dhcp4": {<o:p></o:p></div>
<div style="margin: 0in; font-size: 12pt; font-family: Aptos, sans-serif;">    "allocator": "iterative",<o:p></o:p></div>
<div style="margin: 0in; font-size: 12pt; font-family: Aptos, sans-serif;">    "authoritative": false,<o:p></o:p></div>
<div style="margin: 0in; font-size: 12pt; font-family: Aptos, sans-serif;">    "boot-file-name": "",<o:p></o:p></div>
<div style="margin: 0in; font-size: 12pt; font-family: Aptos, sans-serif;">    "calculate-tee-times": false,<o:p></o:p></div>
<div style="margin: 0in; font-size: 12pt; font-family: Aptos, sans-serif;">    "control-socket": {<o:p></o:p></div>
<div style="margin: 0in; font-size: 12pt; font-family: Aptos, sans-serif;">      "socket-name": "/tmp/kea4-ctrl-socket",<o:p></o:p></div>
<div style="margin: 0in; font-size: 12pt; font-family: Aptos, sans-serif;">      "socket-type": "unix"<o:p></o:p></div>
<div style="margin: 0in; font-size: 12pt; font-family: Aptos, sans-serif;">    },<o:p></o:p></div>
<div style="margin: 0in; font-size: 12pt; font-family: Aptos, sans-serif;">    "ddns-conflict-resolution-mode": "check-with-dhcid",<o:p></o:p></div>
<div style="margin: 0in; font-size: 12pt; font-family: Aptos, sans-serif;">    "ddns-generated-prefix": "myhost",<o:p></o:p></div>
<div style="margin: 0in; font-size: 12pt; font-family: Aptos, sans-serif;">    "ddns-override-client-update": false,<o:p></o:p></div>
<div style="margin: 0in; font-size: 12pt; font-family: Aptos, sans-serif;">    "ddns-override-no-update": false,<o:p></o:p></div>
<div style="margin: 0in; font-size: 12pt; font-family: Aptos, sans-serif;">    "ddns-qualifying-suffix": "",<o:p></o:p></div>
<div style="margin: 0in; font-size: 12pt; font-family: Aptos, sans-serif;">    "ddns-replace-client-name": "never",<o:p></o:p></div>
<div style="margin: 0in; font-size: 12pt; font-family: Aptos, sans-serif;">    "ddns-send-updates": true,<o:p></o:p></div>
<div style="margin: 0in; font-size: 12pt; font-family: Aptos, sans-serif;">    "ddns-update-on-renew": false,<o:p></o:p></div>
<div style="margin: 0in; font-size: 12pt; font-family: Aptos, sans-serif;"><o:p> </o:p></div>
<div style="margin: 0in; font-size: 12pt; font-family: Aptos, sans-serif;"><o:p> </o:p></div>
<div style="margin: 0in; font-size: 12pt; font-family: Aptos, sans-serif;">And /etc/kea/kea-dhcp4.conf<o:p></o:p></div>
<div style="margin: 0in; font-size: 12pt; font-family: Aptos, sans-serif;"><o:p> </o:p></div>
<div style="margin: 0in; font-size: 12pt; font-family: Aptos, sans-serif;"><br>
{<o:p></o:p></div>
<div style="margin: 0in; font-size: 12pt; font-family: Aptos, sans-serif;">    "Dhcp4": {<o:p></o:p></div>
<div style="margin: 0in; font-size: 12pt; font-family: Aptos, sans-serif;">        "store-extended-info": true,<o:p></o:p></div>
<div style="margin: 0in; font-size: 12pt; font-family: Aptos, sans-serif;">        "interfaces-config": {<o:p></o:p></div>
<div style="margin: 0in; font-size: 12pt; font-family: Aptos, sans-serif;">            "interfaces": [<o:p></o:p></div>
<div style="margin: 0in; font-size: 12pt; font-family: Aptos, sans-serif;">                "eth0/192.168.1.1"<o:p></o:p></div>
<div style="margin: 0in; font-size: 12pt; font-family: Aptos, sans-serif;">            ]<o:p></o:p></div>
<div style="margin: 0in; font-size: 12pt; font-family: Aptos, sans-serif;">        },<o:p></o:p></div>
<div style="margin: 0in; font-size: 12pt; font-family: Aptos, sans-serif;">        "control-socket": {<o:p></o:p></div>
<div style="margin: 0in; font-size: 12pt; font-family: Aptos, sans-serif;">            "socket-type": "unix",<o:p></o:p></div>
<div style="margin: 0in; font-size: 12pt; font-family: Aptos, sans-serif;">            "socket-name": "/tmp/kea4-ctrl-socket"<o:p></o:p></div>
<div style="margin: 0in; font-size: 12pt; font-family: Aptos, sans-serif;">        },<o:p></o:p></div>
<div style="margin: 0in; font-size: 12pt; font-family: Aptos, sans-serif;">        "lease-database": {<o:p></o:p></div>
<div style="margin: 0in; font-size: 12pt; font-family: Aptos, sans-serif;">            "type": "memfile",<o:p></o:p></div>
<div style="margin: 0in; font-size: 12pt; font-family: Aptos, sans-serif;">            "name": "/tmp/kea-dhcp4.csv",<o:p></o:p></div>
<div style="margin: 0in; font-size: 12pt; font-family: Aptos, sans-serif;">            "lfc-interval": 7200,<o:p></o:p></div>
<div style="margin: 0in; font-size: 12pt; font-family: Aptos, sans-serif;">            "persist": true<o:p></o:p></div>
<div style="margin: 0in; font-size: 12pt; font-family: Aptos, sans-serif;">        },<o:p></o:p></div>
<div style="margin: 0in; font-size: 12pt; font-family: Aptos, sans-serif;"><br>
<br>
<o:p></o:p></div>
<div style="margin: 0in; font-size: 12pt; font-family: Aptos, sans-serif;"><o:p> </o:p></div>
<div id="mail-editor-reference-message-container">
<div>
<div>
<div style="border-width: 1pt medium medium; border-style: solid none none; border-color: rgb(181, 196, 223) currentcolor currentcolor; border-image: none; padding: 3pt 0in 0in;">
<p class="MsoNormal" style="margin: 0in 0in 12pt; font-size: 12pt; font-family: Aptos, sans-serif;">
<b><span style="">From:<span class="Apple-converted-space"> </span></span></b><span style=""><a href="mailto:tachibanashita@outlook.com" style="color: blue; text-decoration: underline;">tachibanashita@outlook.com</a><span class="Apple-converted-space"> </span><<a href="mailto:tachibanashita@outlook.com" style="color: blue; text-decoration: underline;">tachibanashita@outlook.com</a>><br>
<b>Date:<span class="Apple-converted-space"> </span></b>Monday, May 12, 2025 at 5:42</span><span style="font-family: Arial, sans-serif;"> </span><span style="">PM<br>
<b>To:<span class="Apple-converted-space"> </span></b>Kea user's list <<a href="mailto:kea-users@lists.isc.org" style="color: blue; text-decoration: underline;">kea-users@lists.isc.org</a>><br>
<b>Cc:<span class="Apple-converted-space"> </span></b>Diogo André de Assumpção <<a href="mailto:daa@meta.com" style="color: blue; text-decoration: underline;">daa@meta.com</a>><br>
<b>Subject:<span class="Apple-converted-space"> </span></b>Re: [Kea-users] config-hash-get – uses full config to hash?<o:p></o:p></span></p>
</div>
<div>
<div style="margin: 0in; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-size: 1pt; color: white;">“Using the same config that I have loaded in the server” do you mean the config file in /etc/kea? If so, can you use the write-config API
 to get the configuration in memory and compare it again? On May 12, 2025, at 2:</span><span style="font-size: 1pt; font-family: Arial, sans-serif; color: white;"> </span><span style="font-size: 1pt; color: white;">43 AM, Diogo André de Assumpção<o:p></o:p></span></div>
</div>
<div>
<div style="margin: 0in; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-size: 1pt; color: white;"><o:p></o:p></span></div>
</div>
<div style="margin: 0in; font-size: 12pt; font-family: Aptos, sans-serif;">“Using the same config that I have loaded in the server” do you mean the config file in /etc/kea? If so, can you use the write-config API to get the configuration in memory and compare
 it again? <o:p></o:p></div>
<div>
<div style="margin: 0in; font-size: 12pt; font-family: Aptos, sans-serif;"><o:p> </o:p></div>
</div>
<div>
<div style="margin: 0in; font-size: 12pt; font-family: Aptos, sans-serif;"><o:p> </o:p></div>
</div>
<div>
<div style="margin: 0in; font-size: 12pt; font-family: Aptos, sans-serif;"><o:p> </o:p></div>
<div>
<div style="margin: 0in; font-size: 12pt; font-family: Aptos, sans-serif;"><br>
<br>
<o:p></o:p></div>
<blockquote style="margin-top: 5pt; margin-bottom: 5pt;">
<div>
<div style="margin: 0in; font-size: 12pt; font-family: Aptos, sans-serif;">On May 12, 2025, at 2:43<span style="font-family: Arial, sans-serif;"> </span>AM, Diogo André de Assumpção via Kea-users <kea-users@lists.isc.org> wrote:<o:p></o:p></div>
</div>
<div style="margin: 0in; font-size: 12pt; font-family: Aptos, sans-serif;"><o:p> </o:p></div>
<div>
<div>
<div>
<div style="margin: 0in; font-size: 12pt; font-family: Aptos, sans-serif;">Hi all,<span class="apple-converted-space"> </span><br>
<br>
I was exploring using the `config-hash-get` command to get a hash of the loaded config and then compare with a candidate config to see if anything was change before loading.<br>
<br>
Using the same config that I have loaded in the server, I couldn’t get a hash that matched the one we get via the `config-hash-get` command.<o:p></o:p></div>
</div>
<div>
<div style="margin: 0in; font-size: 12pt; font-family: Aptos, sans-serif;"> <o:p></o:p></div>
</div>
<div>
<div style="margin: 0in; font-size: 12pt; font-family: Aptos, sans-serif;">Is that something in the way I’m generating the hash? I’m passing the entire dhcp4 config (ie. {"Dhcp4":…}) to the hash function.<o:p></o:p></div>
</div>
<div>
<div style="margin: 0in; font-size: 12pt; font-family: Aptos, sans-serif;"> <o:p></o:p></div>
</div>
<div>
<div style="margin: 0in; font-size: 12pt; font-family: Aptos, sans-serif;">I also noticed that if I do a `config-get` command, the output will contain every optional field that is usually not present in a manually generated config. Could that be the reason
 why the hashes don’t match?<br>
<br>
Thanks,<o:p></o:p></div>
</div>
<div>
<div style="margin: 0in; font-size: 12pt; font-family: Aptos, sans-serif;">– Diogo<o:p></o:p></div>
</div>
</div>
<div style="margin: 0in; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-size: 9pt; font-family: Helvetica;">--<span class="apple-converted-space"> </span><br>
ISC funds the development of this software with paid support subscriptions. Contact us at<span class="apple-converted-space"> </span></span><a href="https://urldefense.com/v3/__https:/www.isc.org/contact/__;!!Bt8RZUm9aw!_pgED41K5-ladaP1HQfj0HvGM9GeX0c-2JQJIEmTLCJ57_FJSkQlrAPOna8vAy1XiR7goA6rQHheNnTz_Ac$" style="color: blue; text-decoration: underline;"><span style="font-size: 9pt; font-family: Helvetica;">https://www.isc.org/contact/</span></a><span class="apple-converted-space"><span style="font-size: 9pt; font-family: Helvetica;"> </span></span><span style="font-size: 9pt; font-family: Helvetica;">for
 more information.<br>
<br>
To unsubscribe visit<span class="apple-converted-space"> </span></span><a href="https://urldefense.com/v3/__https:/lists.isc.org/mailman/listinfo/kea-users__;!!Bt8RZUm9aw!_pgED41K5-ladaP1HQfj0HvGM9GeX0c-2JQJIEmTLCJ57_FJSkQlrAPOna8vAy1XiR7goA6rQHhe-0dQpbs$" style="color: blue; text-decoration: underline;"><span style="font-size: 9pt; font-family: Helvetica;">https://lists.isc.org/mailman/listinfo/kea-users</span></a><span style="font-size: 9pt; font-family: Helvetica;">.<br>
<br>
Kea-users mailing list<br>
</span><a href="mailto:Kea-users@lists.isc.org" style="color: blue; text-decoration: underline;"><span style="font-size: 9pt; font-family: Helvetica;">Kea-users@lists.isc.org</span></a><span style="font-size: 9pt; font-family: Helvetica;"><br>
</span><a href="https://urldefense.com/v3/__https:/lists.isc.org/mailman/listinfo/kea-users__;!!Bt8RZUm9aw!_pgED41K5-ladaP1HQfj0HvGM9GeX0c-2JQJIEmTLCJ57_FJSkQlrAPOna8vAy1XiR7goA6rQHhe-0dQpbs$" style="color: blue; text-decoration: underline;"><span style="font-size: 9pt; font-family: Helvetica;">https://lists.isc.org/mailman/listinfo/kea-users</span></a></div>
</div>
</blockquote>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<br>
</div>
</div>
</body>
</html>