Skip to Content.
Sympa Menu

perfsonar-user - [perfsonar-user] Perfsonar on IPv6-only (Alma9) host.

Subject: perfSONAR User Q&A and Other Discussion

List archive

[perfsonar-user] Perfsonar on IPv6-only (Alma9) host.


Chronological Thread 
  • From: Francesco Prelz <>
  • To:
  • Cc:
  • Subject: [perfsonar-user] Perfsonar on IPv6-only (Alma9) host.
  • Date: Thu, 18 Jan 2024 16:38:25 +0100 (CET)
  • Dkim-filter: OpenDKIM Filter v2.11.0 smtp4.mi.infn.it 40IFcPKS3048080


Hi all.

Trying to set up a perfsonar node on an IPv6-only host (latest 'testpoint' bundle for RHEL9, actually Almalinux 9, perfsonar-testpoint-5.0.7-1.el9).
I encountered an issue worth reporting.

My uplink interface was configured with jumbo frames but I noticed that
the sysctl tuning script (/usr/lib/perfsonar/scripts/configure_sysctl)
didn't pick that up. After some digging, the issue was traced to
a few functions of the Perfsonar Perl support libraries
(here: /usr/lib/perfsonar/lib/perfSONAR_PS/Utils/Host.pm)
that use the Perl IO::Interface::Simple module. The latter, much to my
surprise, is really 'IPv4-only' - as even a cursory look at the C part of
the source code will show:
https://metacpan.org/release/LDS/IO-Interface-1.09/source/lib/IO/Interface.pm

The effect is that IPv6-only interfaces are *not* listed by
IO::Interface::Simple->interfaces, and are therefore ignored by the
perfsonar sysctl setup script (and possibly elsewhere).

I could use a rather simple workaround for the two involved functions,
still using IO::Interface::Simple and avoiding the interface listing (see attached patch). Can something along these lines be considered for
inclusion in perfsonar ?

As a side note: the core IO::Interface Perl module, as built for RHEL9, still lists interfaces via the SIOCGIFCONF ioctl, rather than using 'getifaddrs()'. The latter can be selected via a build option, but
apparently it's not.

SIOCGIFCONF, as per manpage netdevice(7), is IPv4-only (for accidental reasons):
SIOCGIFCONF
Return a list of interface (network layer) addresses. This cur
rently means only addresses of the AF_INET (IPv4) family
for
compatibility.

It would probably help in the long run if usage of that module could be replaced by more IPv6-friendly alternatives.

Thanks.

Francesco Prelz
INFN - Milan
--- /usr/lib/perfsonar/lib/perfSONAR_PS/Utils/Host.pm.ORIG	2023-12-10 20:35:53.000000000 +0100
+++ /usr/lib/perfsonar/lib/perfSONAR_PS/Utils/Host.pm	2023-12-20 13:01:20.183033416 +0100
@@ -261,11 +261,9 @@
 sub get_interface_mtu {
     my $parameters = validate( @_, { interface_name => 1, } );
     my $interface_name = $parameters->{interface_name};
-    my @all_ifs = IO::Interface::Simple->interfaces();
-    foreach my $if (@all_ifs){
-        if($if eq $interface_name  && $if->mtu){
-          return $if->mtu;
-        }
+    my $if=IO::Interface::Simple->new($interface_name);
+    if($if->mtu){
+        return $if->mtu;
     }
 }
 
@@ -283,11 +281,9 @@
 sub get_interface_mac {
     my $parameters = validate( @_, { interface_name => 1, } );
     my $interface_name = $parameters->{interface_name};
-    my @all_ifs = IO::Interface::Simple->interfaces();
-    foreach my $if (@all_ifs){
-        if($if eq $interface_name  && $if->hwaddr){
-          return $if->hwaddr;
-        }
+    my $if=IO::Interface::Simple->new($interface_name);
+    if($if->hwaddr){
+        return $if->hwaddr;
     }
 }
 


  • [perfsonar-user] Perfsonar on IPv6-only (Alma9) host., Francesco Prelz, 01/18/2024

Archive powered by MHonArc 2.6.24.

Top of Page