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

Submitted by:  Bill Auerbach <billauerbach>
Submitted on:  Tue 01 Apr 2008 06:06:40 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: Faulty BehaviourStatus: Fixed
Privacy: PublicAssigned to: None
Open/Closed: ClosedPlanned Release: None
lwIP version: None

(Jump to the original submission Jump to the original submission)

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

OK, done. Thanks for reporting!

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

Ok for me

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

I think your comment #4 is right.

Jonathan Larmour <jifl>
Project 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>
Project 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>
Project 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>
Project 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>
Project 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>

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 15 Apr 2008 05:25:13 PM UTCgoldsimonStatusNone=>Fixed
      Open/ClosedOpen=>Closed
    Tue 01 Apr 2008 07:39:02 PM UTCgoldsimonStatusInvalid=>None
      Open/ClosedClosed=>Open
      Summarynetif_set_ipaddr doesn\'t clear NETIF_FLAG_DHCP=>dhcp_stop doesn't clear NETIF_FLAG_DHCP
    Tue 01 Apr 2008 07:00:26 PM UTCgoldsimonStatusNone=>Invalid
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1