mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-11-10 15:30:12 +00:00
8be0ab638d
Due to latest rewrite of NSS module, we are doing yajl parsing ourselves. This means, we had to introduce couple of callback that yajl calls. According to its documentation, a callback can cancel parsing if it returns a zero value. Well, we do just that in the string callback (findLeasesParserString()). If the JSON file we are parsing contains a key that we are not interested in, zero is returned meaning stop all parsing. This is not correct, because the JSON file can contain some other keys which are not harmful for our address translation (e.g. 'client-id'). Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
27 lines
662 B
Plaintext
27 lines
662 B
Plaintext
[
|
|
{
|
|
"ip-address": "192.168.122.199",
|
|
"mac-address": "52:54:00:a4:6f:93",
|
|
"hostname": "fedora",
|
|
"expiry-time": 1900000000
|
|
},
|
|
{
|
|
"ip-address": "2001:1234:dead:beef::2",
|
|
"mac-address": "52:54:00:04:be:64",
|
|
"hostname": "gentoo",
|
|
"expiry-time": 1900000000
|
|
},
|
|
{
|
|
"ip-address": "192.168.122.200",
|
|
"mac-address": "52:54:00:a4:6f:94",
|
|
"hostname": "fedora",
|
|
"expiry-time": 1
|
|
},
|
|
{
|
|
"ip-address": "192.168.122.3",
|
|
"mac-address": "52:54:00:aa:bb:cc",
|
|
"client-id": "01:52:54:00:aa:bb:cc",
|
|
"expiry-time": 2000000000
|
|
}
|
|
]
|