View | Details | Raw Unified | Return to bug 38762
Collapse All | Expand All

(-)src/PVE/INotifyEtcnetOverride.pm (-1 / +2 lines)
Lines 658-664 sub __read_ipv4address_into { Link Here
658
       chomp ($line);
658
       chomp ($line);
659
       if ($line =~ m!^\s*(?:$|#)!) {
659
       if ($line =~ m!^\s*(?:$|#)!) {
660
           # skip
660
           # skip
661
       } elsif ($line =~ s!\s*([\d\.]+)/(\d+)\s*!!) {
661
       } elsif ($line =~ s!\s*([\d\.]+)/([\d\.]+)\s*!!) {
662
           $f->{address} = $1;
662
           $f->{address} = $1;
663
           $f->{netmask} = __unwrap_netmask4($2);
663
           $f->{netmask} = __unwrap_netmask4($2);
664
           __line_broadcast_into($path, $line, $f, 'broadcast');
664
           __line_broadcast_into($path, $line, $f, 'broadcast');
Lines 686-691 my %nm4prefix = qw/ Link Here
686
sub __unwrap_netmask4 {
686
sub __unwrap_netmask4 {
687
    my $in=shift;
687
    my $in=shift;
688
    my @out;
688
    my @out;
689
    return $in if ($in =~ /\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}/);
689
    while (@out<4) {
690
    while (@out<4) {
690
       if ($in>8) {
691
       if ($in>8) {
691
           push @out, '255';
692
           push @out, '255';

Return to bug 38762