File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -338,11 +338,14 @@ static struct sctp_af *sctp_sockaddr_af(struct sctp_sock *opt,
338
338
if (!opt -> pf -> af_supported (addr -> sa .sa_family , opt ))
339
339
return NULL ;
340
340
341
- /* V4 mapped address are really of AF_INET family */
342
- if (addr -> sa .sa_family == AF_INET6 &&
343
- ipv6_addr_v4mapped (& addr -> v6 .sin6_addr ) &&
344
- !opt -> pf -> af_supported (AF_INET , opt ))
345
- return NULL ;
341
+ if (addr -> sa .sa_family == AF_INET6 ) {
342
+ if (len < SIN6_LEN_RFC2133 )
343
+ return NULL ;
344
+ /* V4 mapped address are really of AF_INET family */
345
+ if (ipv6_addr_v4mapped (& addr -> v6 .sin6_addr ) &&
346
+ !opt -> pf -> af_supported (AF_INET , opt ))
347
+ return NULL ;
348
+ }
346
349
347
350
/* If we get this far, af is valid. */
348
351
af = sctp_get_af_specific (addr -> sa .sa_family );
You can’t perform that action at this time.
0 commit comments