[ previous ] [ next ] [ threads ]
 From:  Pierre Nast <pierre at coldev dot org>
 To:  m0n0wall dash dev at lists dot m0n0 dot ch
 Subject:  [patch] fixing WAN interface display errors
 Date:  Fri, 06 Dec 2013 16:55:28 +0100

While browsing the forum, I came across a topic named "1.8.0b515 WAN 
interface Display errors" [1]. As the topic had not been marked as 
solved, I tried to reproduce the reported behavior on my m0n0wall box.
As I was able to confirm the error, I looked at the 
webgui/status_interfaces.php file.

 From line 101 to line 116, the associative array ifinfo is filled with 
the output of the netstat command.
There's a test on line 101 that handles interfaces that have no MAC 
address, like a  WAN interface using a modem, or a tunnel.
The issue here is that a wan interface using PPPOE does not have a MAC 
address, neither does a WAN interface using PPTP (as far as I know).
Thus, the test on line 101 should take care of every cases where the WAN 
interface does not have a MAC address.

Beside, I could not find a reason why errors,  drops, and collisions 
would not be available for WAN interface using a modem. The netstat 
command do report them, as far as I know.

Thus, I wrote a patch that:

- fixes the display errors
- adds display of packets errors whatever the interface's type is

I've attached the patch so that it may be reviewed by others before I 
commit it.

Have a nice day.

[1] http://forum.m0n0.ch/index.php/topic,5777.0.html

status_interfaces.patch (0.8 KB, text/x-patch)