Bug Tracking System

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0001563PacketFenceweb adminpublic2012-09-29 16:152015-02-13 15:42
Assigned To 
PlatformOSOS Version
Product Version3.5.1 
Target VersioninvestigateFixed in Version 
Summary0001563: Adding an interface without IP breaks the GUI
DescriptionWhen adding a new monitor interface (configuration->interfaces), if you leave the IP and netmask blank it is accepted by the GUI and added to the config:

[interface eth0]

However from that point onwards the GUI is screwed. The initial response is

Error: Problems executing 'PFCMD interfaceconfig get all'

could not parse at /usr/local/pf/lib/pf/ line 362

but a bunch of other web pages are broken, e.g. if you go to Configuration > Main you get two sets of backtraces including

could not parse at /usr/local/pf/lib/pf/ line 362
";s:7:"configs";b:0;s:15:"current_heading";s:0:"";}'> Warning: Invalid argument supplied for foreach() in /usr/local/pf/html/admin/configuration/main.php on line 143

This continues until you fix the configuration manually, i.e. open pf.conf, and either add an IP address and netmask to the interface in question, or delete the interface.

The line referred to in the first error above is
$int_obj = new Net::Netmask( $ip, $mask );
so clearly the IP/mask must be valid, but the GUI lets you submit empty values, and pfcmd doesn't reject them either.

There are two possible resolutions I can see:

1. validate the IP address before adding it to the config (in pfcmd and/or GUI)
2. allow interfaces without IP and netmask. This would be useful for monitor interfaces.
TagsNo tags attached.
fixed in git revision
fixed in mtn revision
Attached Files

- Relationships

-  Notes
lmunro (administrator)
2015-02-13 15:42

These bugs have been sitting untouched since 2012.
Closing them and possibly reopening in github tracker where relevant.

- Issue History
Date Modified Username Field Change
2012-09-29 16:15 candlerb New Issue
2012-10-19 11:05 fgaudreault Target Version => investigate
2015-02-13 15:42 lmunro Note Added: 0003825
2015-02-13 15:42 lmunro Status new => closed

Copyright © 2000 - 2012 MantisBT Group
Powered by Mantis Bugtracker