Project

General

Profile

Feature #4038

Button to clear the arp cache

Added by Grischa Zengel over 4 years ago. Updated over 4 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Web Interface
Target version:
-
Start date:
11/23/2014
Due date:
% Done:

0%

Estimated time:

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".

diag_arp-patch.tgz (771 Bytes) diag_arp-patch.tgz Josh Finlay, 01/21/2015 11:37 PM
diag_arp.php.diff (1.33 KB) diag_arp.php.diff Josh Finlay, 01/22/2015 12:20 AM

History

#1 Updated by Josh Finlay over 4 years ago

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

#2 Updated by Chris Buechler over 4 years ago

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.

#3 Updated by Josh Finlay over 4 years ago

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

#4 Updated by Josh Finlay over 4 years ago

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

Also available in: Atom PDF