aboutsummaryrefslogtreecommitdiffstats
path: root/net/sctp/ipv6.c
diff options
context:
space:
mode:
authorVlad Yasevich <vladislav.yasevich@hp.com>2006-06-18 01:55:35 -0400
committerDavid S. Miller <davem@davemloft.net>2006-06-18 01:55:35 -0400
commit5636bef7324f49e36f05ec8a5f6284e11b1bcca4 (patch)
treeb5e9e42560ba86ffbbd63a582df87844996b6d03 /net/sctp/ipv6.c
parent402d68c43326d2f0e7e2e9a9013cd4c098d9b87c (diff)
[SCTP]: Reject sctp packets with broadcast addresses.
Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com> Signed-off-by: Sridhar Samudrala <sri@us.ibm.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, 4 insertions, 2 deletions
diff --git a/net/sctp/ipv6.c b/net/sctp/ipv6.c
index c20d282fac06..8ef08070c8b6 100644
--- a/net/sctp/ipv6.c
+++ b/net/sctp/ipv6.c
@@ -523,7 +523,9 @@ static int sctp_v6_available(union sctp_addr *addr, struct sctp_sock *sp)
523 * Return 0 - If the address is a non-unicast or an illegal address. 523 * Return 0 - If the address is a non-unicast or an illegal address.
524 * Return 1 - If the address is a unicast. 524 * Return 1 - If the address is a unicast.
525 */ 525 */
526static int sctp_v6_addr_valid(union sctp_addr *addr, struct sctp_sock *sp) 526static int sctp_v6_addr_valid(union sctp_addr *addr,
527 struct sctp_sock *sp,
528 const struct sk_buff *skb)
527{ 529{
528 int ret = ipv6_addr_type(&addr->v6.sin6_addr); 530 int ret = ipv6_addr_type(&addr->v6.sin6_addr);
529 531
@@ -537,7 +539,7 @@ static int sctp_v6_addr_valid(union sctp_addr *addr, struct sctp_sock *sp)
537 if (sp && ipv6_only_sock(sctp_opt2sk(sp))) 539 if (sp && ipv6_only_sock(sctp_opt2sk(sp)))
538 return 0; 540 return 0;
539 sctp_v6_map_v4(addr); 541 sctp_v6_map_v4(addr);
540 return sctp_get_af_specific(AF_INET)->addr_valid(addr, sp); 542 return sctp_get_af_specific(AF_INET)->addr_valid(addr, sp, skb);
541 } 543 }
542 544
543 /* Is this a non-unicast address */ 545 /* Is this a non-unicast address */