buglwIP - A Lightweight TCP/IP stack - Bugs: bug #22804, dhcp_stop doesn't clear...

 
 

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

bug #22804: dhcp_stop doesn't clear NETIF_FLAG_DHCP

Submitter:  Bill Auerbach <billauerbach>
Submitted:  Tue 01 Apr 2008 06:06:40 PM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  Faulty Behaviour Status:  Fixed
Privacy:  Public Assigned to:  None
Open/Closed:  Closed Planned Release:  None
lwIP version:  None

Jump to the original submission

Tue 15 Apr 2008 05:25:13 PM UTC, comment #8: 

OK, done. Thanks for reporting!

Simon Goldschmidt <goldsimon>
Group administrator
Tue 15 Apr 2008 09:55:29 AM UTC, comment #7: 

Ok for me

Frédéric Bernon <fbernon>
Group Member
Mon 14 Apr 2008 08:56:14 PM UTC, comment #6: 

I think your comment #4 is right.

Jonathan Larmour <jifl>
Group Member
Mon 14 Apr 2008 07:12:46 PM UTC, comment #5: 

Jonathan, Kieran, Frédéric (or any other active developer), what do you think about this?

Simon Goldschmidt <goldsimon>
Group administrator
Tue 01 Apr 2008 07:39:02 PM UTC, comment #4: 


> Well then, dhcp_stop doesn't clear this flag but should


Well, then I'll change the topic of this bug accordingly (and reopen the bug) and we'll see what the others have to say.

Personally, I agree with you: dhcp_start sets this bit, so dhcp_stop should clear it!

Simon Goldschmidt <goldsimon>
Group administrator
Tue 01 Apr 2008 07:19:09 PM UTC, comment #3: 

Well then, dhcp_stop doesn't clear this flag but should.  dhcp_stop means don't handle this netif by DHCP, but the flag is left saying it is.  If I tell it to stop and set a manual IP address, it shouldn't still be set, right?

To make more sense, what my broadcast UDP packet returns is a DHCP enabled flag (since it can be set by the user to be used or not).  It returns if the IP address is DHCP assigned or not (because if there is no DHCP response after 5 seconds I fallback to a user-defined static IP address).  If this flags follows dhcp_start and dhcp_stop, then the data I return to PC program is correct by using this flag.  I know if DHCP isn't being used that it must be a static IP address.  If it is used, I can tell if DHCP got an IP address or I had to fallback.

Bill Auerbach <billauerbach>
Tue 01 Apr 2008 07:00:26 PM UTC, comment #2: 

Hehe, just wanted to write the same as Frédéric (somehow, that email didn't come through to me yet).

Call dhcp_stop() before setting a manual IP.

(FYI: netif_set_ipaddr() is called by the DHCP code, also!)

Simon Goldschmidt <goldsimon>
Group administrator
Tue 01 Apr 2008 06:20:03 PM UTC, comment #1: 

To my point of view, it's invalid, since the flag is used to say to lwIP that this netif should be handle by DHCP, and not the current DHCP state. So, this is not to netif_set_ipaddr to clear the flag, but to your port.

Frédéric Bernon <fbernon>
Group Member
Tue 01 Apr 2008 06:06:40 PM UTC, original submission:  

netif_set_ipaddr should include:

netif->flags &= ~NETIF_FLAG_DHCP;

because the IP address is no longer set by DHCP if changed.

Bill Auerbach <billauerbach>

 

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

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by jifl (Posted a comment)
  • -email is unavailable- added by goldsimon (Posted a comment)
  • -email is unavailable- added by fbernon (Posted a comment)
  • -email is unavailable- added by billauerbach (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 7 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2008-04-15 goldsimon StatusNone Fixed
        Open/ClosedOpen Closed
    2008-04-01 goldsimon StatusInvalid None
        Open/ClosedClosed Open
        Summarynetif_set_ipaddr doesn\'t clear NETIF_FLAG_DHCP dhcp_stop doesn't clear NETIF_FLAG_DHCP
    2008-04-01 goldsimon StatusNone Invalid
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-caa5.
    Corresponding source code