Skip to content

Version 1.09 doesn't list some interfaces #2

@avortimid

Description

@avortimid
Problem

IO::Interface doesn't list interfaces which are up but don't have assigned IP in version 1.09. The same are listed in version 1.08.

Culprit

After the switch to Module::Build in c4de691 the build system doesn't provide -DUSE_GETIFADDRS to gcc and interfaces are collected using different logic compared to version 1.08.

Reproduction

I use this simple print.pl script to test which interfaces are returned by the module:

#!/usr/bin/perl
use IO::Interface::Simple;
my @iflist = IO::Interface::Simple->interfaces;
print join(',', @iflist) . "\n";
1.08
  1. Install 1.08 version
    cpanm LDS/IO-Interface-1.08
  2. Configure eth1
    ifconfig eth1 up 10.10.10.10
  3. eth1 is listed
    ./print.pl | grep eth1
  4. Remove address from eth1
    ifconfig eth1 0.0.0.0
  5. eth1 is again listed
    ./print.pl | grep eth1
1.09
  1. Install 1.09 version
    cpanm LDS/IO-Interface-1.09
  2. Configure eth1
    ifconfig eth1 up 10.10.10.10
  3. eth1 is listed
    ./print.pl | grep eth1
  4. Remove address from eth1
    ifconfig eth1 0.0.0.0
  5. eth1 is not listed
    ./print.pl | grep eth1

Additional information

  1. Perl version:
    This is perl 5, version 18, subversion 2 (v5.18.2) built for x86_64-linux
  2. uname -a:
    Linux machine 3.14.27-gentoo #1 SMP Tue Jan 13 09:12:34 UTC 2015 x86_64 Intel(R) Xeon(R) CPU E5-2440 0 @ 2.40GHz GenuineIntel GNU/Linux
  3. I hardcoded as a test #define USE_GETIFADDRS at the start of Interface.xs file and the behavior between the two versions was the same. But this is ugly and was made just for the check.

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