diff options
author | Jiri Benc <jbenc@redhat.com> | 2015-11-25 11:31:11 -0200 |
---|---|---|
committer | Ben Pfaff <blp@ovn.org> | 2015-11-30 10:31:35 -0800 |
commit | ffe4c74f9331114287754d5b0ca8eec219927acc (patch) | |
tree | e7f161b5d6f9b34e8b3a39ae92f51951ca08768e /ofproto/ofproto-dpif-rid.c | |
parent | 53902038abe62c45ff46d7de9dcec30c3d1d861e (diff) | |
download | openvswitch-ffe4c74f9331114287754d5b0ca8eec219927acc.tar.gz |
tunneling: extend flow_tnl with ipv6 addresses
Note that because there's been no prerequisite on the outer protocol,
we cannot add it now. Instead, treat the ipv4 and ipv6 dst fields in the way
that either both are null, or at most one of them is non-null.
[cascardo: abstract testing either dst with flow_tnl_dst_is_set]
cascardo: using IPv4-mapped address is an exercise for the future, since this
would require special handling of MFF_TUN_SRC and MFF_TUN_DST and OpenFlow
messages.
Signed-off-by: Jiri Benc <jbenc@redhat.com>
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@redhat.com>
Co-authored-by: Thadeu Lima de Souza Cascardo <cascardo@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
Diffstat (limited to 'ofproto/ofproto-dpif-rid.c')
-rw-r--r-- | ofproto/ofproto-dpif-rid.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ofproto/ofproto-dpif-rid.c b/ofproto/ofproto-dpif-rid.c index 3e9912874..30c1c942d 100644 --- a/ofproto/ofproto-dpif-rid.c +++ b/ofproto/ofproto-dpif-rid.c @@ -130,7 +130,7 @@ recirc_metadata_hash(const struct recirc_state *state) hash = hash_pointer(state->ofproto, 0); hash = hash_int(state->table_id, hash); - if (state->metadata.tunnel->ip_dst) { + if (flow_tnl_dst_is_set(state->metadata.tunnel)) { /* We may leave remainder bytes unhashed, but that is unlikely as * the tunnel is not in the datapath format. */ hash = hash_words64((const uint64_t *) state->metadata.tunnel, @@ -289,6 +289,7 @@ recirc_alloc_id(struct ofproto_dpif *ofproto) { struct flow_tnl tunnel; tunnel.ip_dst = htonl(0); + tunnel.ipv6_dst = in6addr_any; struct recirc_state state = { .table_id = TBL_INTERNAL, .ofproto = ofproto, |