Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version 1.09 doesn't list some interfaces #2

Open
avortimid opened this issue Jan 14, 2015 · 0 comments
Open

Version 1.09 doesn't list some interfaces #2

avortimid opened this issue Jan 14, 2015 · 0 comments

Comments

@avortimid
Copy link

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant