X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=lib%2Flearning-switch.c;h=ca970540e0ff8e38f97e4e434b2a11cfaf4e2774;hb=afabe15a7aea7a588ea1711ce00bb524fe1733c2;hp=cbd24cbfb7892b0ce5efa2729168483701388ebe;hpb=d1e2cf211901ec64dc2f91ab5379a0ac2654ae62;p=openvswitch diff --git a/lib/learning-switch.c b/lib/learning-switch.c index cbd24cbf..ca970540 100644 --- a/lib/learning-switch.c +++ b/lib/learning-switch.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2009, 2010 Nicira Networks. + * Copyright (c) 2008, 2009, 2010, 2011 Nicira Networks. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -238,8 +238,6 @@ lswitch_process_packet(struct lswitch *sw, struct rconn *rconn, case OFPUTIL_OFPST_PORT_REPLY: case OFPUTIL_OFPST_TABLE_REPLY: case OFPUTIL_OFPST_AGGREGATE_REPLY: - case OFPUTIL_NXT_STATUS_REQUEST: - case OFPUTIL_NXT_STATUS_REPLY: case OFPUTIL_NXT_TUN_ID_FROM_COOKIE: case OFPUTIL_NXT_ROLE_REQUEST: case OFPUTIL_NXT_ROLE_REPLY: @@ -400,8 +398,7 @@ process_packet_in(struct lswitch *sw, struct rconn *rconn, /* Extract flow data from 'opi' into 'flow'. */ pkt_ofs = offsetof(struct ofp_packet_in, data); pkt_len = ntohs(opi->header.length) - pkt_ofs; - pkt.data = (void *) opi->data; - pkt.size = pkt_len; + ofpbuf_use_const(&pkt, opi->data, pkt_len); flow_extract(&pkt, 0, in_port, &flow); /* Choose output port. */