Commit d92ab135 authored by Jarno Rajahalme's avatar Jarno Rajahalme Committed by Jesse Gross

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: default avatarJarno Rajahalme <jrajahalme@nicira.com>
Acked-by: default avatarPravin B Shelar <pshelar@nicira.com>
Signed-off-by: default avatarJesse Gross <jesse@nicira.com>
parent 63e7959c
...@@ -1059,11 +1059,11 @@ int ovs_nla_put_flow(const struct sw_flow_key *swkey, ...@@ -1059,11 +1059,11 @@ int ovs_nla_put_flow(const struct sw_flow_key *swkey,
goto nla_put_failure; goto nla_put_failure;
sctp_key = nla_data(nla); sctp_key = nla_data(nla);
if (swkey->eth.type == htons(ETH_P_IP)) { if (swkey->eth.type == htons(ETH_P_IP)) {
sctp_key->sctp_src = swkey->ipv4.tp.src; sctp_key->sctp_src = output->ipv4.tp.src;
sctp_key->sctp_dst = swkey->ipv4.tp.dst; sctp_key->sctp_dst = output->ipv4.tp.dst;
} else if (swkey->eth.type == htons(ETH_P_IPV6)) { } else if (swkey->eth.type == htons(ETH_P_IPV6)) {
sctp_key->sctp_src = swkey->ipv6.tp.src; sctp_key->sctp_src = output->ipv6.tp.src;
sctp_key->sctp_dst = swkey->ipv6.tp.dst; sctp_key->sctp_dst = output->ipv6.tp.dst;
} }
} else if (swkey->eth.type == htons(ETH_P_IP) && } else if (swkey->eth.type == htons(ETH_P_IP) &&
swkey->ip.proto == IPPROTO_ICMP) { swkey->ip.proto == IPPROTO_ICMP) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment