[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] [PATCH] network: fix crash when starting a network with no <pf> element

On Thu, Aug 14, 2014 at 12:40:07PM -0400, Laine Stump wrote:
Martin Kletzander pointed out in email that my commit 2a193f64
introduced a crash in networkCreateInterfacePool() during startup of
any network that doesn't have a <pf> subelement of its <forward>
element. He also supplied a patch.


I expanded on that patch by
cleaning uyp now-extraneous checks in the callers of



Fortunately the offending patch hasn't been in any release, and hasn't
been (to my knowledge) backported to any other branch.
src/network/bridge_driver.c | 17 +++++++----------
1 file changed, 7 insertions(+), 10 deletions(-)

diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c
index 1ba4c3d..fc4c73d 100644
--- a/src/network/bridge_driver.c
+++ b/src/network/bridge_driver.c
@@ -2196,6 +2196,9 @@ networkCreateInterfacePool(virNetworkDefPtr netdef)
    int ret = -1;
    size_t i;

+    if (!netdef->forward.npfs || netdef->forward.nifs > 0)

I'd match these to use both !var (or var != 0), but other than that
the patch is fine, ACK with that fixed.


Attachment: signature.asc
Description: Digital signature

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]