diff options
-rw-r--r-- | include/net/sctp/structs.h | 1 | ||||
-rw-r--r-- | net/sctp/ipv6.c | 6 | ||||
-rw-r--r-- | net/sctp/output.c | 2 | ||||
-rw-r--r-- | net/sctp/protocol.c | 6 |
4 files changed, 14 insertions, 1 deletions
diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h index 714dc43c0345..7f25195f9855 100644 --- a/include/net/sctp/structs.h +++ b/include/net/sctp/structs.h | |||
@@ -588,6 +588,7 @@ struct sctp_af { | |||
588 | int (*is_ce) (const struct sk_buff *sk); | 588 | int (*is_ce) (const struct sk_buff *sk); |
589 | void (*seq_dump_addr)(struct seq_file *seq, | 589 | void (*seq_dump_addr)(struct seq_file *seq, |
590 | union sctp_addr *addr); | 590 | union sctp_addr *addr); |
591 | void (*ecn_capable)(struct sock *sk); | ||
591 | __u16 net_header_len; | 592 | __u16 net_header_len; |
592 | int sockaddr_len; | 593 | int sockaddr_len; |
593 | sa_family_t sa_family; | 594 | sa_family_t sa_family; |
diff --git a/net/sctp/ipv6.c b/net/sctp/ipv6.c index e4aac3266fcd..a2f4d4d51593 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) | |||
727 | seq_printf(seq, NIP6_FMT " ", NIP6(addr->v6.sin6_addr)); | 727 | seq_printf(seq, NIP6_FMT " ", NIP6(addr->v6.sin6_addr)); |
728 | } | 728 | } |
729 | 729 | ||
730 | static void sctp_v6_ecn_capable(struct sock *sk) | ||
731 | { | ||
732 | inet6_sk(sk)->tclass |= INET_ECN_ECT_0; | ||
733 | } | ||
734 | |||
730 | /* Initialize a PF_INET6 socket msg_name. */ | 735 | /* Initialize a PF_INET6 socket msg_name. */ |
731 | static void sctp_inet6_msgname(char *msgname, int *addr_len) | 736 | static void sctp_inet6_msgname(char *msgname, int *addr_len) |
732 | { | 737 | { |
@@ -997,6 +1002,7 @@ static struct sctp_af sctp_af_inet6 = { | |||
997 | .skb_iif = sctp_v6_skb_iif, | 1002 | .skb_iif = sctp_v6_skb_iif, |
998 | .is_ce = sctp_v6_is_ce, | 1003 | .is_ce = sctp_v6_is_ce, |
999 | .seq_dump_addr = sctp_v6_seq_dump_addr, | 1004 | .seq_dump_addr = sctp_v6_seq_dump_addr, |
1005 | .ecn_capable = sctp_v6_ecn_capable, | ||
1000 | .net_header_len = sizeof(struct ipv6hdr), | 1006 | .net_header_len = sizeof(struct ipv6hdr), |
1001 | .sockaddr_len = sizeof(struct sockaddr_in6), | 1007 | .sockaddr_len = sizeof(struct sockaddr_in6), |
1002 | #ifdef CONFIG_COMPAT | 1008 | #ifdef CONFIG_COMPAT |
diff --git a/net/sctp/output.c b/net/sctp/output.c index cf4f9fb6819d..6d45bae93b46 100644 --- a/net/sctp/output.c +++ b/net/sctp/output.c | |||
@@ -548,7 +548,7 @@ int sctp_packet_transmit(struct sctp_packet *packet) | |||
548 | * Note: The works for IPv6 layer checks this bit too later | 548 | * Note: The works for IPv6 layer checks this bit too later |
549 | * in transmission. See IP6_ECN_flow_xmit(). | 549 | * in transmission. See IP6_ECN_flow_xmit(). |
550 | */ | 550 | */ |
551 | INET_ECN_xmit(nskb->sk); | 551 | (*tp->af_specific->ecn_capable)(nskb->sk); |
552 | 552 | ||
553 | /* Set up the IP options. */ | 553 | /* Set up the IP options. */ |
554 | /* BUG: not implemented | 554 | /* BUG: not implemented |
diff --git a/net/sctp/protocol.c b/net/sctp/protocol.c index 56bdaf7fc425..b435a193c5df 100644 --- a/net/sctp/protocol.c +++ b/net/sctp/protocol.c | |||
@@ -617,6 +617,11 @@ static void sctp_v4_seq_dump_addr(struct seq_file *seq, union sctp_addr *addr) | |||
617 | seq_printf(seq, "%d.%d.%d.%d ", NIPQUAD(addr->v4.sin_addr)); | 617 | seq_printf(seq, "%d.%d.%d.%d ", NIPQUAD(addr->v4.sin_addr)); |
618 | } | 618 | } |
619 | 619 | ||
620 | static void sctp_v4_ecn_capable(struct sock *sk) | ||
621 | { | ||
622 | INET_ECN_xmit(sk); | ||
623 | } | ||
624 | |||
620 | /* Event handler for inet address addition/deletion events. | 625 | /* Event handler for inet address addition/deletion events. |
621 | * The sctp_local_addr_list needs to be protocted by a spin lock since | 626 | * The sctp_local_addr_list needs to be protocted by a spin lock since |
622 | * multiple notifiers (say IPv4 and IPv6) may be running at the same | 627 | * multiple notifiers (say IPv4 and IPv6) may be running at the same |
@@ -935,6 +940,7 @@ static struct sctp_af sctp_af_inet = { | |||
935 | .skb_iif = sctp_v4_skb_iif, | 940 | .skb_iif = sctp_v4_skb_iif, |
936 | .is_ce = sctp_v4_is_ce, | 941 | .is_ce = sctp_v4_is_ce, |
937 | .seq_dump_addr = sctp_v4_seq_dump_addr, | 942 | .seq_dump_addr = sctp_v4_seq_dump_addr, |
943 | .ecn_capable = sctp_v4_ecn_capable, | ||
938 | .net_header_len = sizeof(struct iphdr), | 944 | .net_header_len = sizeof(struct iphdr), |
939 | .sockaddr_len = sizeof(struct sockaddr_in), | 945 | .sockaddr_len = sizeof(struct sockaddr_in), |
940 | #ifdef CONFIG_COMPAT | 946 | #ifdef CONFIG_COMPAT |