aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJarno Rajahalme <jrajahalme@nicira.com>2014-03-27 15:47:11 -0400
committerJesse Gross <jesse@nicira.com>2014-05-16 16:40:29 -0400
commitd92ab13558599cf73bbc269ce257fe16575d327a (patch)
treeb26d3cbd3a63dfa47a6c8e8febbc2cf81c40d849
parent63e7959c4b9bd6f791061c460a22d9ee32ae2240 (diff)
openvswitch: Fix output of SCTP mask.
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@nicira.com> Acked-by: Pravin B Shelar <pshelar@nicira.com> Signed-off-by: Jesse Gross <jesse@nicira.com>
-rw-r--r--net/openvswitch/flow_netlink.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/net/openvswitch/flow_netlink.c b/net/openvswitch/flow_netlink.c
index 84caa99b3769..32a725cfeb0e 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,
1059 goto nla_put_failure; 1059 goto nla_put_failure;
1060 sctp_key = nla_data(nla); 1060 sctp_key = nla_data(nla);
1061 if (swkey->eth.type == htons(ETH_P_IP)) { 1061 if (swkey->eth.type == htons(ETH_P_IP)) {
1062 sctp_key->sctp_src = swkey->ipv4.tp.src; 1062 sctp_key->sctp_src = output->ipv4.tp.src;
1063 sctp_key->sctp_dst = swkey->ipv4.tp.dst; 1063 sctp_key->sctp_dst = output->ipv4.tp.dst;
1064 } else if (swkey->eth.type == htons(ETH_P_IPV6)) { 1064 } else if (swkey->eth.type == htons(ETH_P_IPV6)) {
1065 sctp_key->sctp_src = swkey->ipv6.tp.src; 1065 sctp_key->sctp_src = output->ipv6.tp.src;
1066 sctp_key->sctp_dst = swkey->ipv6.tp.dst; 1066 sctp_key->sctp_dst = output->ipv6.tp.dst;
1067 } 1067 }
1068 } else if (swkey->eth.type == htons(ETH_P_IP) && 1068 } else if (swkey->eth.type == htons(ETH_P_IP) &&
1069 swkey->ip.proto == IPPROTO_ICMP) { 1069 swkey->ip.proto == IPPROTO_ICMP) {