projects
/
openvswitch
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1297ff4
)
vconn: Add assertions to vconn_send() to check consistency of outgoing messages.
author
Ben Pfaff
<blp@nicira.com>
Mon, 14 Jul 2008 20:53:28 +0000
(13:53 -0700)
committer
Ben Pfaff
<blp@nicira.com>
Fri, 18 Jul 2008 21:16:40 +0000
(14:16 -0700)
lib/vconn.c
patch
|
blob
|
history
diff --git
a/lib/vconn.c
b/lib/vconn.c
index f0615d4380688222d737020c84ddd0b9edb70943..db1cc4c526abaf2760a3649d236008de8319cb81 100644
(file)
--- a/
lib/vconn.c
+++ b/
lib/vconn.c
@@
-292,6
+292,8
@@
vconn_send(struct vconn *vconn, struct buffer *msg)
{
int retval = vconn_connect(vconn);
if (!retval) {
+ assert(msg->size >= sizeof(struct ofp_header));
+ assert(((struct ofp_header *) msg->data)->length == htons(msg->size));
if (!VLOG_IS_DBG_ENABLED()) {
retval = (vconn->class->send)(vconn, msg);
} else {