Fix bug in vconn-tcp, vconn-ssl that prevented minimum-length OpenFlow packets from...
authorBen Pfaff <blp@nicira.com>
Fri, 4 Apr 2008 23:02:46 +0000 (16:02 -0700)
committerBen Pfaff <blp@nicira.com>
Fri, 4 Apr 2008 23:20:54 +0000 (16:20 -0700)
lib/vconn-ssl.c
lib/vconn-tcp.c

index 30d8caf..2bdcfb1 100644 (file)
@@ -361,6 +361,11 @@ again:
             return EPROTO;
         }
         want_bytes = length - rx->size;
+        if (!want_bytes) {
+            *bufferp = rx;
+            sslv->rxbuf = NULL;
+            return 0;
+        }
     }
     buffer_reserve_tailroom(rx, want_bytes);
 
index 1fe5919..5f468ae 100644 (file)
@@ -191,6 +191,11 @@ again:
             return EPROTO;
         }
         want_bytes = length - rx->size;
+        if (!want_bytes) {
+            *bufferp = rx;
+            tcp->rxbuf = NULL;
+            return 0;
+        }
     }
     buffer_reserve_tailroom(rx, want_bytes);