Ticket #488 (reopened Bug report)

Opened 4 months ago

Last modified 2 weeks ago

function arp_get() in firewall.c cannot parse lowercase mac's from /proc/net/arp

Reported by: anonymous Assigned to:
Priority: high Milestone: Gateway 1.1.5
Component: Gateway Keywords:
Cc:

Description

In the case where /proc/net/arp does not list mac's in all caps:

IP address HW type Flags HW address Mask Device 63.99.9.55 0x1 0x2 00:0f:66:21:61:1a * br-wan

function arp_get() in firewall.c fails to return a mac, which in turn causes wifidog to fail to authenticate any users.

Seems as if the error is on this line:

while (!feof(proc) && (fscanf(proc, " %15[0-9.] %*s %*s %17[A-F0-9:] %*s %*s", ip, mac) == 2)) {

This is happening to me on openwrt trunk, same build works fine on any other system where the mac's are listed in all caps.

Attachments

Change History

08/14/08 17:19:53 changed by anonymous

while (!feof(proc) && (fscanf(proc, " %15[0-9.] %*s %*s %17[A-Fa-f0-9:] %*s %*s", ip, mac) == 2)) {

Change the original line to that and it solves the problem.

09/30/08 06:04:39 changed by wichert

  • status changed from new to closed.
  • resolution set to wontfix.

This is a duplicate of #493. I can not find any kernel which lowercases MAC addresses, and I find it very hard to believe that any Linux kernel would change its ABI like that. I checked several ia32 2.6 kernels and an OpenWRT 2.4.30 kernel, all of which have uppercase entries.

Unless you can point us to a kernel that shows this behaviour I'm marking this as wontfix.

09/30/08 09:08:16 changed by anonymous

  • status changed from closed to reopened.
  • resolution deleted.

Please, before you mark it as wontfix, ask in the wifidog mailing list if anyone can point to the source of the problem commented here. If I don't apply this patch, wifidog won't work in openwrt with kernel 2.6.26.5. Maybe is not the kernel, maybe yes. But the truth is we need the patch. Besides it will prevent futures problems of this kind :)

09/30/08 11:25:45 changed by anonymous

11/19/08 01:05:10 changed by femmgeek@yahoo.com

Hello all,

I found a kernel that has lowercase mac addresses in it.... Mac OS X!!! I've been pulling out my hair for 3 hours trying to figure this one out. My authentication fails with the output of mac 00:17 that should be 00:17:f2...


Add/Change #488 (function arp_get() in firewall.c cannot parse lowercase mac's from /proc/net/arp)