## Interface parsing:
##
-# Read an interfaces file with optional /proc/net/dev and /proc/net/if_inet6
-# file content strings, which default to the provided ones.
+# Read an interfaces file with optional /proc/net/dev file content string and
+# the list of active interfaces, which otherwise default
sub r($;$$) {
- my ($ifaces, $proc_net_dev, $proc_net_if_inet6) = @_;
+ my ($ifaces, $proc_net_dev, $active) = @_;
$proc_net_dev //= load('proc_net_dev');
- $proc_net_if_inet6 //= load('proc_net_if_inet6');
+ $active //= [split(/\s+/, load('active_interfaces'))];
open my $fh1, '<', \$ifaces;
open my $fh2, '<', \$proc_net_dev;
- open my $fh3, '<', \$proc_net_if_inet6;
- $config = PVE::INotify::__read_etc_network_interfaces($fh1, $fh2, $fh3);
+ $config = PVE::INotify::__read_etc_network_interfaces($fh1, $fh2, $active);
close $fh1;
}