diff options
author | David S. Miller <davem@davemloft.net> | 2008-06-10 05:22:26 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-06-10 05:22:26 -0400 |
commit | 65b53e4cc90e59936733b3b95b9451d2ca47528d (patch) | |
tree | 29932718192962671c48c3fd1ea017a6112459e8 /net/sctp/protocol.c | |
parent | 788c0a53164c05c5ccdb1472474372b72ba74644 (diff) | |
parent | 2e761e0532a784816e7e822dbaaece8c5d4be14d (diff) |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
drivers/net/tg3.c
drivers/net/wireless/rt2x00/rt2x00dev.c
net/mac80211/ieee80211_i.h
Diffstat (limited to 'net/sctp/protocol.c')
-rw-r--r-- | net/sctp/protocol.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/net/sctp/protocol.c b/net/sctp/protocol.c index b8bd9e014498..d6af466091d2 100644 --- a/net/sctp/protocol.c +++ b/net/sctp/protocol.c | |||
@@ -473,11 +473,11 @@ static struct dst_entry *sctp_v4_get_dst(struct sctp_association *asoc, | |||
473 | /* Walk through the bind address list and look for a bind | 473 | /* Walk through the bind address list and look for a bind |
474 | * address that matches the source address of the returned dst. | 474 | * address that matches the source address of the returned dst. |
475 | */ | 475 | */ |
476 | sctp_v4_dst_saddr(&dst_saddr, dst, htons(bp->port)); | ||
476 | rcu_read_lock(); | 477 | rcu_read_lock(); |
477 | list_for_each_entry_rcu(laddr, &bp->address_list, list) { | 478 | list_for_each_entry_rcu(laddr, &bp->address_list, list) { |
478 | if (!laddr->valid || (laddr->state != SCTP_ADDR_SRC)) | 479 | if (!laddr->valid || (laddr->state != SCTP_ADDR_SRC)) |
479 | continue; | 480 | continue; |
480 | sctp_v4_dst_saddr(&dst_saddr, dst, htons(bp->port)); | ||
481 | if (sctp_v4_cmp_addr(&dst_saddr, &laddr->a)) | 481 | if (sctp_v4_cmp_addr(&dst_saddr, &laddr->a)) |
482 | goto out_unlock; | 482 | goto out_unlock; |
483 | } | 483 | } |
@@ -522,7 +522,8 @@ out: | |||
522 | /* For v4, the source address is cached in the route entry(dst). So no need | 522 | /* For v4, the source address is cached in the route entry(dst). So no need |
523 | * to cache it separately and hence this is an empty routine. | 523 | * to cache it separately and hence this is an empty routine. |
524 | */ | 524 | */ |
525 | static void sctp_v4_get_saddr(struct sctp_association *asoc, | 525 | static void sctp_v4_get_saddr(struct sctp_sock *sk, |
526 | struct sctp_association *asoc, | ||
526 | struct dst_entry *dst, | 527 | struct dst_entry *dst, |
527 | union sctp_addr *daddr, | 528 | union sctp_addr *daddr, |
528 | union sctp_addr *saddr) | 529 | union sctp_addr *saddr) |
@@ -619,6 +620,11 @@ static void sctp_v4_seq_dump_addr(struct seq_file *seq, union sctp_addr *addr) | |||
619 | seq_printf(seq, "%d.%d.%d.%d ", NIPQUAD(addr->v4.sin_addr)); | 620 | seq_printf(seq, "%d.%d.%d.%d ", NIPQUAD(addr->v4.sin_addr)); |
620 | } | 621 | } |
621 | 622 | ||
623 | static void sctp_v4_ecn_capable(struct sock *sk) | ||
624 | { | ||
625 | INET_ECN_xmit(sk); | ||
626 | } | ||
627 | |||
622 | /* Event handler for inet address addition/deletion events. | 628 | /* Event handler for inet address addition/deletion events. |
623 | * The sctp_local_addr_list needs to be protocted by a spin lock since | 629 | * The sctp_local_addr_list needs to be protocted by a spin lock since |
624 | * multiple notifiers (say IPv4 and IPv6) may be running at the same | 630 | * multiple notifiers (say IPv4 and IPv6) may be running at the same |
@@ -937,6 +943,7 @@ static struct sctp_af sctp_af_inet = { | |||
937 | .skb_iif = sctp_v4_skb_iif, | 943 | .skb_iif = sctp_v4_skb_iif, |
938 | .is_ce = sctp_v4_is_ce, | 944 | .is_ce = sctp_v4_is_ce, |
939 | .seq_dump_addr = sctp_v4_seq_dump_addr, | 945 | .seq_dump_addr = sctp_v4_seq_dump_addr, |
946 | .ecn_capable = sctp_v4_ecn_capable, | ||
940 | .net_header_len = sizeof(struct iphdr), | 947 | .net_header_len = sizeof(struct iphdr), |
941 | .sockaddr_len = sizeof(struct sockaddr_in), | 948 | .sockaddr_len = sizeof(struct sockaddr_in), |
942 | #ifdef CONFIG_COMPAT | 949 | #ifdef CONFIG_COMPAT |