proc-net-compat: Stub out on non-Linux.
[openvswitch] / lib / dpif-netdev.c
index 7d31a69bb71a3e9d0e23799b643ed459f9f1548c..c4cc6e98357f594124f7ba14199da3f7a3c58c5b 100644 (file)
@@ -23,6 +23,7 @@
 #include <fcntl.h>
 #include <inttypes.h>
 #include <netinet/in.h>
+#include <sys/socket.h>
 #include <net/if.h>
 #include <stdlib.h>
 #include <string.h>
@@ -1280,7 +1281,8 @@ dp_netdev_output_control(struct dp_netdev *dp, const struct ofpbuf *packet,
     }
 
     msg_size = sizeof *header + packet->size;
-    msg = ofpbuf_new(msg_size);
+    msg = ofpbuf_new(msg_size + DPIF_RECV_MSG_PADDING);
+    ofpbuf_reserve(msg, DPIF_RECV_MSG_PADDING);
     header = ofpbuf_put_uninit(msg, sizeof *header);
     header->type = queue_no;
     header->length = msg_size;