Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit a41db605 authored by Maciej enczykowski's avatar Maciej enczykowski Committed by Maciej Zenczykowski
Browse files

netd ebpf: always match and thus allow incoming udp to unconnected sockets



This also allows other edge case packets where we cannot figure out the
socket which will receive the packet.

This may be because:
  - the target socket is an unconnected udp socket not found by early demux
  - such a socket doesn't exist: we'll likely send an icmp error or tcp reset,
    this should be rare and thus shouldn't affect bandwidth nor power
    (and since we just received the packet the relevant radio should already
     be awake anyway)
  - the socket is in some other weird partial state, ie. possibly
    tcp syncookies, or tcp reqsk, or tcp timewait sockets... etc...

While we're at it also change:
  return masked_value;
to
  return masked_value ? BPF_MATCH : BPF_NOMATCH;
in two spots.

Test: build + cuttlefish atests,
  manual testing with previously problematic game

Bug: 140972725
Signed-off-by: default avatarMaciej Żenczykowski <maze@google.com>
Change-Id: I17c02d5bf06189e226db9c0edc8da0e013d1eb05
Merged-In: I17c02d5bf06189e226db9c0edc8da0e013d1eb05
parent 6c39e042
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment