netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andy Zhou <azhou@nicira.com>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, Andy Zhou <azhou@nicira.com>
Subject: [datapath minor fixes 3/3] datapath: serializing GENEVE options based on flow key's tun_flags
Date: Wed,  1 Oct 2014 00:55:48 -0700	[thread overview]
Message-ID: <1412150148-9991-4-git-send-email-azhou@nicira.com> (raw)
In-Reply-To: <1412150148-9991-1-git-send-email-azhou@nicira.com>

TUNNEL_OPTIONS_PRESENT should always be checked against the tun_flgs
bits in a flow key, for both flow and mask serialization.

Signed-off-by: Andy Zhou <azhou@nicira.com>
---
 datapath/flow_netlink.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/datapath/flow_netlink.c b/datapath/flow_netlink.c
index a3f34f1..35feedc 100644
--- a/datapath/flow_netlink.c
+++ b/datapath/flow_netlink.c
@@ -1122,7 +1122,7 @@ int ovs_nla_put_flow(const struct sw_flow_key *swkey,
 	if ((swkey->tun_key.ipv4_dst || is_mask)) {
 		const struct geneve_opt *opts = NULL;
 
-		if (output->tun_key.tun_flags & TUNNEL_OPTIONS_PRESENT)
+		if (swkey->tun_key.tun_flags & TUNNEL_OPTIONS_PRESENT)
 			opts = GENEVE_OPTS(output, swkey->tun_opts_len);
 
 		if (ipv4_tun_to_nlattr(skb, &output->tun_key, opts,
-- 
1.9.1

  parent reply	other threads:[~2014-10-01  7:54 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-01  7:55 [datapath minor fixes 0/3] datapath minor fixes Andy Zhou
2014-10-01  7:55 ` [datapath minor fixes 1/3] datapath: avoid hard code OVS_VPORT_TYPE_GENEVE Andy Zhou
2014-10-01  7:55 ` [datapath minor fixes 2/3] datapath: avoid double free routing entry in vxlan_port xmit Andy Zhou
2014-10-01  7:55 ` Andy Zhou [this message]
2014-10-01  7:59 ` [datapath minor fixes 0/3] datapath minor fixes Andy Zhou

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1412150148-9991-4-git-send-email-azhou@nicira.com \
    --to=azhou@nicira.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).