Skip to content

Taking down a network interface causes infinite spinning loops #1028

Open

Description

@GyulyVGC

If an existing network interface is taken down, pcap's next_packet method will indefinitely throw a generic error PcapError("The interface disappeared"), causing our associated loops to start spinning.

This issue manifests in two cases:

  • the currently monitored network interface is taken down during an ongoing packet capture
  • any of the system network interfaces is taken down while in the initial page of the app (this occurs after Network adapters traffic preview #1026)

Even if the interface is later brought back up, the existing capture will still return the error, and a new capture must be re-instantiated to be able to correctly read packets from the interface again.
Right now, I'm not re-instantiating the capture so this means that new packets won't be seen by Sniffnet.

Note: this is based on my observation on macOS, but behaviour could be platform-dependent.

Related issue: rust-pcap/pcap#393

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions