From: Jesse Gross <jesse-l0M0P4e3n4LQT0dZR+AlfA@public.gmane.org>
To: David Miller <davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
Cc: dev-yBygre7rU0TnMu66kgdUjQ@public.gmane.org,
netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: [PATCH net-next 10/12] openvswitch: Fix output of SCTP mask.
Date: Fri, 16 May 2014 14:07:37 -0700 [thread overview]
Message-ID: <1400274459-56304-11-git-send-email-jesse@nicira.com> (raw)
In-Reply-To: <1400274459-56304-1-git-send-email-jesse-l0M0P4e3n4LQT0dZR+AlfA@public.gmane.org>
From: Jarno Rajahalme <jrajahalme-l0M0P4e3n4LQT0dZR+AlfA@public.gmane.org>
The 'output' argument of the ovs_nla_put_flow() is the one from which
the bits are written to the netlink attributes. For SCTP we
accidentally used the bits from the 'swkey' instead. This caused the
mask attributes to include the bits from the actual flow key instead
of the mask.
Signed-off-by: Jarno Rajahalme <jrajahalme-l0M0P4e3n4LQT0dZR+AlfA@public.gmane.org>
Acked-by: Pravin B Shelar <pshelar-l0M0P4e3n4LQT0dZR+AlfA@public.gmane.org>
Signed-off-by: Jesse Gross <jesse-l0M0P4e3n4LQT0dZR+AlfA@public.gmane.org>
---
net/openvswitch/flow_netlink.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/net/openvswitch/flow_netlink.c b/net/openvswitch/flow_netlink.c
index 84caa99..32a725c 100644
--- a/net/openvswitch/flow_netlink.c
+++ b/net/openvswitch/flow_netlink.c
@@ -1059,11 +1059,11 @@ int ovs_nla_put_flow(const struct sw_flow_key *swkey,
goto nla_put_failure;
sctp_key = nla_data(nla);
if (swkey->eth.type == htons(ETH_P_IP)) {
- sctp_key->sctp_src = swkey->ipv4.tp.src;
- sctp_key->sctp_dst = swkey->ipv4.tp.dst;
+ sctp_key->sctp_src = output->ipv4.tp.src;
+ sctp_key->sctp_dst = output->ipv4.tp.dst;
} else if (swkey->eth.type == htons(ETH_P_IPV6)) {
- sctp_key->sctp_src = swkey->ipv6.tp.src;
- sctp_key->sctp_dst = swkey->ipv6.tp.dst;
+ sctp_key->sctp_src = output->ipv6.tp.src;
+ sctp_key->sctp_dst = output->ipv6.tp.dst;
}
} else if (swkey->eth.type == htons(ETH_P_IP) &&
swkey->ip.proto == IPPROTO_ICMP) {
--
1.9.1
next prev parent reply other threads:[~2014-05-16 21:07 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-16 21:07 [GIT net-next] Open vSwitch Jesse Gross
[not found] ` <1400274459-56304-1-git-send-email-jesse-l0M0P4e3n4LQT0dZR+AlfA@public.gmane.org>
2014-05-16 21:07 ` [PATCH net-next 01/12] openvswitch: use const in some local vars and casts Jesse Gross
2014-05-16 21:07 ` [PATCH net-next 02/12] openvswitch: avoid warnings in vport_from_priv Jesse Gross
2014-05-16 21:07 ` [PATCH net-next 03/12] openvswitch: avoid cast-qual warning in vport_priv Jesse Gross
2014-05-16 21:07 ` [PATCH net-next 04/12] openvswitch: Added (unsigned long long) cast in printf Jesse Gross
2014-05-16 21:07 ` [PATCH net-next 05/12] openvswitch: Use net_ratelimit in OVS_NLERR Jesse Gross
2014-05-16 21:07 ` [PATCH net-next 06/12] openvswitch: flow_netlink: Use pr_fmt to OVS_NLERR output Jesse Gross
2014-05-16 21:07 ` [PATCH net-next 07/12] openvswitch: Use ether_addr_copy Jesse Gross
2014-05-16 21:07 ` [PATCH net-next 08/12] openvswitch: Remove 5-tuple optimization Jesse Gross
2014-05-16 21:07 ` [PATCH net-next 09/12] openvswitch: Per NUMA node flow stats Jesse Gross
2014-05-16 21:07 ` Jesse Gross [this message]
2014-05-16 21:07 ` [PATCH net-next 11/12] openvswitch: Use TCP flags in the flow key for stats Jesse Gross
2014-05-16 21:07 ` [PATCH net-next 12/12] net/openvswitch: Use with RCU_INIT_POINTER(x, NULL) in vport-gre.c Jesse Gross
2014-05-16 21:22 ` [GIT net-next] Open vSwitch David Miller
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=1400274459-56304-11-git-send-email-jesse@nicira.com \
--to=jesse-l0m0p4e3n4lqt0dzr+alfa@public.gmane.org \
--cc=davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org \
--cc=dev-yBygre7rU0TnMu66kgdUjQ@public.gmane.org \
--cc=netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.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).