[Kea-users] forensic logging question

egor.grijuc at orange.com egor.grijuc at orange.com
Tue Oct 19 09:41:08 UTC 2021


Hello.
I have confusing situation
I have forensic logging on test env.
Configuration:
"request-parser-format":"ifelse(pkt4.msgtype == pkt4.msgtype, 'MSG-' + hexstring(pkt4.msgtype, '') + ';Address-' + addrtotext(option[50].hex) + ';MAC-' + hexstring(pkt4.mac, '') + ';SERIAL-' + substring(hexstring(option[82].option[9].hex, ''),-32,33),'')"

Logs are stored in database.
When device boots up at first time all fine. I get record in database:
"MSG-00000003;Address-100.65.160.3;MAC-60f18abe5be5;SERIAL-34383537353434333731353045343944"

The problem is that when device boots up at first time, option 82 suboption 9 length is 39

But when it comes to renewal of lease, message goes unicast directly on kea and at this point option 82 suboption 9 length is 16.
Is it possible to make some expression that if length of option-suboption is 39 then write substring ... -32,33 but if option-suboption length is 16 just write value without "cutting" with substring operation?





_________________________________________________________________________________________________________________________

Ce message et ses pieces jointes peuvent contenir des informations confidentielles ou privilegiees et ne doivent donc
pas etre diffuses, exploites ou copies sans autorisation. Si vous avez recu ce message par erreur, veuillez le signaler
a l'expediteur et le detruire ainsi que les pieces jointes. Les messages electroniques etant susceptibles d'alteration,
Orange decline toute responsabilite si ce message a ete altere, deforme ou falsifie. Merci.

This message and its attachments may contain confidential or privileged information that may be protected by law;
they should not be distributed, used or copied without authorisation.
If you have received this email in error, please notify the sender and delete this message and its attachments.
As emails may be altered, Orange is not liable for messages that have been modified, changed or falsified.
Thank you.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/kea-users/attachments/20211019/16016f4a/attachment.htm>


More information about the Kea-users mailing list