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

(-)src/PVE/INotifyEtcnetOverride.pm (-4 / +10 lines)
Lines 658-667 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 =~ m!\s*([\d\.]+)/(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})\s*!) { # x.x.x.x/a.b.c.d
662
           $f->{address} = $1;
662
            $f->{address} = $1;
663
           $f->{netmask} = __unwrap_netmask4($2);
663
            $f->{netmask} = $2;
664
           __line_broadcast_into($path, $line, $f, 'broadcast');
664
            $line =~ s!\s*([\d\.]+)/([\d\.]+)\s*!!;
665
            __line_broadcast_into($path, $line, $f, 'broadcast');
666
        } elsif ($line =~ m!\s*([\d\.]+)/(\d{1,3})\s*!) { # x.x.x.x/yy
667
            $f->{address} = $1;
668
            $f->{netmask} = __unwrap_netmask4($2);
669
            $line =~ s!\s*([\d\.]+)/(\d+)\s*!!;
670
            __line_broadcast_into($path, $line, $f, 'broadcast');
665
       } elsif (__line_broadcast_into($path, $line, $f, 'broadcast')) {
671
       } elsif (__line_broadcast_into($path, $line, $f, 'broadcast')) {
666
           # parsed
672
           # parsed
667
       } else {
673
       } else {

Return to bug 38762