X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=lib%2Fflow.c;h=e1ea75e5159677bba60f262a4d7d97f66d26f365;hb=cf3b7538666cd1efa314ce4944e4efdf3dd81d99;hp=60b667ca55eecf8532ae040d55bda4b9347fb04c;hpb=6b8c377a6e25b18da473c3a24dfad8ec9e01ad7f;p=sliver-openvswitch.git diff --git a/lib/flow.c b/lib/flow.c index 60b667ca5..e1ea75e51 100644 --- a/lib/flow.c +++ b/lib/flow.c @@ -371,10 +371,7 @@ flow_extract(struct ofpbuf *packet, const struct pkt_metadata *md, flow->pkt_mark = md->pkt_mark; } - packet->l2 = ofpbuf_data(&b); - ofpbuf_set_l2_5(packet, NULL); - ofpbuf_set_l3(packet, NULL); - ofpbuf_set_l4(packet, NULL); + ofpbuf_set_frame(packet, ofpbuf_data(packet)); if (ofpbuf_size(&b) < sizeof *eth) { return; @@ -1330,7 +1327,7 @@ flow_compose(struct ofpbuf *b, const struct flow *flow) /* eth_compose() sets l3 pointer and makes sure it is 32-bit aligned. */ eth_compose(b, flow->dl_dst, flow->dl_src, ntohs(flow->dl_type), 0); if (flow->dl_type == htons(FLOW_DL_TYPE_NONE)) { - struct eth_header *eth = b->l2; + struct eth_header *eth = ofpbuf_l2(b); eth->eth_type = htons(ofpbuf_size(b)); return; }