From: Ben Pfaff Date: Wed, 15 Apr 2009 22:03:14 +0000 (-0700) Subject: vswitch: Keep list of old interfaces sorted when reconfiguring ports. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=701f48755657a288e4d3a955321e669dabc3be68;p=openvswitch vswitch: Keep list of old interfaces sorted when reconfiguring ports. The old_ifaces array must be sorted because we apply svec_contains() to it, but there was nothing guaranteeing that it was sorted. So add a call to svec_sort(). --- diff --git a/vswitchd/bridge.c b/vswitchd/bridge.c index eed105c2..dc51e20e 100644 --- a/vswitchd/bridge.c +++ b/vswitchd/bridge.c @@ -1844,6 +1844,7 @@ port_reconfigure(struct port *port) for (i = 0; i < port->n_ifaces; i++) { svec_add(&old_ifaces, port->ifaces[i]->name); } + svec_sort(&old_ifaces); if (bonded) { cfg_get_all_keys(&new_ifaces, "bonding.%s.slave", port->name); if (!new_ifaces.n) {