Only log unprocessed packets in the controller if debugging enabled.
[sliver-openvswitch.git] / controller / controller.c
index 387f8c7..3a29043 100644 (file)
@@ -347,7 +347,11 @@ process_packet(struct switch_ *sw, struct buffer *msg)
             process_packet_in(sw, opi);
         }
     } else {
-        ofp_print(stdout, msg->data, msg->size, 2); 
+        if (VLOG_IS_DBG_ENABLED()) {
+            char *p = ofp_to_string(msg->data, msg->size, 2);
+            VLOG_DBG("OpenFlow packet ignored: %s", p);
+            free(p);
+        }
     }
 }