- ofm->match.wildcards = htonl(0);
- ofm->match.in_port = htons(flow->in_port == ODPP_LOCAL ? OFPP_LOCAL
- : flow->in_port);
- memcpy(ofm->match.dl_src, flow->dl_src, sizeof ofm->match.dl_src);
- memcpy(ofm->match.dl_dst, flow->dl_dst, sizeof ofm->match.dl_dst);
- ofm->match.dl_vlan = flow->dl_vlan;
- ofm->match.dl_vlan_pcp = flow->dl_vlan_pcp;
- ofm->match.dl_type = flow->dl_type;
- ofm->match.nw_src = flow->nw_src;
- ofm->match.nw_dst = flow->nw_dst;
- ofm->match.nw_proto = flow->nw_proto;
- ofm->match.nw_tos = flow->nw_tos;
- ofm->match.tp_src = flow->tp_src;
- ofm->match.tp_dst = flow->tp_dst;
+ ofm->priority = htons(MIN(rule->priority, UINT16_MAX));
+ ofputil_cls_rule_to_match(rule, NXFF_OPENFLOW10, &ofm->match);