diff options
-rw-r--r-- | net/sctp/ipv6.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/net/sctp/ipv6.c b/net/sctp/ipv6.c index 2c29394fd92e..2164b511fe51 100644 --- a/net/sctp/ipv6.c +++ b/net/sctp/ipv6.c @@ -875,6 +875,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; |