Feature #4038
closed
Button to clear the arp cache
Added by Grischa Zengel almost 10 years ago.
Updated about 4 years ago.
Description
After swapping IP from two embedded devices (WizNet RS485 Gateways) the gateways weren't reachable from an other subnet.
I had to log in and to clear the cache with 'arp -c -a'.
It would be nice to have a button to clear the cache in "Diagnostics: ARP Table".
Files
Grischa Zengel wrote:
After swapping IP from two embedded devices (WizNet RS485 Gateways) the gateways weren't reachable from an other subnet.
I had to log in and to clear the cache with 'arp -c -a'.
It would be nice to have a button to clear the cache in "Diagnostics: ARP Table".
Hi Grischa,
I stumbled across your issue and decided to write a patch for this. It is tested on 2.1.5-RELEASE.
You should apply diag_arp.php.diff to diag_arp.php in /usr/local/www
And place diag_arpclear.php in the same location.
-- Josh
Applying that may be dangerous, in that it leaves a file on your system with no authentication that clears your ARP table. We'd never put that in without authentication, though it's probably minimal risk especially with the default only open LAN-side.
Chris Buechler wrote:
Applying that may be dangerous, in that it leaves a file on your system with no authentication that clears your ARP table. We'd never put that in without authentication, though it's probably minimal risk especially with the default only open LAN-side.
Hi Chris,
I agree, however I am somewhat unfamiliar with pfSense's development so I was unsure whether there was anything to call that would validate the login session. If you can point me in the right direction, I'd be happy to update my patch.
-- Josh
Chris Buechler wrote:
Applying that may be dangerous, in that it leaves a file on your system with no authentication that clears your ARP table. We'd never put that in without authentication, though it's probably minimal risk especially with the default only open LAN-side.
Hi again Chris,
I've taken a different approach which avoids using AJAX to call the script to clear the ARP cache and instead have done it inside diag_arp.php which should have already taken care of the authentication and login validation (why re-invent the wheel? ;-) ).
Please see my diff now, which no longer requires diag_arpclear.php
-- Josh
- Status changed from New to Pull Request Review
- Target version set to 2.5.0
- Status changed from Pull Request Review to Feedback
- Assignee set to Renato Botelho
- % Done changed from 0 to 100
PR has been merged. Thanks!
- Status changed from Feedback to Resolved
- Category changed from Web Interface to Diagnostics
Also available in: Atom
PDF