void
ofputil_wildcard_from_ofpfw10(uint32_t ofpfw, struct flow_wildcards *wc)
{
- BUILD_ASSERT_DECL(FLOW_WC_SEQ == 23);
+ BUILD_ASSERT_DECL(FLOW_WC_SEQ == 24);
/* Initialize most of wc. */
flow_wildcards_init_catchall(wc);
if (eth_type_mpls(match->flow.dl_type)) {
if (!(wc & OFPFW11_MPLS_LABEL)) {
- match_set_mpls_label(match, ofmatch->mpls_label);
+ match_set_mpls_label(match, 0, ofmatch->mpls_label);
}
if (!(wc & OFPFW11_MPLS_TC)) {
- match_set_mpls_tc(match, ofmatch->mpls_tc);
+ match_set_mpls_tc(match, 0, ofmatch->mpls_tc);
}
}
ofmatch->tp_dst = match->flow.tp_dst;
}
- if (!(match->wc.masks.mpls_lse & htonl(MPLS_LABEL_MASK))) {
+ if (!(match->wc.masks.mpls_lse[0] & htonl(MPLS_LABEL_MASK))) {
wc |= OFPFW11_MPLS_LABEL;
} else {
- ofmatch->mpls_label = htonl(mpls_lse_to_label(match->flow.mpls_lse));
+ ofmatch->mpls_label = htonl(mpls_lse_to_label(
+ match->flow.mpls_lse[0]));
}
- if (!(match->wc.masks.mpls_lse & htonl(MPLS_TC_MASK))) {
+ if (!(match->wc.masks.mpls_lse[0] & htonl(MPLS_TC_MASK))) {
wc |= OFPFW11_MPLS_TC;
} else {
- ofmatch->mpls_tc = mpls_lse_to_tc(match->flow.mpls_lse);
+ ofmatch->mpls_tc = mpls_lse_to_tc(match->flow.mpls_lse[0]);
}
ofmatch->metadata = match->flow.metadata;
if (error) {
return error;
}
- fm->out_group = ntohl(ofm->out_group);
- if ((ofm->command == OFPFC_DELETE
- || ofm->command == OFPFC_DELETE_STRICT)
- && ofm->out_group != htonl(OFPG_ANY)) {
- return OFPERR_OFPFMFC_UNKNOWN;
- }
+ fm->out_group = (ofm->command == OFPFC_DELETE ||
+ ofm->command == OFPFC_DELETE_STRICT
+ ? ntohl(ofm->out_group)
+ : OFPG11_ANY);
raw_flags = ofm->flags;
} else {
uint16_t command;
wc.masks.nd_target = in6addr_any;
}
if (!(may_match & MAY_MPLS)) {
- wc.masks.mpls_lse = htonl(0);
+ memset(wc.masks.mpls_lse, 0, sizeof wc.masks.mpls_lse);
}
/* Log any changes. */