projects
/
openvswitch
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ovs-vsctl: Add --columns options to "list" command.
[openvswitch]
/
lib
/
ofp-util.c
diff --git
a/lib/ofp-util.c
b/lib/ofp-util.c
index 59a5fc43f29be903064327cafe272e921da6d04e..1125b83fc17752de195b11ee6479136da958fb45 100644
(file)
--- a/
lib/ofp-util.c
+++ b/
lib/ofp-util.c
@@
-126,7
+126,7
@@
ofputil_cls_rule_from_match(const struct ofp_match *match,
wc->wildcards = ofpfw & WC_INVARIANTS;
/* Wildcard fields that aren't defined by ofp_match or tun_id. */
wc->wildcards = ofpfw & WC_INVARIANTS;
/* Wildcard fields that aren't defined by ofp_match or tun_id. */
- wc->wildcards |= (FWW_ARP_SHA | FWW_ARP_THA);
+ wc->wildcards |= (FWW_ARP_SHA | FWW_ARP_THA
| FWW_ND_TARGET
);
if (ofpfw & OFPFW_NW_TOS) {
wc->wildcards |= FWW_NW_TOS;
if (ofpfw & OFPFW_NW_TOS) {
wc->wildcards |= FWW_NW_TOS;
@@
-868,6
+868,12
@@
is_nxm_required(const struct cls_rule *rule, bool cookie_support,
return true;
}
return true;
}
+ /* Only NXM supports matching IPv6 traffic. */
+ if (!(wc->wildcards & FWW_DL_TYPE)
+ && (rule->flow.dl_type == htons(ETH_TYPE_IPV6))) {
+ return true;
+ }
+
/* Only NXM supports matching registers. */
if (!regs_fully_wildcarded(wc)) {
return true;
/* Only NXM supports matching registers. */
if (!regs_fully_wildcarded(wc)) {
return true;
@@
-2041,6
+2047,9
@@
normalize_match(struct ofp_match *m)
m->nw_dst &= ofputil_wcbits_to_netmask(wc >> OFPFW_NW_DST_SHIFT);
}
m->tp_src = m->tp_dst = m->nw_tos = 0;
m->nw_dst &= ofputil_wcbits_to_netmask(wc >> OFPFW_NW_DST_SHIFT);
}
m->tp_src = m->tp_dst = m->nw_tos = 0;
+ } else if (m->dl_type == htons(ETH_TYPE_IPV6)) {
+ /* Don't normalize IPv6 traffic, since OpenFlow doesn't have a
+ * way to express it. */
} else {
/* Network and transport layer fields will always be extracted as
* zeros, so we can do an exact-match on those values. */
} else {
/* Network and transport layer fields will always be extracted as
* zeros, so we can do an exact-match on those values. */