• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

mozillazg / ptcpdump / 46001632644
72%

Build:
DEFAULT BRANCH: master
Ran 27 Nov 2026 01:06PM UTC
Jobs 1
Files 78
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

27 Nov 2026 12:47PM UTC coverage: 71.999% (-0.2%) from 72.162%
46001632644

push

github

web-flow
fix(bpf): process info for ingress packets on L3-only devices (#428)

* test: process info on ingress packets of a WireGuard device

Capture on wg0 with --pname curl and require the peer's reply to show
up.  On L3-only devices ingress packets currently get no process info,
so with the tc and socket-filter backends --pname drops the reply and
the test fails.  (cgroup-skb and tp-btf take other paths and pass
already.)  Runs in GitHub Actions next to the tun test, and on
CircleCI except for socket-filter, like test_tun.sh.  CI is set in
both, so a missing wireguard module fails the step instead of
skipping it.

Prompts:
> Follow up PR#428 [= apply the review bot's comment on
> https://github.com/mozillazg/ptcpdump/pull/428 that the GitHub
> Actions step must set CI]

Assisted-By: Claude Opus 5.5

* fix(bpf): process info for ingress packets on L3-only devices

On devices without a MAC header (WireGuard, tun) ingress packets never
got process info; egress packets were fine only because they are
matched by socket cookie.  Two bugs:

- fill_packet_event_meta() called parse_skb_meta() with !cgroup_skb
  instead of the program's l2 flag, so the L3 tc/tcx/socket-filter
  programs parsed the IP header as an Ethernet header.
- the L3 branch of parse_skb_meta(), used by cgroup-skb and, after
  the first fix, by those programs too, read skb->protocol with
  BPF_CORE_READ(), which probes kernel memory at the __sk_buff offset
  instead of doing a context access, and so got garbage.

Either way the flow tuple stayed zero or garbage and the flow_pid_map
lookup, which ingress packets depend on, found nothing.  The cgroup-skb
pre-assignment of h_protocol is dropped, as parse_skb_meta() now sets
it correctly.

BPF objects regenerated with clang 23.1.5.

Assisted-By: Claude Opus 5.5

* test: also check the ingress process info without a process filter

The --pname phase only proves that the packet was not dropped. Add a
second phase without --pname and assert that the ing... (continued)

4433 of 6157 relevant lines covered (72.0%)

0.72 hits per line

Coverage Regressions

Lines Coverage ∆ File
13
45.95
-35.14% internal/consumer/keylog.go
4
72.73
-18.18% internal/utils/c.go
Jobs
ID Job ID Ran Files Coverage
1 46001632644.1 27 Nov 2026 01:06PM UTC 78
72.0
GitHub Action Run
Source Files on build 46001632644
  • Tree
  • List 78
  • Changed 4
  • Source Changed 0
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #46001632644
  • 8d2566ae on github
  • Prev Build on master (#45728050773)
  • Next Build on master (#46006392112)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc