summaryrefslogtreecommitdiff
path: root/net/ipv6/udp.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2022-04-22 12:47:51 +0100
committerDavid S. Miller <davem@davemloft.net>2022-04-22 12:47:51 +0100
commit42d594357e01e360b78e13659c42de1598698fd2 (patch)
treeecd21aa4fc72c17f4fbf6074a2f6f036b66018c2 /net/ipv6/udp.c
parent0844d36f771d3fe3c418df7569396a9a58feab85 (diff)
parent81ee0eb6c0fe34490ed92667538197d9295e899e (diff)
Merge branch 'ipv6-only-sock'
Kuniyuki Iwashima says: ==================== ipv6: Use ipv6_only_sock helper function. The first patch removes __ipv6_only_sock(), and the second replaces ipv6only tests with ipv6_only_sock(). ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/udp.c')
-rw-r--r--net/ipv6/udp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c
index db9449b52dbe..688af6f809fe 100644
--- a/net/ipv6/udp.c
+++ b/net/ipv6/udp.c
@@ -1123,7 +1123,7 @@ static int udpv6_pre_connect(struct sock *sk, struct sockaddr *uaddr,
* bytes that are out of the bound specified by user in addr_len.
*/
if (uaddr->sa_family == AF_INET) {
- if (__ipv6_only_sock(sk))
+ if (ipv6_only_sock(sk))
return -EAFNOSUPPORT;
return udp_pre_connect(sk, uaddr, addr_len);
}
@@ -1359,7 +1359,7 @@ int udpv6_sendmsg(struct sock *sk, struct msghdr *msg, size_t len)
msg->msg_name = &sin;
msg->msg_namelen = sizeof(sin);
do_udp_sendmsg:
- if (__ipv6_only_sock(sk))
+ if (ipv6_only_sock(sk))
return -ENETUNREACH;
return udp_sendmsg(sk, msg, len);
}