[IPV6]: Add v4mapped address inline
Add v4mapped address inline to avoid calls to ipv6_addr_type(). Signed-off-by: Brian Haley <brian.haley@hp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
6f4fc423b9
commit
e773e4faa1
@@ -249,7 +249,7 @@ static int do_ipv6_setsockopt(struct sock *sk, int level, int optname,
|
||||
}
|
||||
|
||||
if (ipv6_only_sock(sk) ||
|
||||
!(ipv6_addr_type(&np->daddr) & IPV6_ADDR_MAPPED)) {
|
||||
!ipv6_addr_v4mapped(&np->daddr)) {
|
||||
retv = -EADDRNOTAVAIL;
|
||||
break;
|
||||
}
|
||||
|
Reference in New Issue
Block a user