Bug Tracking System

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0001352PacketFenceconfigurationpublic2011-12-27 09:272012-02-28 14:31
Assigned Toobilodeau 
PlatformOSOS Version
Product Versiondevel 
Target Version3.2.0Fixed in Version3.2.0 
Summary0001352: Misleading error message if missing management type
DescriptionInstead of saying that there is a typo or that the management type is missing from pf.conf, we have this misleading error message :

Can't call method "tag" on an undefined value at

        /usr/local/pf/lib/pf/pfcmd/ line 169 (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;



Uncaught exception from user code:

        Can't call method "tag" on an undefined value at /usr/local/pf/lib/pf/pfcmd/ line 169.

at /usr/local/pf/lib/pf/pfcmd/ line 169

        pf::pfcmd::checkup::interfaces() called at /usr/local/pf/lib/pf/pfcmd/ line 87

        pf::pfcmd::checkup::sanity_check('httpd', 'snmptrapd', 'pfsetvlan', 'pfdhcplistener', 'pfmon') called at /usr/local/pf/bin/pfcmd line 1357

        main::checkup('httpd', 'snmptrapd', 'pfsetvlan', 'pfdhcplistener', 'pfmon') called at /usr/local/pf/bin/pfcmd line 1280

        main::service() called at /usr/local/pf/bin/pfcmd line 201

        main::__ANON__() called at /usr/local/pf/bin/pfcmd line 218
Additional InformationTo Fix :

- Ensure that you have an interface in pf.conf with type=management
TagsNo tags attached.
fixed in git revision
fixed in mtn revisiona074717c2d137b2d447d818975f852b0e1730caa
Attached Files

- Relationships

-  Notes
obilodeau (reporter)
2011-12-30 11:55

Easy to fix: wrap in try {} catch {}; or do an explicit ref($...) eq 'objectType' and add warning or fatal.
obilodeau (reporter)
2012-01-31 15:03

was already fixed in rev dd48c0b1f6074b4079419f8f56496c515a238e93 but the fix was quite primitive and only focused on the mgmt interface not defined use-case and not every caller who requires a Net::Netmask object.

This new fix wraps the entire config processing in a try {} catch {} and so should catch other types of mis-use. Also, everything requiring a Net::Netmask object also got a new check and exception thrown.
obilodeau (reporter)
2012-02-28 14:31

Fixed in recently released 3.2.0.

- Issue History
Date Modified Username Field Change
2011-12-27 09:27 fgaudreault New Issue
2011-12-30 11:55 obilodeau Note Added: 0002494
2012-01-31 15:03 obilodeau mtn revision => a074717c2d137b2d447d818975f852b0e1730caa
2012-01-31 15:03 obilodeau Note Added: 0002563
2012-01-31 15:03 obilodeau Status new => resolved
2012-01-31 15:03 obilodeau Fixed in Version => trunk
2012-01-31 15:03 obilodeau Resolution open => fixed
2012-01-31 15:03 obilodeau Assigned To => obilodeau
2012-02-28 14:22 obilodeau Target Version => 3.2.0
2012-02-28 14:22 obilodeau Fixed in Version trunk => 3.2.0
2012-02-28 14:31 obilodeau Note Added: 0002592
2012-02-28 14:31 obilodeau Status resolved => closed

Copyright © 2000 - 2012 MantisBT Group
Powered by Mantis Bugtracker