X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=lib%2Fdpif-netdev.c;h=c4cc6e98357f594124f7ba14199da3f7a3c58c5b;hb=bfb1f2d5cbb9ef82f2def2f41f5ff8a8f02b5bbc;hp=7d31a69bb71a3e9d0e23799b643ed459f9f1548c;hpb=659586efcf6f9539282da9447007897907c41112;p=openvswitch diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c index 7d31a69b..c4cc6e98 100644 --- a/lib/dpif-netdev.c +++ b/lib/dpif-netdev.c @@ -23,6 +23,7 @@ #include #include #include +#include #include #include #include @@ -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;