diff options
| author | Justin Pettit <jpettit@nicira.com> | 2010-12-29 19:03:46 -0800 |
|---|---|---|
| committer | Justin Pettit <jpettit@nicira.com> | 2011-02-02 12:53:26 -0800 |
| commit | d31f1109f10e5ffb9bf266306b913ebf23781666 (patch) | |
| tree | ddd80cc2348874fdea55a4e88e0990f821fb5e03 /lib/ofp-util.c | |
| parent | bad68a9965215511b305c59d7f1830344ec2241f (diff) | |
| download | openvswitch-d31f1109f10e5ffb9bf266306b913ebf23781666.tar.gz | |
nicira-ext: Support matching IPv6 traffic.
Provides ability to match over IPv6 traffic in the same manner as IPv4.
Currently, the matching fields include:
- IPv6 source and destination addresses (ipv6_src and ipv6_dst)
- Traffic Class (nw_tos)
- Next Header (nw_proto)
- ICMPv6 Type and Code (icmp_type and icmp_code)
- TCP and UDP Ports over IPv6 (tp_src and tp_dst)
When defining IPv6 rules, the Nicira Extensible Match (NXM) extension to
OVS must be used.
Signed-off-by: Justin Pettit <jpettit@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
Diffstat (limited to 'lib/ofp-util.c')
| -rw-r--r-- | lib/ofp-util.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/ofp-util.c b/lib/ofp-util.c index 59a5fc43f..4d89e0ae4 100644 --- a/lib/ofp-util.c +++ b/lib/ofp-util.c @@ -868,6 +868,12 @@ is_nxm_required(const struct cls_rule *rule, bool cookie_support, 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; @@ -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; + } 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. */ |
