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

Skip to content
Commit 3a6d5d7a authored by Maciej Żenczykowski's avatar Maciej Żenczykowski
Browse files

bpf_progs/netd - do not account egress clat daemon traffic to ebpf interface statistics



This is already the case for ebpf offloaded egress, now it will also
be the case for traffic which is not offloaded for any reason (e.g. icmp).

Egress will be accounted for on the v4-foo interface and copied over (after increasing by
a fixed 20 byte overhead per packet [ignoring the 8 extra byte overhead of fragments])
to foo interface.

This also makes egress accounting match ingress, where due to raw prerouting iptables drop
rule we already do not account clat traffic to foo interface stats, and only account to v4-foo.

Note: The returned value does not matter, since we do not use the match aspect
of this program, but it seems more correct to not match if we don't account, see:
  $ adb shell iptables-save | egrep egress_xtbpf
  -A bw_mangle_POSTROUTING -m bpf --object-pinned /sys/fs/bpf/prog_netd_skfilter_egress_xtbpf

Tested: atest, manually
Bug: 150738490
Signed-off-by: default avatarMaciej Żenczykowski <maze@google.com>
Change-Id: I53753d4184c0ca606450584ab0123b4047b41092
parent bb3abe5a
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