summaryrefslogtreecommitdiffstats
path: root/net/ipv6/udp.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv6/udp.c')
-rw-r--r--net/ipv6/udp.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c
index d538fafaf4a9..2464fba569b4 100644
--- a/net/ipv6/udp.c
+++ b/net/ipv6/udp.c
@@ -1045,6 +1045,8 @@ static void udp_v6_flush_pending_frames(struct sock *sk)
1045static int udpv6_pre_connect(struct sock *sk, struct sockaddr *uaddr, 1045static int udpv6_pre_connect(struct sock *sk, struct sockaddr *uaddr,
1046 int addr_len) 1046 int addr_len)
1047{ 1047{
1048 if (addr_len < offsetofend(struct sockaddr, sa_family))
1049 return -EINVAL;
1048 /* The following checks are replicated from __ip6_datagram_connect() 1050 /* The following checks are replicated from __ip6_datagram_connect()
1049 * and intended to prevent BPF program called below from accessing 1051 * and intended to prevent BPF program called below from accessing
1050 * bytes that are out of the bound specified by user in addr_len. 1052 * bytes that are out of the bound specified by user in addr_len.