lwip-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-devel] [bug #28342] Many unnecessary records in ARP table


From: Martin Persich
Subject: [lwip-devel] [bug #28342] Many unnecessary records in ARP table
Date: Fri, 18 Dec 2009 20:05:46 +0000
User-agent: Mozilla/5.0 (Windows; U; Win98; cs; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6

URL:
  <http://savannah.nongnu.org/bugs/?28342>

                 Summary: Many unnecessary records in ARP table
                 Project: lwIP - A Lightweight TCP/IP stack
            Submitted by: persich
            Submitted on: Fri 18 Dec 2009 08:05:45 PM GMT
                Category: ARP
                Severity: 3 - Normal
              Item Group: Change Request
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release: 
            lwIP version: CVS Head

    _______________________________________________________

Details:

I found full ARP table with 16 items in very short time during my testing of
ARP protocol in my project (Atmel AVR32 UC3A0512). I discovered that in this
table is many unused IP addresses from my LAN. I found that every incoming IP
address in ARP Request Packet from LAN is stored to "arp_table". It is better
if in ARP table is only addresses which is necessary for MCU communication,
not all from LAN, I think. It is reduce MCU utilization, I think.
I found flag "ETHARP_FIND_ONLY" in file "etharp.c" and I made two small
changes:
line #605 in "etharp.c" (Rev 1.153):
old: update_arp_entry(netif, &(iphdr->src), &(ethhdr->src), 0);
new: update_arp_entry(netif, &(iphdr->src), &(ethhdr->src),
ETHARP_FIND_ONLY);
line #702:
old: update_arp_entry(netif, &sipaddr, &(hdr->shwaddr), 0);
new: update_arp_entry(netif, &sipaddr, &(hdr->shwaddr), ETHARP_FIND_ONLY);
With this changes ARP works ok - I think ... :-) - and in ARP table are only
used IP addresses not all LANs.
And one idea. Is it possible move declaration of "struct etharp_entry" and
"enum etharp_state" from "etharp.c" to "etharp.h", remove "static" from
arp_table definition and add declaration of "arp_table" in "etharp.h" for
diagnostics purpose ? There is not semaphore to this structure, I know ... But
for diagnostic it is not necessary, I think.




    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/bugs/?28342>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]