X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=lib%2Flearning-switch.c;h=7a60f3c32adb92c5fe9fa0f044f66cc6629d8545;hb=4cceacb94cfc1d75a961d3d746d2ae369c397ae5;hp=235e9d442d6a179aa9cc115f0e502e1784e1cee8;hpb=de0f3156a0ad6cc86b042d19ec8faf3c3a282ed5;p=openvswitch diff --git a/lib/learning-switch.c b/lib/learning-switch.c index 235e9d44..7a60f3c3 100644 --- a/lib/learning-switch.c +++ b/lib/learning-switch.c @@ -535,7 +535,8 @@ process_packet_in(struct lswitch *sw, const struct ofp_header *oh) /* Extract flow data from 'opi' into 'flow'. */ ofpbuf_use_const(&pkt, pi.packet, pi.packet_len); - flow_extract(&pkt, 0, pi.fmd.tun_id, pi.fmd.in_port, &flow); + flow_extract(&pkt, 0, NULL, pi.fmd.in_port, &flow); + flow.tunnel.tun_id = pi.fmd.tun_id; /* Choose output port. */ out_port = lswitch_choose_destination(sw, &flow); @@ -575,8 +576,9 @@ process_packet_in(struct lswitch *sw, const struct ofp_header *oh) /* The output port is known, or we always flood everything, so add a * new flow. */ memset(&fm, 0, sizeof fm); - cls_rule_init(&flow, &sw->wc, 0, &fm.cr); - ofputil_normalize_rule_quiet(&fm.cr); + match_init(&fm.match, &flow, &sw->wc); + ofputil_normalize_match_quiet(&fm.match); + fm.priority = 0; fm.table_id = 0xff; fm.command = OFPFC_ADD; fm.idle_timeout = sw->max_idle;