• M
    nss: Don't stop parsing on unexpected key · 8be0ab63
    Michal Privoznik 提交于
    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: NMichal Privoznik <mprivozn@redhat.com>
    Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
    8be0ab63
libvirt_nss_leases.c 10.6 KB