diff --git oflib/oxm-match.c oflib/oxm-match.c index 0d4fc4e..dff7fc0 100644 --- oflib/oxm-match.c +++ oflib/oxm-match.c @@ -205,6 +205,10 @@ oxm_prereqs_ok(const struct oxm_field *field, const struct ofl_match *rule) /* Check for eth_type */ if (!field->dl_type[0]) return true; + else if (field->dl_type[0] == htons(0x8847)) + // quick-fix:ignore check for ethtpe when setting mpls label-id + // needs a cleaner solution which checks for a push-mpls action before the set + return true; else { HMAP_FOR_EACH_WITH_HASH (omt, struct ofl_match_tlv, hmap_node, hash_int(OXM_OF_ETH_TYPE, 0), &rule->match_fields) { @@ -348,9 +352,10 @@ parse_oxm_entry(struct ofl_match *match, const struct oxm_field *f, case OFI_OXM_OF_IPV4_DST_W: case OFI_OXM_OF_IPV4_SRC_W: case OFI_OXM_OF_ARP_SPA_W: - case OFI_OXM_OF_ARP_TPA_W: - ofl_structs_match_put32m(match, f->header, *((uint32_t*) value), *((uint32_t*) mask)); + case OFI_OXM_OF_ARP_TPA_W:{ + ofl_structs_match_put32m(match, f->header, *((uint32_t*) value), ~(*((uint32_t*) mask))); return 0; + } case OFI_OXM_OF_ARP_SHA: case OFI_OXM_OF_ARP_THA: ofl_structs_match_put_eth(match, f->header,(uint8_t* )value); diff --git secchan/port-watcher.c secchan/port-watcher.c index e7cbd12..eb9f1a0 100644 --- secchan/port-watcher.c +++ secchan/port-watcher.c @@ -405,7 +405,7 @@ port_watcher_periodic_cb(void *pw_) new_opp = *opp; set_bit(htonl(OFPPC_PORT_DOWN), ~flags & NETDEV_UP, &new_opp.config); - set_bit(htonl(OFPPS_LINK_DOWN), ~flags & NETDEV_CARRIER, + set_bit(htonl(OFPPS_LINK_DOWN), ~flags & NETDEV_UP, &new_opp.state); if (opp->config != new_opp.config || opp->state != new_opp.state) { struct ofp_port_status *ops;