Skip to content

Don't rely on random interfaces order #13

@ezbik

Description

@ezbik
      q_num0 = os.listdir("/sys/class/net/").index(opts.interface) * 2
      q_num1 = os.listdir("/sys/class/net/").index(opts.interface) * 2 + 1

Queues numbers are determined based on os.listdir("/sys/class/net/") which returns array elements in random manner.
Yet it badly covers the situation when interfaces appear\disappear from the OS. We may end up at collisions, when running multiple per-interface Osfooler instances.

I believe we should read /sys/class/net/$if_name/ifindex and use the value for calculating Queue numbers, instead of using array element index numbers.

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