PacketFence - BTS - PacketFence |
View Issue Details |
|
ID | Project | Category | View Status | Date Submitted | Last Update |
0001493 | PacketFence | error-handling | public | 2012-07-22 04:25 | 2012-10-19 10:18 |
|
Reporter | Moshe_Levi | |
Assigned To | | |
Priority | low | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | fixed | |
Platform | | OS | | OS Version | |
Product Version | 3.4.1 | |
Target Version | 3.6.0 | Fixed in Version | devel | |
fixed in git revision | f451796f7b61f01e150e4c3c68acd389efb41d37 |
fixed in mtn revision | |
|
Summary | 0001493: pfcmd_vlan return code always success even on error |
Description | I using pfcmd_vlan to do deauthenticateDot1x command.
even the mac is not exist in the AP the exit code of pfcmd_vlan is 0.
It is because the is no check in the $switch->deauthenticateMac($mac, 1); ( line 506.
I think you should add the correct exit code to all pfcmd_vlan commands |
Steps To Reproduce | |
Additional Information | |
Tags | No tags attached. |
Relationships | |
Attached Files | pfcmd_vlan.patch (1,760) 2012-08-07 03:37 https://www.packetfence.org/bugs/file_download.php?file_id=150&type=bug pfcmd_vlan-deauth-exit-code-fix-1493-v2.patch (10,110) 2012-08-08 10:56 https://www.packetfence.org/bugs/file_download.php?file_id=152&type=bug |
|
Issue History |
Date Modified | Username | Field | Change |
2012-07-22 04:25 | Moshe_Levi | New Issue | |
2012-08-06 16:46 | obilodeau | Note Added: 0002888 | |
2012-08-06 16:47 | obilodeau | Assigned To | => obilodeau |
2012-08-06 16:47 | obilodeau | Priority | normal => low |
2012-08-06 16:47 | obilodeau | Status | new => confirmed |
2012-08-06 16:47 | obilodeau | Target Version | => +2 |
2012-08-07 03:37 | Moshe_Levi | File Added: pfcmd_vlan.patch | |
2012-08-07 03:40 | Moshe_Levi | Note Added: 0002890 | |
2012-08-07 14:09 | obilodeau | Note Added: 0002904 | |
2012-08-07 14:26 | obilodeau | Note Added: 0002905 | |
2012-08-07 14:39 | obilodeau | Note Added: 0002906 | |
2012-08-07 14:40 | obilodeau | File Added: pfcmd_vlan-deauth-exit-code-fix-1493.patch | |
2012-08-07 14:40 | obilodeau | Status | confirmed => assigned |
2012-08-07 14:41 | obilodeau | Note Edited: 0002906 | |
2012-08-08 03:29 | Moshe_Levi | Note Added: 0002916 | |
2012-08-08 10:56 | obilodeau | File Added: pfcmd_vlan-deauth-exit-code-fix-1493-v2.patch | |
2012-08-08 10:56 | obilodeau | File Deleted: pfcmd_vlan-deauth-exit-code-fix-1493.patch | |
2012-08-08 10:57 | obilodeau | Note Added: 0002921 | |
2012-08-08 10:59 | obilodeau | Note Edited: 0002921 | |
2012-10-04 16:05 | fgaudreault | git revision | => f451796f7b61f01e150e4c3c68acd389efb41d37 |
2012-10-04 16:05 | fgaudreault | Note Added: 0003114 | |
2012-10-04 16:05 | fgaudreault | Status | assigned => resolved |
2012-10-04 16:05 | fgaudreault | Resolution | open => fixed |
2012-10-19 10:18 | fgaudreault | Assigned To | obilodeau => |
2012-10-19 10:18 | fgaudreault | Fixed in Version | => devel |
2012-10-19 10:18 | fgaudreault | Target Version | +2 => 3.6.0 |
Notes |
|
|
Unfortunately, no care was given to pfcmd_vlan's exit codes during it's development... nor to much of the pf::SNMP subsystem for that matter..
Unfortunately this also isn't a priority but patches are accepted and would be quickly merged if we don't see adverse effects on other callers. |
|
|
|
I add a patch to fix the exit codes for the deauthenticateDot1x operation.
we are using this command in freeradius and need the return code.
I would appreciate if you can merge it to packetfence. |
|
|
|
the patch doesn't separate arguments to pod2usage with a comma |
|
|
|
Also the != $TRUE forces numeric context and I think it would issue a warning if undef was returned instead of 0 ($FALSE). |
|
|
(0002906)
|
obilodeau
|
2012-08-07 14:39
(edited on: 2012-08-07 14:41) |
|
I created the following branch with an updated version of the fix: https://github.com/inverse-inc/packetfence/tree/fix/1493-pfcmd_vlan-deauth-exit-code-fix [^]
Here's a copy of a warning I added in the code and in the commit message:
Warning: several (if not all) implementations of deauthenticateMac are
*not* trying to have coherent return codes. An extensive review was *not*
performed. Please test before relying on that behavior.
Patches to fix relevant implementations will be merged in priority and
should be contributed back.
I attached a patch to the ticket also. Please confirm that it works for your environment w/o problems and then I'll merge it for our next release.
|
|
|
|
you are missing ; in line 155 (my $result = $switch->deauthenticateMac($mac, $TRUE)) in the patch. other then that it is works for me.
thank you. |
|
|
(0002921)
|
obilodeau
|
2012-08-08 10:57
(edited on: 2012-08-08 10:59) |
|
Updated the patch and the github branch. Opening pull request to include fix in next release.
|
|
|
(0003114)
|
fgaudreault
|
2012-10-04 16:05
|
|
|