/[smeserver]/rpms/e-smith-base/sme10/e-smith-base-5.8.0-bz6536-bz10974-validate_subnet.patch
ViewVC logotype

Diff of /rpms/e-smith-base/sme10/e-smith-base-5.8.0-bz6536-bz10974-validate_subnet.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

Revision 1.1 by jpp, Sun Jun 28 02:45:31 2020 UTC Revision 1.2 by jpp, Sun Jun 28 03:11:07 2020 UTC
# Line 17  diff -Nur e-smith-base-5.8.0.old/root/us Line 17  diff -Nur e-smith-base-5.8.0.old/root/us
17  +    # we test for a valid mask or bit mask  +    # we test for a valid mask or bit mask
18  +    my $tip="192.168.50.1";  +    my $tip="192.168.50.1";
19  +    my $block = new Net::Netmask("$tip/$data") or return "INVALID_SUBNET_MASK";  +    my $block = new Net::Netmask("$tip/$data") or return "INVALID_SUBNET_MASK";
20  +    if ($block->{'ERROR'} eq "" && ($block->mask() eq "$data" || $block->bits() eq "$data"))  +    if ($block->mask() eq "$data" || $block->bits() eq "$data")
21       {       {
22           return "OK";           return "OK";
23       }       }
# Line 65  diff -Nur e-smith-base-5.8.0.old/root/us Line 65  diff -Nur e-smith-base-5.8.0.old/root/us
65  +    # we test for a valid mask or bit mask  +    # we test for a valid mask or bit mask
66  +    my $tip="192.168.50.1";  +    my $tip="192.168.50.1";
67  +    my $block = new Net::Netmask("$tip/$mask") or return "INVALID_SUBNET_MASK";  +    my $block = new Net::Netmask("$tip/$mask") or return "INVALID_SUBNET_MASK";
68  +    if ($block->{'ERROR'} eq "" && ($block->mask() eq "$mask" || $block->bits() eq "$mask"))  +    if ($block->mask() eq "$mask" || $block->bits() eq "$mask")
69       {       {
70           return "OK";           return "OK";
71       }       }


Legend:
Removed lines/characters  
Changed lines/characters
  Added lines/characters

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed