Skip to content

device not "any" results in index out of bounds exception #86

@ntfrnzn

Description

@ntfrnzn

On line 82 of sniffer.go
if sniffer.config.Devices[0] == "any" || sniffer.config.Devices[1] == "lo" {

In the current release, multiple devices are not supported, so setting the device configuration to "eth0" triggers an exception on this line. "devices" is always length 1.

I see there are comments elsewhere that suggest that the devices array might be populated in the future, so this might be fixed in a couple different ways along with other changes. Obviously the simple one-line fix is to check the length here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions