bfd: Improve log message.
authorBen Pfaff <blp@nicira.com>
Mon, 30 Sep 2013 21:47:41 +0000 (14:47 -0700)
committerBen Pfaff <blp@nicira.com>
Sat, 2 Nov 2013 15:13:35 +0000 (08:13 -0700)
Signed-off-by: Ben Pfaff <blp@nicira.com>
lib/bfd.c

index 115053b..740f4fc 100644 (file)
--- a/lib/bfd.c
+++ b/lib/bfd.c
@@ -639,8 +639,10 @@ bfd_process_packet(struct bfd *bfd, const struct flow *flow,
 
     msg = ofpbuf_at(p, (uint8_t *)p->l7 - (uint8_t *)p->data, BFD_PACKET_LEN);
     if (!msg) {
-        VLOG_INFO_RL(&rl, "%s: Received unparseable BFD control message.",
-                     bfd->name);
+        VLOG_INFO_RL(&rl, "%s: Received too-short BFD control message (only "
+                     "%td bytes long, at least %d required).",
+                     bfd->name, (uint8_t *) ofpbuf_tail(p) - (uint8_t *) p->l7,
+                     BFD_PACKET_LEN);
         goto out;
     }