buglwIP - A Lightweight TCP/IP stack - Bugs: bug #34682, Limit ARP request flood for...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #34682: Limit ARP request flood for unresolved entry

Submitted by:  Amir Shalem <amirshalem>
Submitted on:  Sat 29 Oct 2011 08:55:36 AM UTC  
 
Category: ARPSeverity: 3 - Normal
Item Group: Faulty BehaviourStatus: Fixed
Privacy: PublicAssigned to: Simon Goldschmidt <goldsimon>
Open/Closed: ClosedPlanned Release: None
lwIP version: CVS Head

Sat 22 Feb 2014 08:23:35 PM UTC, comment #4:

Finally committed, thanks for the patch!

Simon Goldschmidt <goldsimon>
Project AdministratorIn charge of this item.
Thu 24 Nov 2011 08:40:40 PM UTC, comment #3:

1. If etharp_request() there's nothing to do, it will be expired after timeout.

2. I would recommended not to wait for 1.5.0 for this patch, and push it now. Because without it, there's a possibility for an ARP request flood over the network.

Amir Shalem <amirshalem>
Tue 01 Nov 2011 01:03:37 PM UTC, comment #2:

OK, that makes more sense, thank you.

Could you add some code to handle the case where the call to etharp_request() in etharp_timer() fails? It may be that no action is required here, in which case don't check the return code.

Simon: you outlined your preferred approach on bug34427 comment #2 some time ago, and this seems broadly in line with what you suggested. Any objections?

Kieran Mansley <kieranm>
Project Administrator
Sat 29 Oct 2011 09:15:21 AM UTC, comment #1:

I forgot to mention that the reason I included in my patch two changes:

1. Changing the ARP_TMR_INTERVAL, and fixing all other numbers values (ARP_AGE_REREQUEST_USED, ARP_MAXAGE, ARP_MAXPENDING)

2. Send arp_request() only for new entires, and in arp_tmr()

Is because I wish to maintain the behavior of sending ARP requests every second.
Before this patch this behavior happened because ARP request was sent for every SYN packet.
After this patch every SYN packet will be queue, and ARP request will be sent immediately after the first one, and afterwards it will be sent every second up to ARP_MAXPENDING (=10) seconds.

That's all.

Amir Shalem

Amir Shalem <amirshalem>
Sat 29 Oct 2011 08:55:36 AM UTC, original submission:

If there's an unresolved entry (state=ETHARP_STATE_PENDING) this new code will avoid sending a ARP request for each packet.

It will be limited for ARP_MAXPENDING (=10) seconds, and ARP packet will be sent every ARP_TMR_INTERVAL (1 second).

When entry is unresolved (or expired after ARP_MAXAGE seconds), it wont ARP flood the network anymore.

Patch included, and tested with ARP_QUEUEING enabled and without it.

Amir Shalem

Amir Shalem <amirshalem>

 

Attached Files
file #24238:  limit_arp_request_flood.patch added by amirshalem (5KiB - application/octet-stream - Limit ARP request flood)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by goldsimon (Posted a comment)
  • -unavailable- added by kieranm (Posted a comment)
  • -unavailable- added by amirshalem (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sat 22 Feb 2014 08:23:35 PM UTCgoldsimonStatusNone=>Fixed
      Assigned toNone=>goldsimon
      Open/ClosedOpen=>Closed
    Tue 01 Nov 2011 01:04:15 PM UTCkieranmPlanned Release=>1.5.0
    Sat 29 Oct 2011 08:55:36 AM UTCamirshalemAttached File-=>Added limit_arp_request_flood.patch, #24238

    Back to the top


    Powered by Savane 3.1-cleanup1