Page MenuHomeFreeBSD

Decode pfsync packets on network interfaces
ClosedPublic

Authored by email_luiz.eng.br on Nov 8 2023, 1:25 PM.
Tags
None
Referenced Files
F103015419: D42504.diff
Tue, Nov 19, 8:42 PM
F102950896: D42504.id129856.diff
Tue, Nov 19, 3:04 AM
F102945998: D42504.diff
Tue, Nov 19, 1:52 AM
F102941157: D42504.diff
Tue, Nov 19, 12:47 AM
Unknown Object (File)
Sun, Nov 17, 8:53 PM
Unknown Object (File)
Sat, Nov 9, 9:35 PM
Unknown Object (File)
Wed, Nov 6, 1:35 PM
Unknown Object (File)
Tue, Nov 5, 2:56 PM
Subscribers

Details

Summary

Looks like when print-ip-demux.c was introduced on ee67461e, the pfsync_ip_print function was missed, causing tcpdump to treat pfsync packets on network interfaces as an unknown protocol.

Sponsored by: InnoGames GmbH

Test Plan
make -C /usr/src/usr.sbin/tcpdump clean
make -C /usr/src/usr.sbin/tcpdump
make -C /usr/src/usr.sbin/tcpdump install
tcpdump -i vtnet0 'ip[9:1]==0xf0' or 'ip6[6:1]==0xf0'

The output should show packets properly decoded instead of this:

14:13:58.861597 IP 192.0.0.1 > 192.0.0.2:  ip-proto-240 216
14:13:58.861618 IP 192.0.0.1 > 192.0.0.2:  ip-proto-240 300
14:13:58.954208 IP 192.0.0.1 > 192.0.0.2:  ip-proto-240 132

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

I enclosed the code with a #ifdef HAVE_NET_IF_PFLOG_H to allow for building with WITHOUT_PF=1

This revision was not accepted when it landed; it landed in state Needs Review.Nov 8 2023, 5:00 PM
This revision was automatically updated to reflect the committed changes.