summaryrefslogtreecommitdiffstats
path: root/net/sctp/ipv6.c
diff options
context:
space:
mode:
authorVlad Yasevich <vladislav.yasevich@hp.com>2008-06-04 12:40:15 -0700
committerDavid S. Miller <davem@davemloft.net>2008-06-04 12:40:15 -0700
commitb9031d9d87b24e24cd32ea15b5f4220a1e8da909 (patch)
tree9033b439bfead85c115f9952fc060424788e8759 /net/sctp/ipv6.c
parent8b750ce54bd8ab5f75d519ee450e1b0c5226ebe9 (diff)
downloadop-kernel-dev-b9031d9d87b24e24cd32ea15b5f4220a1e8da909.zip
op-kernel-dev-b9031d9d87b24e24cd32ea15b5f4220a1e8da909.tar.gz
sctp: Fix ECN markings for IPv6
Commit e9df2e8fd8fbc95c57dbd1d33dada66c4627b44c ("[IPV6]: Use appropriate sock tclass setting for routing lookup.") also changed the way that ECN capable transports mark this capability in IPv6. As a result, SCTP was not marking ECN capablity because the traffic class was never set. This patch brings back the markings for IPv6 traffic. Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sctp/ipv6.c')
-rw-r--r--net/sctp/ipv6.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/net/sctp/ipv6.c b/net/sctp/ipv6.c
index e4aac32..a2f4d4d 100644
--- a/net/sctp/ipv6.c
+++ b/net/sctp/ipv6.c
@@ -727,6 +727,11 @@ static void sctp_v6_seq_dump_addr(struct seq_file *seq, union sctp_addr *addr)
seq_printf(seq, NIP6_FMT " ", NIP6(addr->v6.sin6_addr));
}
+static void sctp_v6_ecn_capable(struct sock *sk)
+{
+ inet6_sk(sk)->tclass |= INET_ECN_ECT_0;
+}
+
/* Initialize a PF_INET6 socket msg_name. */
static void sctp_inet6_msgname(char *msgname, int *addr_len)
{
@@ -997,6 +1002,7 @@ static struct sctp_af sctp_af_inet6 = {
.skb_iif = sctp_v6_skb_iif,
.is_ce = sctp_v6_is_ce,
.seq_dump_addr = sctp_v6_seq_dump_addr,
+ .ecn_capable = sctp_v6_ecn_capable,
.net_header_len = sizeof(struct ipv6hdr),
.sockaddr_len = sizeof(struct sockaddr_in6),
#ifdef CONFIG_COMPAT
OpenPOWER on IntegriCloud