From 8f4da69c169f4a69d8563ebf8dbe8934748fb969 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Wed, 4 Jun 2008 10:54:01 -0700 Subject: [PATCH] Only log unprocessed packets in the controller if debugging enabled. Otherwise OFP_FLOW_EXPIRED messages tend to swamp the console after a while. --- controller/controller.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/controller/controller.c b/controller/controller.c index 387f8c74f..3a29043df 100644 --- a/controller/controller.c +++ b/controller/controller.c @@ -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); + } } } -- 2.43.0