[ovs-dev] [PATCH 1/4] ovs-brcompatd: Fix dangling reference in del_port().

Ben Pfaff blp at nicira.com
Tue Feb 23 14:35:58 PST 2010


Until now, del_port() was deleting Interface records without deleting the
Port record that referred to them.  OVSDB rejected that because it would
have caused a dangling reference from the Port to the Interfaces.  This
commit fixes the problem.

Bug #2425.
---
 vswitchd/ovs-brcompatd.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/vswitchd/ovs-brcompatd.c b/vswitchd/ovs-brcompatd.c
index faf1bee..d0568a4 100644
--- a/vswitchd/ovs-brcompatd.c
+++ b/vswitchd/ovs-brcompatd.c
@@ -479,6 +479,8 @@ del_port(const struct ovsrec_bridge *br, const char *port_name)
         }
         ovsrec_bridge_set_ports(br, ports, n);
         free(ports);
+
+        ovsrec_port_delete(port_rec);
     }
 }
 
-- 
1.6.6.1





More information about the dev mailing list