PacketFence - BTS - PacketFence
View Issue Details
0000889PacketFenceerror-handlingpublic2010-01-08 16:582011-10-25 09:04
aarchi10 
fgaudreault 
normalminorhave not tried
closedno change required 
1.8.4 
1.9.01.9.0 
0000889: Error when pfcmd tries to update user-agents with 'special' user agents.
[root@npf2 ~]# /usr/local/pf/bin/pfcmd 'node edit 00:26:bb:a3:30:de user_agent="M%C3%A9t%C3%A9o/1.0 CFNetwork/459 Darwin/10.0.0d3"'
Usage: pfcmd <command> [options]

class | view violation classes
config | query, set, or get help on pf.conf configuration paramaters
configfiles | push or pull configfiles into/from database
fingerprint | view DHCP Fingerprints
graph | trending graphs
history | IP/MAC history
ifoctetshistorymac | accounting history
ifoctetshistoryswitch | accounting history
ifoctetshistoryuser | accounting history
interfaceconfig | query/modify interface configuration parameters
ipmachistory | IP/MAC history
locationhistorymac | Switch/Port history
locationhistoryswitch | Switch/Port history
lookup | node or pid lookup against local data store
manage | manage node entries
networkconfig | query/modify network configuration parameters
node | node manipulation
nodecategory | nodecategory manipulation
person | person manipulation
reload | rebuild fingerprint or violations tables without restart
report | current usage reports
schedule | Nessus scan scheduling
service | start/stop/restart and get PF daemon status
switch | switch manipulation
switchconfig | query/modify switches.conf configuration parameters
switchlocation | view switchport description and location
traplog | update traplog RRD files and graphs or obtain switch IPs
trigger | view and throw triggers
ui | used by web UI to create menu hierarchies and dashboard
update | download canonical fingerprint or OUI data
version | get installed PF version and database MD5s
violation | violation manipulation
violationconfig | query/modify violations.conf configuration parameters

Please view "pfcmd help <command>" for details on each option
No tags attached.
Issue History
2010-01-08 16:58rbalzardNew Issue
2010-05-05 14:13obilodeauNote Added: 0001554
2010-05-05 14:13obilodeauCategory1.8.7 => error-handling
2010-05-05 14:13obilodeauProduct Version => 1.8.4
2011-01-18 10:03obilodeauTarget Version => 2.0.1
2011-01-26 15:30obilodeauTarget Version2.0.1 => 2.0.2
2011-03-03 15:19obilodeauTarget Version2.0.2 => +1
2011-03-08 13:10obilodeauNote Added: 0001904
2011-03-09 17:39fgaudreaultStatusnew => assigned
2011-03-09 17:39fgaudreaultAssigned To => fgaudreault
2011-03-09 17:42fgaudreaultNote Added: 0001910
2011-03-10 10:10obilodeauNote Added: 0001912
2011-03-10 16:00fgaudreaultNote Added: 0001913
2011-03-10 16:00fgaudreaultStatusassigned => resolved
2011-03-10 16:00fgaudreaultFixed in Version => 1.9.0
2011-03-10 16:00fgaudreaultResolutionopen => no change required
2011-05-04 11:51obilodeauStatusresolved => closed
2011-10-25 09:04obilodeauReporterrbalzard => aarchi10
2011-10-25 09:04obilodeauTarget Version+1 => 1.9.0

Notes
(0001554)
obilodeau   
2010-05-05 14:13   
The grammar didn't parse that's the reason why it failed. The user agent in the example is obviously broken.

What should we do about this one? User-agent updates are always done in the background so the user should never be aware of that. Correct?

My take on this is that it can fail and we don't worry about it. What do you think?
(0001904)
obilodeau   
2011-03-08 13:10   
Reminder sent to: fgaudreault, user201

not sure if this is still an issue.. If anyone has a minute can you try to reproduce by:
- trying to above command on the latest version
- spoof your useragent to "Météo/1.0 CFNetwork/459 Darwin/10.0.0d3" and check if the user_agent updates properly when you hit the captive portal

both tests are important
(0001910)
fgaudreault   
2011-03-09 17:42   
Still failing using the command :

/usr/local/pf/bin/pfcmd 'node edit ca:fe:ba:be:be:ef user_agent="M%C3%A9t%C3%A9o/1.0 CFNetwork/459 Darwin/10.0.0d3"'
Command not understood. (pfcmd grammar test failed at line 223.)
(0001912)
obilodeau   
2011-03-10 10:10   
Digging a bit, I found that the pfcmd 'node edit ...' call was replaced with a straight node_modify call in revno: 9cf9d7b61bdc956f6c9777faf8ba324507aca2f2

Can you perform the second test then? and then see what gets in the admin interface and what happens if we try to modify it with it (pfcmd node edit will then be called).
(0001913)
fgaudreault   
2011-03-10 16:00   
The user-agent is properly handled. It has been previously fixed in 1.9.0.