Disconnect via NetworkManager should send DHCPRELEASE when applicable
mathieu.tl at gmail.com
Wed May 11 09:52:25 UTC 2011
On Wed, May 11, 2011 at 9:10 AM, Thomas Novin <thomas at xyz.pp.se> wrote:
> I think NetworkManager should send a DHCPRELEASE when the user chooses
> disconnect on a DHCP-connection.
> This is important when using a service that only allows one IP, then the
> MAC/IP-combo is locked for whatever the DHCP lease-time is. Sending a
> DHCPRELEASE frees up the lease making the service available for another
> Any reason why not to do this? Should I file a Launchpad bug?
I'm not sure if there is a specific reason. However, seems to me like
this would need careful consideration, given that what we usually want
is for NM to retain IP addresses at least on wired, if it gets
shutdown (e.g. the daemon is stopped or killed, etc.). Then you get
into the question of how to deal with differenciating a
user-initiatied *disconnect* rather than a shutdown of the daemon.
You'll also get into the cases where you really want to disconnect for
whatever reason, but want/need to retain your IP if possible. I think
this is the most likely use case.
I think this would probably be better served in your case by a
dispatcher script: you can drop files in
/etc/NetworkManager/dispatcher.d to have them run on various events;
just take a look at 01ifupdown for inspiration; you should easily be
able to do something like 'dhclient -r' from there to achieve the same
Otherwise, I guess you might want to ask on the NetworkManager list,
which would be better suited for this kind of targetted question about
Mathieu Trudel-Lapierre <mathieu.tl at gmail.com>
Freenode: cyphermox, Jabber: mathieu.tl at gmail.com
4096R/EE018C93 1967 8F7D 03A1 8F38 732E FF82 C126 33E1 EE01 8C93
More information about the Ubuntu-devel-discuss