Skip to content

TPACKET_V3 support broken when read timeout 0. #335

@LordReg

Description

@LordReg

When libpcap TPACKET_V3 support is in use, knockd does not register udp packet 'knocks' (haven't tested tcp.) Disabling TPACKET_V3 in libpcap by commenting out the relevant #define in pcap-linux.c (so that TPACKET_V2 support is used) works around the issue.

knockd sets the read timeout to 0 (to wait indefinitely) via pcap_open_live():
https://github.com/jvinet/knock/blob/master/src/knockd.c#L217
If changing the read timeout to say, 1000, then knocked will register the udp packets as expected.

Tested libpcap 1.5.1 and git commit 76522d with knockd 0.6 on Linux Kernel 3.12.3.

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions