Project

General

Profile

Feature #4038

Button to clear the arp cache

Added by Grischa Zengel over 6 years ago. Updated 5 months ago.

Status:
Resolved
Priority:
Normal
Category:
Diagnostics
Target version:
Start date:
11/23/2014
Due date:
% Done:

100%

Estimated time:
Release Notes:
Default

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

Associated revisions

Revision 6f3f9671 (diff)
Added by Viktor Gurov 6 months ago

Button to clear the ARP cache. Issue #4038

History

#1 Updated by Josh Finlay about 6 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 about 6 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 about 6 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 about 6 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

#6 Updated by Jim Pingle 11 months ago

  • Status changed from New to Pull Request Review

#7 Updated by Jim Pingle 6 months ago

  • Target version set to 2.5.0

#8 Updated by Renato Botelho 6 months ago

  • Status changed from Pull Request Review to Feedback
  • Assignee set to Renato Botelho
  • % Done changed from 0 to 100

PR has been merged. Thanks!

#9 Updated by Steve Beaver 6 months ago

  • Status changed from Feedback to Resolved

#10 Updated by Jim Pingle 5 months ago

  • Category changed from Web Interface to Diagnostics

Also available in: Atom PDF