PacketFence - BTS - PacketFence
View Issue Details
0001176PacketFenceerror-handlingpublic2011-02-03 15:262011-10-25 09:01
obilodeau 
fgaudreault 
normalminoralways
closedfixed 
 
2.2.02.2.0 
4c6ed11e101483c25dbf5aeb038d92f797d45b3b
0001176: avoid warnings when a RADIUS Access-Request comes to an undefined switch (in switches.conf)
Some warnings are generated on the client side. We can handle those.

Also make sure that server side logs say something relevant.
- Switch doesn't exist in switches.conf: what happens?
** The VLAN could not be determined by the rlm_perl script, so the status returned by PF is 1 :

Odd number of elements in hash assignment at /etc/raddb/packetfence.pm line 173 (0000001)
    (W misc) You specified an odd number of elements to initialize a hash,
    which is odd, because hashes come in key/value pairs.
    
Use of uninitialized value in list assignment at /etc/raddb/packetfence.pm line
    173 (0000002)
    (W uninitialized) An undefined value was used as if it were already
    defined. It was interpreted as a "" or a 0, but maybe it was a mistake.
    To suppress this warning assign a defined value to your variables.
    
    To help you figure out what was undefined, perl tells you what operation
    you used the undefined value in. Note, however, that perl optimizes your
    program and the operation displayed in the warning may not necessarily
    appear literally in your program. For example, "that $foo" is
    usually optimized into "that " . $foo, and the warning will refer to
    the concatenation (.) operator, even though there is no . in your
    program.
    
rlm_perl: PacketFence RESULT VLAN COULD NOT BE DETERMINED
rlm_perl: PacketFence RESULT RESPONSE CODE: 1 (2 means OK)
Code Review
related to 0001128closed fgaudreault 802.1X / MAC Authentication tests 
patch 0001176.patch (2,809) 2011-03-25 12:49
https://www.packetfence.org/bugs/file_download.php?file_id=87&type=bug
Issue History
2011-02-03 15:26obilodeauNew Issue
2011-02-03 15:26obilodeauRelationship addedrelated to 0001128
2011-03-03 15:19obilodeauTarget Version2.0.2 => +1
2011-03-25 12:20fgaudreaultStatusnew => assigned
2011-03-25 12:20fgaudreaultAssigned To => fgaudreault
2011-03-25 12:49fgaudreaultNote Added: 0001993
2011-03-25 12:49fgaudreaultFile Added: 0001176.patch
2011-03-25 12:49fgaudreaultStatusassigned => feedback
2011-03-25 12:49fgaudreaultTag Attached: Code Review
2011-04-29 17:39obilodeaumtn revision => 4c6ed11e101483c25dbf5aeb038d92f797d45b3b
2011-04-29 17:39obilodeauNote Added: 0002047
2011-04-29 17:39obilodeauStatusfeedback => resolved
2011-04-29 17:39obilodeauFixed in Version => trunk
2011-04-29 17:39obilodeauResolutionopen => fixed
2011-05-04 11:33obilodeauFixed in Versiontrunk => 2.2.0
2011-05-04 11:40obilodeauStatusresolved => closed
2011-10-25 09:01obilodeauTarget Version+1 => 2.2.0

Notes
(0001993)
fgaudreault   
2011-03-25 12:49   
Proposed patch included.

Previously, we were sending an undef value in the reply array to the packetfence.pm module if a switch wasn't in switches.conf The proposed fix is to send a Reply-Message to packetfence.pm when an error occur. Instead of having a stack trace, we now have the reason of the reject using the Reply-Message attribute, which is returned by default in the Access-Reject packet.
(0002047)
obilodeau   
2011-04-29 17:39   
fix committed in trunk