PacketFence
Bug Tracking System

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0001268PacketFencecorepublic2011-09-15 09:562011-09-21 22:16
Reporterpsnizek 
Assigned Toobilodeau 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version2.2.1 
Target VersionFixed in Version3.0.0 
Summary0001268: omitting ip=|mask= parameter in pf.conf will throw unexpected exception
Descriptionwhen omitting ip= or mask= in pf.conf

[interface eth0.2]
#ip=192.168.2.1
#mask=255.255.255.0
type=internal
gateway=192.168.2.1

an exception is thrown:

root@ar:/usr/local/pf/conf# ../bin/pfcmd checkup
Checking configuration sanity...
Can't call method "tag" on an undefined value at
        /usr/local/pf/lib/pf/pfcmd/checkup.pm line 156 (0000001)
    (F) You used the syntax of a method call, but the slot filled by the
    object reference or package name contains an undefined value. Something
    like this will reproduce the error:

        $BADREF = undef;
        process $BADREF 1,2,3;
        $BADREF->process(1,2,3);

Uncaught exception from user code:
        Can't call method "tag" on an undefined value at /usr/local/pf/lib/pf/pfcmd/checkup.pm line 156.
 at /usr/local/pf/lib/pf/pfcmd/checkup.pm line 156
        pf::pfcmd::checkup::interfaces() called at /usr/local/pf/lib/pf/pfcmd/checkup.pm line 77
        pf::pfcmd::checkup::sanity_check('named', 'dhcpd', 'httpd', 'snmptrapd', 'pfsetvlan', 'pfdhcplistener', 'pfmon') called at ../bin/pfcmd line 1356
        main::checkup() called at ../bin/pfcmd line 158
        main::__ANON__() called at ../bin/pfcmd line 215


When omitting gateway=

[interface eth0.2]
ip=192.168.2.1
mask=255.255.255.0
type=internal
#gateway=192.168.2.1

we have a much nicer output:

root@ar:/usr/local/pf/conf# ../bin/pfcmd checkup
Checking configuration sanity...
FATAL - incomplete network information for interface eth0.2
FATAL - incomplete network information for interface eth0.2

seems like if $interface in sub interfaces is undefined if one of both, ip= or mask=, is omitted in pf.conf.

TagsNo tags attached.
fixed in git revision
fixed in mtn revisiona7bb8fbc89f05301c3497194fd13ec9d086af51a
Attached Files

- Relationships

-  Notes
(0002208)
psnizek (reporter)
2011-09-15 10:17

forgot to mention... that includes typos like netmask= instead of mask=.
(0002214)
obilodeau (reporter)
2011-09-19 12:20

Fixed in trunk. Avoiding to push undef as int_obj if interface was not properly defined. This is catched up later by checkup.

I don't think the fix will backport well to 2.2.x since my crash was somewhere else but you might want to try.
(0002232)
obilodeau (reporter)
2011-09-21 22:15

fix released in 3.0

- Issue History
Date Modified Username Field Change
2011-09-15 09:56 psnizek New Issue
2011-09-15 10:17 psnizek Note Added: 0002208
2011-09-19 11:34 obilodeau Status new => assigned
2011-09-19 11:34 obilodeau Assigned To => obilodeau
2011-09-19 12:20 obilodeau mtn revision => a7bb8fbc89f05301c3497194fd13ec9d086af51a
2011-09-19 12:20 obilodeau Note Added: 0002214
2011-09-19 12:20 obilodeau Status assigned => resolved
2011-09-19 12:20 obilodeau Fixed in Version => trunk
2011-09-19 12:20 obilodeau Resolution open => fixed
2011-09-21 22:07 obilodeau Fixed in Version trunk => 3.0.0
2011-09-21 22:15 obilodeau Note Added: 0002232
2011-09-21 22:16 obilodeau Status resolved => closed


Copyright © 2000 - 2012 MantisBT Group
Powered by Mantis Bugtracker