Project

General

Profile

Actions

Feature #4038

closed

Button to clear the arp cache

Added by Grischa Zengel almost 10 years ago. Updated almost 4 years ago.

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

100%

Estimated time:
Plus Target Version:
Release Notes:

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

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
Actions #1

Updated by Josh Finlay over 9 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

Actions #2

Updated by Chris Buechler over 9 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.

Actions #3

Updated by Josh Finlay over 9 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

Actions #4

Updated by Josh Finlay over 9 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

Actions #6

Updated by Jim Pingle over 4 years ago

  • Status changed from New to Pull Request Review
Actions #7

Updated by Jim Pingle about 4 years ago

  • Target version set to 2.5.0
Actions #8

Updated by Renato Botelho about 4 years 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!

Actions #9

Updated by Anonymous about 4 years ago

  • Status changed from Feedback to Resolved
Actions #10

Updated by Jim Pingle almost 4 years ago

  • Category changed from Web Interface to Diagnostics
Actions

Also available in: Atom PDF