Skip to content
This repository was archived by the owner on Apr 14, 2024. It is now read-only.
This repository was archived by the owner on Apr 14, 2024. It is now read-only.

Incorrect usage of libpcap in pcapportcpp, results in live lock. #215

@lunn

Description

@lunn

Please see the thread:

https://www.mail-archive.com/netdev@vger.kernel.org/msg163532.html

PcapPort::PortCapturer::stop() sets a flag and then waits for PcapPort::PortCapturer::run() to wake up, notice the flag, and exist. However, there is no guarantee pcap_next_ex() will exist in bounded time, on an idle network. And since Ostinator is often used on a network where it is the only source of traffic, this is a problem.

You probably need to send the thread running PcapPort::PortCapturer::run() a signal so that it exists from the poll system call.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions