From: Ben Pfaff Date: Wed, 1 Sep 2010 17:17:40 +0000 (-0700) Subject: ofproto: Get enough headroom in fail-open when connected to controller. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c9b5816cfd8fccc2abedd258d914882033bfcf0a;p=openvswitch ofproto: Get enough headroom in fail-open when connected to controller. Since commit 750638bb "ofproto: Avoid ofpbuf_clone() for OFPAT_CONTROLLER common case," send_packet_in() needs at least DPIF_RECV_MSG_PADDING bytes of headroom, which ofpbuf_clone() doesn't supply. This commit should fix that. This fixes an assertion failure in ofpbuf_prealloc_headroom() via send_packet_in(). Reported-by: Justin Pettit --- diff --git a/ofproto/ofproto.c b/ofproto/ofproto.c index adc52827..844083d8 100644 --- a/ofproto/ofproto.c +++ b/ofproto/ofproto.c @@ -4154,7 +4154,8 @@ handle_odp_miss_msg(struct ofproto *p, struct ofpbuf *packet) * * See the top-level comment in fail-open.c for more information. */ - send_packet_in(p, ofpbuf_clone(packet)); + send_packet_in(p, ofpbuf_clone_with_headroom(packet, + DPIF_RECV_MSG_PADDING)); } ofpbuf_pull(packet, sizeof *msg);