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: Maciej Żenczykowski <maze@google.com>
Change-Id: I17c02d5bf06189e226db9c0edc8da0e013d1eb05
1 file changed