Commit 741880e1 authored by Xin Long's avatar Xin Long Committed by David S. Miller

sctp: not traverse asoc trans list if non-ipv6 trans exists for ipv6_flowlabel

When users set params.spp_address and get a trans, ipv6_flowlabel flag
should be applied into this trans. But even if this one is not an ipv6
trans, it should not go to apply it into all other transes of the asoc
but simply ignore it.

Fixes: 0b0dce7a ("sctp: add spp_ipv6_flowlabel and spp_dscp for sctp_paddrparams")
Signed-off-by: default avatarXin Long <lucien.xin@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent af8a2b8b
...@@ -2658,10 +2658,12 @@ static int sctp_apply_peer_addr_params(struct sctp_paddrparams *params, ...@@ -2658,10 +2658,12 @@ static int sctp_apply_peer_addr_params(struct sctp_paddrparams *params,
} }
if (params->spp_flags & SPP_IPV6_FLOWLABEL) { if (params->spp_flags & SPP_IPV6_FLOWLABEL) {
if (trans && trans->ipaddr.sa.sa_family == AF_INET6) { if (trans) {
trans->flowlabel = params->spp_ipv6_flowlabel & if (trans->ipaddr.sa.sa_family == AF_INET6) {
SCTP_FLOWLABEL_VAL_MASK; trans->flowlabel = params->spp_ipv6_flowlabel &
trans->flowlabel |= SCTP_FLOWLABEL_SET_MASK; SCTP_FLOWLABEL_VAL_MASK;
trans->flowlabel |= SCTP_FLOWLABEL_SET_MASK;
}
} else if (asoc) { } else if (asoc) {
struct sctp_transport *t; struct sctp_transport *t;
......
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