]> git.ipfire.org Git - thirdparty/libvirt.git/commit
networkGetDHCPLeases: Don't always report error if unable to read leases file
authorMichal Privoznik <mprivozn@redhat.com>
Thu, 26 Jul 2018 07:49:43 +0000 (09:49 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Thu, 26 Jul 2018 09:39:11 +0000 (11:39 +0200)
commit142c4b10fd8f55b7d2e86f5a184608da70f2edd3
tree48a0c5e5735300699bd472deee804901fa875880
parent2eb748d2599c6e9f8081e372a803f621fc7d0649
networkGetDHCPLeases: Don't always report error if unable to read leases file

https://bugzilla.redhat.com/show_bug.cgi?id=1600468

If we are unable to read leases file (no matter what the reason
is), we return 0 - just like if there were no leases. However,
because we use virFileReadAll() an error is printed into the log.
Note that not all networks have leases file - only those for
which we start dnsmasq.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
src/network/bridge_driver.c