summaryrefslogtreecommitdiff
path: root/net/sctp/protocol.c
diff options
context:
space:
mode:
authorNathan Scott <nathans@sgi.com>2006-06-20 08:56:23 +0400
committerNathan Scott <nathans@sgi.com>2006-06-20 08:56:23 +0400
commit98174e46974323e4941c72e46345f7277755e146 (patch)
treec4644c8f38a519cfb3929d1175fc7107eefe48b9 /net/sctp/protocol.c
parentd8ce75324135ea7100124c1fff4ec5090a350607 (diff)
parent25f42b6af09e34c3f92107b36b5aa6edc2fdba2f (diff)
downloadlinux-98174e46974323e4941c72e46345f7277755e146.tar.xz
Merge HEAD from ../linux-2.6
Diffstat (limited to 'net/sctp/protocol.c')
-rw-r--r--net/sctp/protocol.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/net/sctp/protocol.c b/net/sctp/protocol.c
index 2088aa992b7a..816c033d7886 100644
--- a/net/sctp/protocol.c
+++ b/net/sctp/protocol.c
@@ -365,12 +365,18 @@ static int sctp_v4_is_any(const union sctp_addr *addr)
* Return 0 - If the address is a non-unicast or an illegal address.
* Return 1 - If the address is a unicast.
*/
-static int sctp_v4_addr_valid(union sctp_addr *addr, struct sctp_sock *sp)
+static int sctp_v4_addr_valid(union sctp_addr *addr,
+ struct sctp_sock *sp,
+ const struct sk_buff *skb)
{
/* Is this a non-unicast address or a unusable SCTP address? */
if (IS_IPV4_UNUSABLE_ADDRESS(&addr->v4.sin_addr.s_addr))
return 0;
+ /* Is this a broadcast address? */
+ if (skb && ((struct rtable *)skb->dst)->rt_flags & RTCF_BROADCAST)
+ return 0;
+
return 1;
}