summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorVlad Yasevich <vladislav.yasevich@hp.com>2007-07-18 02:44:12 -0700
committerWilly Tarreau <w@1wt.eu>2007-08-25 17:23:57 +0200
commit844aa7759d867d26c4a63610c0da2354e235d80a (patch)
treebb4e862765a7391341d9e076dad30e8473645ed9 /net
parent16978e1a96df6d69bb9bac6268ec3d7e8af4af70 (diff)
[PATCH] SCTP scope_id handling fix
SCTP: Add scope_id validation for link-local binds SCTP currently permits users to bind to link-local addresses, but doesn't verify that the scope id specified at bind matches the interface that the address is configured on. It was report that this can hang a system. Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Willy Tarreau <w@1wt.eu>
Diffstat (limited to 'net')
-rw-r--r--net/sctp/ipv6.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/net/sctp/ipv6.c b/net/sctp/ipv6.c
index ef36be073a13..c00c73c39749 100644
--- a/net/sctp/ipv6.c
+++ b/net/sctp/ipv6.c
@@ -874,6 +874,10 @@ static int sctp_inet6_send_verify(struct sctp_sock *opt, union sctp_addr *addr)
dev = dev_get_by_index(addr->v6.sin6_scope_id);
if (!dev)
return 0;
+ if (!ipv6_chk_addr(&addr->v6.sin6_addr, dev, 0)) {
+ dev_put(dev);
+ return 0;
+ }
dev_put(dev);
}
af = opt->pf->af;