From: Jarno Rajahalme Date: Tue, 18 Mar 2014 23:32:45 +0000 (-0700) Subject: datapath: Fix output of SCTP mask. X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=b8bbcabf8f8b4c4d728bbf459ee0c4f319d3d187;hp=5deff5aa263a72a99141e95e50821f77bc687f15;p=sliver-openvswitch.git datapath: 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 Signed-off-by: Pravin B Shelar --- diff --git a/datapath/flow_netlink.c b/datapath/flow_netlink.c index 4c68a68b9..a70acfcaf 100644 --- a/datapath/flow_netlink.c +++ b/datapath/flow_netlink.c @@ -1060,11 +1060,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) {