Unable to parse optional fields in dhcp lease logs.
Following is the sample of logs:-
lease 1.1.1.1 {
starts 4 2025/02/13 06:14:46;
ends 6 2025/03/15 06:14:46;
cltt 4 2025/02/13 06:14:46;
binding state active;
next binding state free;
rewind binding state free;
hardware ethernet 72:sd:0l:13:07:d0;
uid "\1\1\1\1\1";
set vendor-class-identifier = "ODFT 5.0";
client-hostname "DESKTOP-V9HOIFB";
}
lease 1.1.1.1 {
starts 2 2024/12/17 10:39:41;
ends 4 2025/01/16 10:39:41;
tstp 4 2025/01/16 10:39:41;
cltt 2 2024/12/17 10:39:41;
binding state active;
next binding state free;
rewind binding state free;
hardware ethernet 72:sd:0l:13:07:d0;
uid "\1\1\1\1\1";
client-hostname "DESKTOP-V9HOIFB";
}
`Fields like tstp/next/rewind/client-hostname/set vendor-class-identifier are optional sometimes they come sometimes they don't.`