summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorYi-Hung Wei <yihung.wei@gmail.com>2017-05-15 10:04:59 -0700
committerBen Pfaff <blp@ovn.org>2017-05-31 14:54:10 -0700
commit89d7927bbb18e214ebf718e9d9772334ecefa87e (patch)
tree3f9d9f585715d86d4d789ae25ea516ced4dbf0c4 /lib
parent880b145831ad1f2b0af2d08c4ad435ca0b6c98ad (diff)
downloadopenvswitch-89d7927bbb18e214ebf718e9d9772334ecefa87e.tar.gz
ofp-util: Fix tun_metadata processing in packet-out
Pass tun_table to ofputil_handle_packet_out() to correctly decode tunnel metadata in packet-out messages. Signed-off-by: Yi-Hung Wei <yihung.wei@gmail.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/ofp-print.c2
-rw-r--r--lib/ofp-util.c3
2 files changed, 3 insertions, 2 deletions
diff --git a/lib/ofp-print.c b/lib/ofp-print.c
index 98cbf9c4b..6d656b0e9 100644
--- a/lib/ofp-print.c
+++ b/lib/ofp-print.c
@@ -240,7 +240,7 @@ ofp_print_packet_out(struct ds *string, const struct ofp_header *oh,
enum ofperr error;
ofpbuf_init(&ofpacts, 64);
- error = ofputil_decode_packet_out(&po, oh, &ofpacts);
+ error = ofputil_decode_packet_out(&po, oh, NULL, &ofpacts);
if (error) {
ofpbuf_uninit(&ofpacts);
ofp_print_error(string, error);
diff --git a/lib/ofp-util.c b/lib/ofp-util.c
index 62cc3228c..8f1c40227 100644
--- a/lib/ofp-util.c
+++ b/lib/ofp-util.c
@@ -4199,6 +4199,7 @@ ofputil_packet_in_private_destroy(struct ofputil_packet_in_private *pin)
enum ofperr
ofputil_decode_packet_out(struct ofputil_packet_out *po,
const struct ofp_header *oh,
+ const struct tun_table *tun_table,
struct ofpbuf *ofpacts)
{
struct ofpbuf b = ofpbuf_const_initializer(oh, ntohs(oh->length));
@@ -4211,7 +4212,7 @@ ofputil_decode_packet_out(struct ofputil_packet_out *po,
const struct ofp15_packet_out *opo = ofpbuf_pull(&b, sizeof *opo);
po->buffer_id = ntohl(opo->buffer_id);
- error = oxm_pull_match_loose(&b, true, NULL, &po->flow_metadata);
+ error = oxm_pull_match_loose(&b, true, tun_table, &po->flow_metadata);
if (error) {
return error;
}