buglwIP - A Lightweight TCP/IP stack - Bugs: bug #48510, DHCP requires ARP

 
 

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

bug #48510: DHCP requires ARP

Submitter:  Jens Nielsen <deft>
Submitted:  Thu 14 Jul 2016 09:31:19 AM UTC
   
 
Category:  DHCP Severity:  3 - Normal
Item Group:  Faulty Behaviour Status:  Fixed
Privacy:  Public Assigned to:  None
Open/Closed:  Closed Planned Release:  None
lwIP version:  git head

Tue 19 Jul 2016 07:10:46 AM UTC, comment #1: 

Fixed, thank you!

Dirk Ziegelmeier <dziegel>
Group administrator
Thu 14 Jul 2016 09:31:19 AM UTC, original submission:  

Correct me if I'm wrong but there's a snippet in dhcp_start() that unnecessarily rejects all netif's without ARP


  /* check hwtype of the netif */
  if ((netif->flags & NETIF_FLAG_ETHARP) == 0) {
    LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_start(): No ETHARP netif\n"));
    return ERR_ARG;
  }


I have a non-ethernet interface which may require DHCP (USB MBIM profile), I have never seen this actually happen but I would still like to implement it.

I suggest two options:
Patch 1: Surround the check with #if DHCP_DOES_ARP_CHECK
Patch 2: Remove the check and only do the check if the netif has NETIF_FLAG_ETHARP.

Option 2 would allow my netif to coexist with an ethernet one but I guess it makes the code more confusing and maybe not worth it for a corner case.

I haven't been able to test this properly since I don't really have a non-ethernet dhcp setup but I can put some effort into it unless someone knows something I don't and/or think this is a bad idea...

Jens Nielsen <deft>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files
file #37870:  dhcp_arp_1.patch added by deft (1004B - application/octet-stream)
file #37871:  dhcp_arp_2.patch added by deft (2KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by dziegel (Posted a comment)
  • -email is unavailable- added by deft (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-07-19 dziegel StatusNone Fixed
        Open/ClosedOpen Closed
    2016-07-14 deft Attached File- Added dhcp_arp_1.patch, #37870
        Attached File- Added dhcp_arp_2.patch, #37871

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code