in-band: Fix memory leak in in_band_destroy().
[openvswitch] / lib / dpif.c
index 315f11f9dd72c078f078d79deedb1a41a165d759..186f165c1745558883b4e8fed88874433e4cec04 100644 (file)
@@ -58,7 +58,7 @@ static struct shash dpif_classes = SHASH_INITIALIZER(&dpif_classes);
 static struct vlog_rate_limit dpmsg_rl = VLOG_RATE_LIMIT_INIT(600, 600);
 
 /* Not really much point in logging many dpif errors. */
-static struct vlog_rate_limit error_rl = VLOG_RATE_LIMIT_INIT(9999, 5);
+static struct vlog_rate_limit error_rl = VLOG_RATE_LIMIT_INIT(60, 5);
 
 static void log_operation(const struct dpif *, const char *operation,
                           int error);
@@ -724,6 +724,11 @@ dpif_flow_get(const struct dpif *dpif, struct odp_flow *flow)
     if (!error) {
         error = flow->stats.error;
     }
+    if (error) {
+        /* Make the results predictable on error. */
+        memset(&flow->stats, 0, sizeof flow->stats);
+        flow->n_actions = 0;
+    }
     if (should_log_flow_message(error)) {
         log_flow_operation(dpif, "flow_get", error, flow);
     }