aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/udp.c
diff options
context:
space:
mode:
authorAlexei Starovoitov <ast@kernel.org>2019-06-06 16:53:13 -0700
committerAlexei Starovoitov <ast@kernel.org>2019-06-06 16:53:13 -0700
commit4aeba328019ab9fbaad725b923b4c11c3725b24e (patch)
tree6e6832ee09a3fbe20df3c65f28657159b38dd11d /net/ipv4/udp.c
parenttools: bpftool: Fix JSON output when lookup fails (diff)
parentbpf: expand section tests for test_section_names (diff)
downloadlinux-dev-4aeba328019ab9fbaad725b923b4c11c3725b24e.tar.xz
linux-dev-4aeba328019ab9fbaad725b923b4c11c3725b24e.zip
Merge branch 'fix-unconnected-udp'
Daniel Borkmann says: ==================== Please refer to the patch 1/6 as the main patch with the details on the current sendmsg hook API limitations and proposal to fix it in order to work with basic applications like DNS. Remaining patches are the usual uapi and tooling updates as well as test cases. Thanks a lot! v2 -> v3: - Add attach types to test_section_names.c and libbpf (Andrey) - Added given Acks, rest as-is v1 -> v2: - Split off uapi header sync and bpftool bits (Martin, Alexei) - Added missing bpftool doc and bash completion as well ==================== Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'net/ipv4/udp.c')
-rw-r--r--net/ipv4/udp.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c
index 85db0e3d7f3f..2d862823cbb7 100644
--- a/net/ipv4/udp.c
+++ b/net/ipv4/udp.c
@@ -1783,6 +1783,10 @@ try_again:
sin->sin_addr.s_addr = ip_hdr(skb)->saddr;
memset(sin->sin_zero, 0, sizeof(sin->sin_zero));
*addr_len = sizeof(*sin);
+
+ if (cgroup_bpf_enabled)
+ BPF_CGROUP_RUN_PROG_UDP4_RECVMSG_LOCK(sk,
+ (struct sockaddr *)sin);
}
if (udp_sk(sk)->gro_enabled)