Debian Bug report logs - #246621
ifupdown: Please (optionally) stop DHCP clients in such a way that they do not relinquish leases

version graph

Package: ifupdown; Maintainer for ifupdown is Andrew Shadura <andrewsh@debian.org>; Source for ifupdown is src:ifupdown.

Reported by: John Wong <debian@implode.net>

Date: Fri, 30 Apr 2004 02:33:03 UTC

Severity: wishlist

Tags: patch

Merged with 282740

Found in versions 0.6.4-4.8, 0.6.4-42

Reply or subscribe to this bug.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Anthony Towns <ajt@debian.org>:
Bug#246621; Package ifupdown. Full text and rfc822 format available.

Acknowledgement sent to John Wong <debian@implode.net>:
New Bug report received and forwarded. Copy sent to Anthony Towns <ajt@debian.org>. Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: John Wong <debian@implode.net>
To: submit@bugs.debian.org
Subject: ifupdown doesn't retain (non-expired) previous leased IP
Date: Thu, 29 Apr 2004 19:20:32 -0700
Package: ifupdown
Version: 0.6.4-4.8


When I reboot my computer, when the dhcp interface is upped, it always
gets a new IP.  It is as if there is no /var/run/dhclient.eth0.leases
When it comes up, /var/run/dhclient.eth0.leases just has one lease entry.
With the previous version 0.6.4-4.6, /var/lib/dhcp3/dhclient.leases was
used and dhcp3-client does get the that is in the existing lease.  With
0.6.4-4.8, it looks like the leases is placed in /var/run (which may be
purged, but bootclean.sh is not enabled).  

Downgrading to 0.6.4-4.6 goes back to using
/var/lib/dhcp3/dhclient.leases and all is good.

Maybe setting the path to back to /var/lib/dhcp[3] would solve this
problem?

I'm using Debian sid on kernel 2.6.5

John



Merged 196865 246621. Request was from Thomas Hood <jdthood@yahoo.co.uk> to control@bugs.debian.org. Full text and rfc822 format available.

Message sent on to John Wong <debian@implode.net>:
Bug#246621. Full text and rfc822 format available.

Message #10 received at 246621-submitter@bugs.debian.org (full text, mbox):

From: Thomas Hood <jdthood@yahoo.co.uk>
To: 246621-submitter@bugs.debian.org
Subject: merge complaints about not re-using DHCP lease
Date: Fri, 30 Apr 2004 08:35:44 +0200
merge 246621 196865
thanks

Please follow up at #196865.
--
Thomas Hood




Disconnected #196865 from all other report(s). Request was from Thomas Hood <jdthood@yahoo.co.uk> to control@bugs.debian.org. Full text and rfc822 format available.

Tags added: pending Request was from Thomas Hood <jdthood@yahoo.co.uk> to control@bugs.debian.org. Full text and rfc822 format available.

Tags removed: pending Request was from Thomas Hood <jdthood@yahoo.co.uk> to control@bugs.debian.org. Full text and rfc822 format available.

Information stored:
Bug#246621; Package ifupdown. Full text and rfc822 format available.

Acknowledgement sent to Thomas Hood <jdthood@aglu.demon.nl>:
Extra info received and filed, but not forwarded. Full text and rfc822 format available.

Message #21 received at 246621-quiet@bugs.debian.org (full text, mbox):

From: Thomas Hood <jdthood@aglu.demon.nl>
To: 246621-quiet@bugs.debian.org
Subject: Needs
Date: Tue, 04 May 2004 00:48:36 +0200
I would like to track the "don't release the lease" issue here, so
for ease of reference I copy the relevant information over from
#196865, which is marked fixed and will be closed sooner or later.
// Thomas
-------------------------------------------------------------------

Message received at 196865@bugs.debian.org:
Received: (at 196865) by bugs.debian.org; 23 Apr 2004 01:34:02 +0000
>From ron@rjmx.net Thu Apr 22 18:34:02 2004
Return-path: <ron@rjmx.net>
Received: from sccrmhc13.comcast.net [204.127.202.64] 
	by spohr.debian.org with esmtp (Exim 3.35 1 (Debian))
	id 1BGpZq-0004TQ-00; Thu, 22 Apr 2004 18:34:02 -0700
Received: from mail.rjmx.net (rjmx.net[24.218.135.94])
          by comcast.net (sccrmhc13) with ESMTP
          id <2004042301333101600cqnhde>; Fri, 23 Apr 2004 01:33:31 +0000
Received: from khufu.rjmx.net (root@khufu.rjmx.net [192.168.1.2])
	by mail.rjmx.net (8.12.11/8.12.11/Debian-3) with ESMTP id i3N1XHtl006488
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT);
	Thu, 22 Apr 2004 21:33:18 -0400
Received: from khufu.rjmx.net (ron@localhost [127.0.0.1])
	by khufu.rjmx.net (8.12.11/8.12.11/Debian-3) with ESMTP id i3N1XHJg002801
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT);
	Thu, 22 Apr 2004 21:33:17 -0400
Received: (from ron@localhost)
	by khufu.rjmx.net (8.12.11/8.12.11/Debian-3) id i3N1XHq1002800;
	Thu, 22 Apr 2004 21:33:17 -0400
Message-Id: <200404230133.i3N1XHq1002800@khufu.rjmx.net>
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
From: Ron Murray <rjmx@rjmx.net>
To: Debian Bug Tracking System <196865@bugs.debian.org>
Subject: ifupdown: Stopping dhclient3 with -r switch releases current lease
Reply-To: Ron Murray <rjmx@rjmx.net>
X-Mailer: reportbug 2.56
Date: Thu, 22 Apr 2004 21:33:17 -0400
Delivered-To: 196865@bugs.debian.org
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2004_03_25 
	(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Status: No, hits=-7.0 required=4.0 tests=BAYES_00,HAS_PACKAGE 
	autolearn=no version=2.60-bugs.debian.org_2004_03_25
X-Spam-Level: 
X-CrossAssassin-Score: 1

Package: ifupdown
Version: 0.6.4-4.8
Severity: normal
Followup-For: Bug #196865

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


When you use the -r switch to terminate dhclient3, it releases the
current lease. This might be fine for a PPP system, but there are many
situations when it's annoying. For example, my Internet connection is
via cable modem. I have my own domain whose DNS is at Zoneedit. With
the new ifdown script, I'll lose my current IP address if I reboot the
box, and that means going through the hassles of propagating the new
IP address through DNS. I'm sure people will think of other reasons
why this is a bad idea.

If you really must allow for releasing the lease on shutdown, at least
provide a configuration switch somewhere, perhaps in
/etc/network/interfaces, so the rest of us can ignore it.

Note that, according to the dhclient man page, releasing the current
lease on shutdown is not required by the DHCP protocol.

 .....Ron

- -- System Information:
Debian Release: testing/unstable
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i686)
Kernel: Linux 2.6.5-khufu-1
Locale: LANG=C, LC_CTYPE=C

Versions of packages ifupdown depends on:
ii  debconf [debconf-2.0]       1.4.21       Debian configuration management sy
ii  libc6                       2.3.2.ds1-11 GNU C Library: Shared libraries an
ii  net-tools                   1.60-9       The NET-3 networking toolkit

- -- debconf information:
  ifupdown/convert-interfaces: true

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFAiHJditqjxNhsdN4RAlIEAKCTE9pIqaboaGOt8q89HwabcUW1YACeLzm3
Y9GnNL/4+Phzv8r2/wMqb5c=
=9tmL
-----END PGP SIGNATURE-----



________________________________________________________________________
Tags removed: fixed Request was from
"=?iso-8859-1?q?J.D.=20Thomas=20Hood?=" <jdthood@yahoo.co.uk> to
control@bugs.debian.org. Full text available. 
________________________________________________________________________
Changed Bug title. Request was from
"=?iso-8859-1?q?J.D.=20Thomas=20Hood?=" <jdthood@yahoo.co.uk> to
control@bugs.debian.org. Full text available. 
________________________________________________________________________
Severity set to `important'. Request was from
"=?iso-8859-1?q?J.D.=20Thomas=20Hood?=" <jdthood@yahoo.co.uk> to
control@bugs.debian.org. Full text available. 
________________________________________________________________________
Message sent on to Thomas Hood <jdthood@yahoo.co.uk>:
Bug#196865. Full text available. 
________________________________________________________________________
Message received at 196865-submitter@bugs.debian.org:
Received: (at 196865-submitter) by bugs.debian.org; 24 Apr 2004 10:27:24 +0000
>From jdthood@yahoo.co.uk Sat Apr 24 03:27:24 2004
Return-path: <jdthood@yahoo.co.uk>
Received: from post-20.mail.nl.demon.net [194.159.73.1] 
	by spohr.debian.org with esmtp (Exim 3.35 1 (Debian))
	id 1BHKNX-0004PG-00; Sat, 24 Apr 2004 03:27:24 -0700
Received: from [82.161.38.140] (helo=thanatos)
	by post-20.mail.nl.demon.net with esmtp (Exim 3.36 #2)
	id 1BHKNX-000Daz-00
	for 196865-submitter@bugs.debian.org; Sat, 24 Apr 2004 10:27:23 +0000
Received: from localhost (localhost [127.0.0.1])
	by thanatos (Postfix) with ESMTP id 15D6510D66E
	for <196865-submitter@bugs.debian.org>; Sat, 24 Apr 2004 12:27:16 +0200 (CEST)
Subject: What to do?
From: Thomas Hood <jdthood@yahoo.co.uk>
To: 196865-submitter@bugs.debian.org
Content-Type: text/plain
Message-Id: <1082802435.4773.501.camel@localhost>
Mime-Version: 1.0
X-Mailer: Ximian Evolution 1.4.5 
Date: Sat, 24 Apr 2004 12:27:16 +0200
Content-Transfer-Encoding: 7bit
Delivered-To: 196865-submitter@bugs.debian.org
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2004_03_25 
	(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Status: No, hits=-2.0 required=4.0 tests=BAYES_00 autolearn=no 
	version=2.60-bugs.debian.org_2004_03_25
X-Spam-Level: 
X-CrossAssassin-Score: 1

The motivation behind filing #196865 was to stop dhclient in such
a way that the latter would execute its exit hook script.  If we
can't do this by doing "dhclient -r" (because we don't want leases
to be released) then how can we do it?
--
Thomas




________________________________________________________________________
Information forwarded to debian-bugs-dist@lists.debian.org, Anthony
Towns <ajt@debian.org>:
Bug#196865; Package ifupdown. Full text available. 
________________________________________________________________________
Acknowledgement sent to rjmx@rjmx.net:
Extra info received and forwarded to list. Copy sent to Anthony Towns
<ajt@debian.org>. Full text available. 
________________________________________________________________________
Message received at 196865@bugs.debian.org:
Received: (at 196865) by bugs.debian.org; 25 Apr 2004 13:00:09 +0000
>From rjmx@rjmx.net Sun Apr 25 06:00:09 2004
Return-path: <rjmx@rjmx.net>
Received: from rwcrmhc11.comcast.net [204.127.198.35] 
	by spohr.debian.org with esmtp (Exim 3.35 1 (Debian))
	id 1BHjEv-0001ss-00; Sun, 25 Apr 2004 06:00:09 -0700
Received: from mail.rjmx.net (rjmx.net[24.218.135.94])
          by comcast.net (rwcrmhc11) with ESMTP
          id <20040425125938013004mbcpe>; Sun, 25 Apr 2004 12:59:38 +0000
Received: from rjmx.net (ron@khufu.rjmx.net [192.168.1.2])
	by mail.rjmx.net (8.12.11/8.12.11/Debian-3) with ESMTP id i3PCxDYB023543
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT)
	for <196865@bugs.debian.org>; Sun, 25 Apr 2004 08:59:14 -0400
Message-ID: <408BB620.2070404@rjmx.net>
Date: Sun, 25 Apr 2004 08:59:12 -0400
From: Ron Murray <rjmx@rjmx.net>
Reply-To: rjmx@rjmx.net
User-Agent: Mozilla Thunderbird 0.5 (X11/20040306)
X-Accept-Language: en-us, en
MIME-Version: 1.0
To: 196865@bugs.debian.org
Subject: Re: #196865
References: <1082884472.1605.23.camel@localhost>
In-Reply-To: <1082884472.1605.23.camel@localhost>
X-Enigmail-Version: 0.83.2.0
X-Enigmail-Supports: pgp-inline, pgp-mime
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
Delivered-To: 196865@bugs.debian.org
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2004_03_25 
	(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Status: No, hits=0.7 required=4.0 tests=BAYES_00,SUBJ_HAS_UNIQ_ID 
	autolearn=no version=2.60-bugs.debian.org_2004_03_25
X-Spam-Level: 
X-CrossAssassin-Score: 1

Thomas Hood wrote:
> Thanks for the bug report.
> 
> The motivation behind filing #196865 was to stop dhclient in such
> a way that the latter would execute its exit hook script.  If we
> can't do this by doing "dhclient -r" (because we don't want leases
> to be released) then how can we do it?
> --
> Thomas
> 

Hi.

    I've done some thinking about this one. I think what's really needed 
is a switch (I'd say -q, but it's already taken) to tell dhclient to 
stop, running its exit hooks, but not drop the lease. I've always 
thought there should be one anyway; having to stop it by sending a kill 
always seemed a little weird to me.

    So we need a volunteer to add it. Unless we can persuade upstream to 
do it, of course. I'd be prepared to look into it if everyone thinks 
it's a good idea.

  .....Ron


-- 
Ron Murray   (rjmx@rjmx.net)
http://www.rjmx.net/~ron
GPG Public Key Fingerprint: F2C1 FC47 5EF7 0317 133C  D66B 8ADA A3C4 
D86C 74DE



________________________________________________________________________
Information stored:
Bug#196865; Package ifupdown. Full text available. 
________________________________________________________________________
Acknowledgement sent to Thomas Hood <jdthood@yahoo.co.uk>:
Extra info received and filed, but not forwarded. Full text available. 
________________________________________________________________________
Message received at 196865-quiet@bugs.debian.org:
Received: (at 196865-quiet) by bugs.debian.org; 25 Apr 2004 15:40:49 +0000
>From jdthood@yahoo.co.uk Sun Apr 25 08:40:49 2004
Return-path: <jdthood@yahoo.co.uk>
Received: from post-20.mail.nl.demon.net [194.159.73.1] 
	by spohr.debian.org with esmtp (Exim 3.35 1 (Debian))
	id 1BHlkP-00011Z-00; Sun, 25 Apr 2004 08:40:49 -0700
Received: from [82.161.38.140] (helo=thanatos)
	by post-20.mail.nl.demon.net with esmtp (Exim 3.36 #2)
	id 1BHlkN-000HUX-00; Sun, 25 Apr 2004 15:40:47 +0000
Received: from localhost (localhost [127.0.0.1])
	by thanatos (Postfix) with ESMTP
	id 7292010D6A5; Sun, 25 Apr 2004 17:40:46 +0200 (CEST)
Subject: Re: Bug#196865: #196865
From: Thomas Hood <jdthood@yahoo.co.uk>
To: rjmx@rjmx.net, 196865-quiet@bugs.debian.org
In-Reply-To: <408BB620.2070404@rjmx.net>
References: <1082884472.1605.23.camel@localhost> <408BB620.2070404@rjmx.net>
Content-Type: text/plain
Message-Id: <1082907646.1603.88.camel@localhost>
Mime-Version: 1.0
X-Mailer: Ximian Evolution 1.4.5 
Date: Sun, 25 Apr 2004 17:40:46 +0200
Content-Transfer-Encoding: 7bit
Delivered-To: 196865-quiet@bugs.debian.org
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2004_03_25 
	(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Status: No, hits=-2.3 required=4.0 tests=BAYES_00,HAS_BUG_NUMBER,
	SUBJ_HAS_UNIQ_ID autolearn=no version=2.60-bugs.debian.org_2004_03_25
X-Spam-Level: 
X-CrossAssassin-Score: 1

On Sun, 2004-04-25 at 14:59, Ron Murray wrote:
>     I've done some thinking about this one. I think what's really needed 
> is a switch (I'd say -q, but it's already taken) to tell dhclient to 
> stop, running its exit hooks, but not drop the lease. I've always 
> thought there should be one anyway; having to stop it by sending a kill 
> always seemed a little weird to me.
> 
>     So we need a volunteer to add it. Unless we can persuade upstream to 
> do it, of course. I'd be prepared to look into it if everyone thinks 
> it's a good idea.

What would happen if ifdown merely "paused" the client in the sense
of the word 'pause' used in the "THE CONTROL OBJECT" section of
dhclient3(8)?  According to the man page "this unconfigures any
interfaces the client is using" without releasing the lease.

I have just tried to do this by running the omshell command but I
didn't get anywhere:

    jdthood@thanatos:~$ omshell
    > connect
    dhcpctl_connect: connection refused

I don't know what to do next.
--
Thomas




________________________________________________________________________
Severity set to `normal'. Request was from Thomas Hood
<jdthood@yahoo.co.uk> to control@bugs.debian.org. Full text available. 
________________________________________________________________________
Information stored:
Bug#196865; Package ifupdown. Full text available. 
________________________________________________________________________
Acknowledgement sent to rjmx@rjmx.net:
Extra info received and filed, but not forwarded. Full text available. 
________________________________________________________________________
Message received at 196865-quiet@bugs.debian.org:
Received: (at 196865-quiet) by bugs.debian.org; 26 Apr 2004 20:19:42 +0000
>From rjmx@rjmx.net Mon Apr 26 13:19:23 2004
Return-path: <rjmx@rjmx.net>
Received: from rwcrmhc12.comcast.net [216.148.227.85] 
	by spohr.debian.org with esmtp (Exim 3.35 1 (Debian))
	id 1BICZV-00033t-00; Mon, 26 Apr 2004 13:19:21 -0700
Received: from mail.rjmx.net (rjmx.net[24.218.135.94])
          by comcast.net (rwcrmhc12) with ESMTP
          id <2004042620185001400i8335e>; Mon, 26 Apr 2004 20:18:50 +0000
Received: from khufu.rjmx.net.rjmx.net (ron@khufu.rjmx.net [192.168.1.2])
	by mail.rjmx.net (8.12.11/8.12.11/Debian-3) with ESMTP id i3QKIT3j015864;
	Mon, 26 Apr 2004 16:18:29 -0400
Date: Mon, 26 Apr 2004 16:18:29 -0400
Message-ID: <8765bmlch6.wl%rjmx@rjmx.net>
From: Ron Murray <rjmx@rjmx.net>
To: Thomas Hood <jdthood@yahoo.co.uk>
Cc: 196865-quiet@bugs.debian.org
Subject: Re: Bug#196865: #196865
In-Reply-To: <1082907646.1603.88.camel@localhost>
References: <1082884472.1605.23.camel@localhost>
	<408BB620.2070404@rjmx.net>
	<1082907646.1603.88.camel@localhost>
User-Agent: Wanderlust/2.11.24 (Wonderwall) SEMI/1.14.6 (Maruoka) FLIM/1.14.6 (Marutamachi) APEL/10.6 Emacs/21.3 (i386-pc-linux-gnu) MULE/5.0 (SAKAKI)
Reply-To: rjmx@rjmx.net
MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka")
Content-Type: text/plain; charset=US-ASCII
Delivered-To: 196865-quiet@bugs.debian.org
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2004_03_25 
	(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Status: No, hits=-2.3 required=4.0 tests=BAYES_00,HAS_BUG_NUMBER,
	SUBJ_HAS_UNIQ_ID autolearn=no version=2.60-bugs.debian.org_2004_03_25
X-Spam-Level: 
X-CrossAssassin-Score: 1

At Sun, 25 Apr 2004 17:40:46 +0200,
Thomas Hood <jdthood@yahoo.co.uk> wrote:
> What would happen if ifdown merely "paused" the client in the sense
> of the word 'pause' used in the "THE CONTROL OBJECT" section of
> dhclient3(8)?  According to the man page "this unconfigures any
> interfaces the client is using" without releasing the lease.
> 
> I have just tried to do this by running the omshell command but I
> didn't get anywhere:
> 
>     jdthood@thanatos:~$ omshell
>     > connect
>     dhcpctl_connect: connection refused
> 
> I don't know what to do next.
> --
> Thomas

   I think you're on the right track. I've done some work with this
today, and although the documentation is very, very poor (read:
nonexistent), I managed to get some results.

First off, you need to have

omapi port <number>;

   in your dhclient.conf. Without this, it doesn't even start up the
omapi interface. You can use an arbitrary port number for <number>;
I'd leave 7911 free in case you want to do the same thing on dhcpd and
I don't know whether they can coexist on the same port or not.

   The dhcpd.conf man page claimed the syntax was 

omapi-port <number>;

   but that didn't work.

Then start up omshell: lines beginning with '>' are entered by the
user:

ron@khufu:~$omshell
> port <number>			# Use the number you set in dhclient.conf
> connect				# Connect to the omapi interface
obj: <null>				# (server response)
> new control			# Create a new control object
obj: control
> open					# Associate it with the client's
obj: control
state = 00:00:00:04		# Server prints current state
> set state = 3			# 3 = suspend
obj: control
state = 3
> update				# Update state

   The above seems to suspend DHCP quite successfully. You can then
try and un-suspend it by setting the state to 4, but this didn't seem
to bring the interface back up. Setting the state to 0 did, however.

   Note that omshell doesn't seem to have any facility for reading
commands from a file. Probably need some kind of "here document"
syntax in the script.


--
Ron Murray   (rjmx@rjmx.net)
http://www.rjmx.net/~ron
GPG Public Key Fingerprint: F2C1 FC47 5EF7 0317 133C  D66B 8ADA A3C4 D86C 74DE



________________________________________________________________________
Information forwarded to debian-bugs-dist@lists.debian.org, Anthony
Towns <ajt@debian.org>:
Bug#196865; Package ifupdown. Full text available. 
________________________________________________________________________
Acknowledgement sent to Thomas Hood <jdthood@yahoo.co.uk>:
Extra info received and forwarded to list. Copy sent to Anthony Towns
<ajt@debian.org>. Full text available. 
________________________________________________________________________
Message received at 196865@bugs.debian.org:
Received: (at 196865) by bugs.debian.org; 29 Apr 2004 14:55:31 +0000
>From jdthood@yahoo.co.uk Thu Apr 29 07:55:31 2004
Return-path: <jdthood@yahoo.co.uk>
Received: from aglu.demon.nl (thanatos) [82.161.38.140] 
	by spohr.debian.org with esmtp (Exim 3.35 1 (Debian))
	id 1BJCwl-0000BM-00; Thu, 29 Apr 2004 07:55:31 -0700
Received: from localhost (localhost [127.0.0.1])
	by thanatos (Postfix) with ESMTP
	id 3DED010D60D; Thu, 29 Apr 2004 16:55:29 +0200 (CEST)
Subject: Re: Bug#196865: #196865
From: Thomas Hood <jdthood@yahoo.co.uk>
To: rjmx@rjmx.net
Cc: 196865@bugs.debian.org
In-Reply-To: <8765bmlch6.wl%rjmx@rjmx.net>
References: <1082884472.1605.23.camel@localhost> <408BB620.2070404@rjmx.net>
	 <1082907646.1603.88.camel@localhost>  <8765bmlch6.wl%rjmx@rjmx.net>
Content-Type: text/plain
Message-Id: <1083250527.3026.105.camel@localhost>
Mime-Version: 1.0
X-Mailer: Ximian Evolution 1.4.5 
Date: Thu, 29 Apr 2004 16:55:28 +0200
Content-Transfer-Encoding: 7bit
Delivered-To: 196865@bugs.debian.org
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2004_03_25 
	(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Status: No, hits=-2.3 required=4.0 tests=BAYES_00,HAS_BUG_NUMBER,
	SUBJ_HAS_UNIQ_ID autolearn=no version=2.60-bugs.debian.org_2004_03_25
X-Spam-Level: 
X-CrossAssassin-Score: 1

On Mon, 2004-04-26 at 22:18, Ron Murray wrote in part:
> > set state = 3			# 3 = suspend
> obj: control
> state = 3
> > update				# Update state
> 
>    The above seems to suspend DHCP quite successfully.

It did for me too.  I put logging commands into dhclient-script
and observed that on transition to state 3 the script gets run
with reason == STOP.  The interface is deconfigured but left
"UP" according to ifconfig.



> You can then try and un-suspend it by setting the state to 4,
> but this didn't seem to bring the interface back up.

It did for me.  The interface was configured again (inet_addr,
Bcast and Mask were assigned the values they had prior to the
suspend)  and the dhclient-script was run with reason == REBOOT.


> Setting the state to 0 did, however.

Setting the state to 0 appeared to do nothing in my case.


>    Note that omshell doesn't seem to have any facility for reading
> commands from a file. Probably need some kind of "here document"
> syntax in the script.

The script appended below (watch out for line wrapping) suspends and
then kills the dhclient3 program given a kernel interface name and
the dhclient process's omapi port as arguments.  It works on my
system (dhcp3-client 3.0+3.0.1rc13-1).  Implementing this idea in
ifup involves, additionally, selecting a different port number for
each instance of dhclient3 and its using that port number to
suspend+kill the daemon as below.
                                                 // Thomas Hood


#!/bin/sh

MYNAME="${0##*/}"
IFACE="$1"
PORT="$2"

report_err() { echo "${MYNAME}: Error: $*" >&2 ; }

read PID crap < /var/run/dhclient.$IFACE.pid
[ "$PID" ] || { report_err "Could not get PID" ; exit 1 ; }

TARG_STATE=3
OMSHELL_CMDS="
port $PORT
connect
new control
open
set state = $TARG_STATE
update
"

echo "$OMSHELL_CMDS" | omshell

start-stop-daemon --stop --pidfile="/var/run/dhclient.$IFACE.pid"
--retry=1 --signal=TERM





________________________________________________________________________
Merged 196865 246621. Request was from Thomas Hood <jdthood@yahoo.co.uk>
to control@bugs.debian.org. Full text available. 
________________________________________________________________________
Disconnected #196865 from all other report(s). Request was from Thomas
Hood <jdthood@yahoo.co.uk> to control@bugs.debian.org. Full text
available. 
________________________________________________________________________
Changed Bug title. Request was from Thomas Hood <jdthood@yahoo.co.uk> to
control@bugs.debian.org. Full text available. 
________________________________________________________________________
Tags added: fixed Request was from Thomas Hood <jdthood@yahoo.co.uk> to
control@bugs.debian.org. Full text available.




Severity set to `wishlist'. Request was from Thomas Hood <jdthood@yahoo.co.uk> to control@bugs.debian.org. Full text and rfc822 format available.

Changed Bug title. Request was from Thomas Hood <jdthood@yahoo.co.uk> to control@bugs.debian.org. Full text and rfc822 format available.

Merged 246621 282740. Request was from Thomas Hood <jdthood@yahoo.co.uk> to control@bugs.debian.org. Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Anthony Towns <ajt@debian.org>:
Bug#246621; Package ifupdown. Full text and rfc822 format available.

Acknowledgement sent to Joachim Nilsson <joachim.nilsson@member.fsf.org>:
Extra info received and forwarded to list. Copy sent to Anthony Towns <ajt@debian.org>. Full text and rfc822 format available.

Message #32 received at 246621@bugs.debian.org (full text, mbox):

From: Joachim Nilsson <joachim.nilsson@member.fsf.org>
To: Debian Bug Tracking System <246621@bugs.debian.org>
Subject: ifupdown: Patch suggestion for dhcp3-client_3.0.1-1
Date: Sun, 13 Feb 2005 02:36:02 +0100
Package: ifupdown
Version: 0.6.4-42
Followup-For: Bug #246621

Attached to this mail is a suggested patch to dhclient that adds
a switch -x that can be used instead of -r when bringing down a
DHCP interface.

The patch makes sure to kill the currently running client and
then goes about its business similar to -r but instead of
relinquishing the lease it merely calls the script with STOP
and then exits.

I know this patch probably belongs tagged to the dhcp3 package,
but since this is the bug I want to have fixed it feels like
the appropriate place.

Let the discussion continue...

Regards
 /Jocke

-- System Information:
Debian Release: 3.1
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i686)
Kernel: Linux 2.6.8-2-k7
Locale: LANG=en_US.ISO-8859-15, LC_CTYPE=en_US.ISO-8859-15 (charmap=ISO-8859-15)

Versions of packages ifupdown depends on:
ii  debconf [debconf-2.0]       1.4.30.11    Debian configuration management sy
ii  libc6                       2.3.2.ds1-20 GNU C Library: Shared libraries an
ii  net-tools                   1.60-10      The NET-3 networking toolkit

-- debconf information excluded



Information forwarded to debian-bugs-dist@lists.debian.org, Anthony Towns <ajt@debian.org>:
Bug#246621; Package ifupdown. Full text and rfc822 format available.

Acknowledgement sent to Thomas Hood <jdthood@aglu.demon.nl>:
Extra info received and forwarded to list. Copy sent to Anthony Towns <ajt@debian.org>. Full text and rfc822 format available.

Message #37 received at 246621@bugs.debian.org (full text, mbox):

From: Thomas Hood <jdthood@aglu.demon.nl>
To: Joachim Nilsson <joachim.nilsson@member.fsf.org>, 246621@bugs.debian.org
Subject: Re: Bug#246621: ifupdown: Patch suggestion for dhcp3-client_3.0.1-1
Date: Sun, 13 Feb 2005 10:11:17 +0100
On Sun, 2005-02-13 at 02:36 +0100, Joachim Nilsson wrote:
> Attached to this mail is a suggested patch to dhclient that adds
> a switch -x that can be used instead of -r when bringing down a
> DHCP interface.


Great!

Please submit your patch in a wish report against dhcp3-client.  In the
report, make reference to #246621 so that the dhcp3-client maintainers
know why this option is wanted.  Write to #246621 again, letting us know
what the number of the new report is.

Also, remember actually to attach the patch.  :)

-- 
Thomas Hood <jdthood@aglu.demon.nl>




Information forwarded to debian-bugs-dist@lists.debian.org, Anthony Towns <ajt@debian.org>:
Bug#246621; Package ifupdown. Full text and rfc822 format available.

Acknowledgement sent to Joachim Nilsson <joachim.nilsson@vmlinux.org>:
Extra info received and forwarded to list. Copy sent to Anthony Towns <ajt@debian.org>. Full text and rfc822 format available.

Message #42 received at 246621@bugs.debian.org (full text, mbox):

From: Joachim Nilsson <joachim.nilsson@vmlinux.org>
To: Thomas Hood <jdthood@aglu.demon.nl>
Cc: Joachim Nilsson <joachim.nilsson@member.fsf.org>, 246621@bugs.debian.org
Subject: Re: Bug#246621: ifupdown: Patch suggestion for dhcp3-client_3.0.1-1
Date: Sun, 13 Feb 2005 14:00:57 +0100
The previously forgotten patch has now been submitted to
dhcp3-client as issue #295064.

Regards
 /Jocke



Information forwarded to debian-bugs-dist@lists.debian.org, Anthony Towns <ajt@debian.org>:
Bug#246621; Package ifupdown. Full text and rfc822 format available.

Acknowledgement sent to Tomas Pospisek <tpo_deb@sourcepole.ch>:
Extra info received and forwarded to list. Copy sent to Anthony Towns <ajt@debian.org>. Full text and rfc822 format available.

Message #47 received at 246621@bugs.debian.org (full text, mbox):

From: Tomas Pospisek <tpo_deb@sourcepole.ch>
To: Debian Bug Tracking System <246621@bugs.debian.org>
Subject: patch for using -x dhclient3 switch when ifdown'ing
Date: Wed, 21 Mar 2007 14:19:57 +0100
Package: ifupdown
Tags: patch
Followup-For: Bug #246621

The attached patch uses the "-x" switch instead of the "-r" switch when
gracefully shutting down the dhclient3 and thus won't DHCPRELEASE the
host's IP.

The attached patch depends on dhcp3-client including the proposed patch
in #295064.

Thanks,
*t

-- System Information:
Debian Release: 3.1
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)
Kernel: Linux 2.6.8-3-686
Locale: LANG=en_US, LC_CTYPE=en_US (charmap=ISO-8859-1)



Information forwarded to debian-bugs-dist@lists.debian.org, Anthony Towns <ajt@debian.org>:
Bug#246621; Package ifupdown. Full text and rfc822 format available.

Acknowledgement sent to Tomas Pospisek <tpo_deb@sourcepole.ch>:
Extra info received and forwarded to list. Copy sent to Anthony Towns <ajt@debian.org>. Full text and rfc822 format available.

Message #52 received at 246621@bugs.debian.org (full text, mbox):

From: Tomas Pospisek <tpo_deb@sourcepole.ch>
To: 246621@bugs.debian.org
Subject: and here's the promised patch
Date: Thu, 22 Mar 2007 14:01:03 +0100 (CET)
[Message part 1 (text/plain, inline)]
see attachement
[ifupdown_0.6.8-0.1~sbb.diff.gz (application/x-gzip, ATTACHMENT)]

Information forwarded to debian-bugs-dist@lists.debian.org, Anthony Towns <ajt@debian.org>:
Bug#246621; Package ifupdown. Full text and rfc822 format available.

Acknowledgement sent to "Tomas Pospisek" <tpo@sourcepole.ch>:
Extra info received and forwarded to list. Copy sent to Anthony Towns <ajt@debian.org>. Full text and rfc822 format available.

Message #57 received at 246621@bugs.debian.org (full text, mbox):

From: "Tomas Pospisek" <tpo@sourcepole.ch>
To: apollock@debian.org
Cc: 415431@bugs.debian.org, 295064@bugs.debian.org, 247812@bugs.debian.org, 246621@bugs.debian.org
Subject: Re: Bug#415431: debian/patches ported to current 3.1.0a3 alpha release plus #295056 patch
Date: Mon, 14 Jan 2008 11:15:38 +0000
Hello Andrew,

On 1/14/2008, "Andrew Pollock" <apollock@debian.org> wrote:

>On Mon, Mar 19, 2007 at 02:32:33PM +0100, Tomas Pospisek wrote:
>> Package: dhcp3-client
>> Version: 3.1.0a3-1~tpo
>> Severity: wishlist
>> Tags: patch
>> 
>> Attached is Debian's ./dhcp3_3.0.4-13.diff.gz ported against the current
>> dhcp alpha release 3.1.0a3, and with the patch from #295056 that 
>> allows gracefully shutting down dhclient without releasing the IP.
>
>#295056 isn't a dhcp3-related bug. The released 3.1.0 allegedly supports
>a -x option to shut down dhclient without releasing the IP.

Oh, my bad. I was really referring to #295064, I apologize. I have
submitted the patch from #295064 upstream and it was integrated. So...

>> The idea here is twofold. For one porting the Debian patch to the
>> upcoming 3.1.0 release will make it easier for the maintainer once the
>> release is out. And having the patch from #295056 ported makes it
>> a) easier to test it, whether it works and hopefully facilitates
>> adoption, since, as described in the bug report, the current behaveour
>> is most annoying.
>> 
>> I have resent all the Debian patches including #295056 upstream, 
>> except for the very Debian specific stuff.
>
>With the upload of 3.1.0-1 to unstable, I'm thinking this bug can be 
>closed now, but I just want to check.

.. yes, it should be possible to close it along with #295064 and #247812
with the upload of 3.1.0. It'd be nice to let #246621 know about the
upload too once it's done.

Thanks for your dhcp support in Debian Andrew!
*t




Information forwarded to debian-bugs-dist@lists.debian.org, Anthony Towns <ajt@debian.org>:
Bug#246621; Package ifupdown. (Mon, 07 Sep 2009 20:24:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Aleksey Midenkov <asm@uezku.kemsu.ru>:
Extra info received and forwarded to list. Copy sent to Anthony Towns <ajt@debian.org>. (Mon, 07 Sep 2009 20:24:03 GMT) Full text and rfc822 format available.

Message #62 received at 246621@bugs.debian.org (full text, mbox):

From: Aleksey Midenkov <asm@uezku.kemsu.ru>
To: 246621@bugs.debian.org
Subject: Anybody will fix this?
Date: Tue, 8 Sep 2009 00:28:34 +0400
Hey! What's going on with this bug? Will it be fixed at last? I need to 
mention, that along with not releasing leases on ifdown it is a good thing to 
not renew leases on every ifup.




Information forwarded to debian-bugs-dist@lists.debian.org, Andrew O. Shadura <bugzilla@tut.by>:
Bug#246621; Package ifupdown. (Sun, 29 Apr 2012 03:39:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Andrew Pollock <apollock@debian.org>:
Extra info received and forwarded to list. Copy sent to Andrew O. Shadura <bugzilla@tut.by>. (Sun, 29 Apr 2012 03:39:02 GMT) Full text and rfc822 format available.

Message #67 received at 246621@bugs.debian.org (full text, mbox):

From: Andrew Pollock <apollock@debian.org>
To: 246621@bugs.debian.org
Subject: FYI dhclient supports this now
Date: Sat, 28 Apr 2012 20:22:23 -0700
[Message part 1 (text/plain, inline)]
Hi,

Just wanted to let you know that dhclient now sports a -x option to quit the
client without releasing the lease, so ifupdown could now do something about
this if it wanted to.

regards

Andrew
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Andrew O. Shadura <bugzilla@tut.by>:
Bug#246621; Package ifupdown. (Wed, 02 May 2012 10:03:13 GMT) Full text and rfc822 format available.

Acknowledgement sent to Guillem Jover <guillem@debian.org>:
Extra info received and forwarded to list. Copy sent to Andrew O. Shadura <bugzilla@tut.by>. (Wed, 02 May 2012 10:03:15 GMT) Full text and rfc822 format available.

Message #72 received at 246621@bugs.debian.org (full text, mbox):

From: Guillem Jover <guillem@debian.org>
To: Andrew Pollock <apollock@debian.org>, 246621@bugs.debian.org
Subject: Re: Bug#246621: FYI dhclient supports this now
Date: Wed, 2 May 2012 11:53:02 +0200
[Message part 1 (text/plain, inline)]
tags 246621 patch
thanks

On Sat, 2012-04-28 at 20:22:23 -0700, Andrew Pollock wrote:
> Just wanted to let you know that dhclient now sports a -x option to quit the
> client without releasing the lease, so ifupdown could now do something about
> this if it wanted to.

Here's an untested patch fixing this.

thanks,
guillem
[ifupdown.keep-dhcp-lease.patch (text/x-diff, attachment)]

Added tag(s) patch. Request was from Guillem Jover <guillem@debian.org> to control@bugs.debian.org. (Wed, 02 May 2012 10:03:33 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Andrew O. Shadura <bugzilla@tut.by>:
Bug#246621; Package ifupdown. (Wed, 02 May 2012 12:04:37 GMT) Full text and rfc822 format available.

Acknowledgement sent to Andrew Shadura <bugzilla@tut.by>:
Extra info received and forwarded to list. Copy sent to Andrew O. Shadura <bugzilla@tut.by>. (Wed, 02 May 2012 12:04:50 GMT) Full text and rfc822 format available.

Message #79 received at 246621@bugs.debian.org (full text, mbox):

From: Andrew Shadura <bugzilla@tut.by>
To: Guillem Jover <guillem@debian.org>, 246621@bugs.debian.org
Cc: Andrew Pollock <apollock@debian.org>
Subject: Re: Bug#246621: FYI dhclient supports this now
Date: Wed, 2 May 2012 14:01:43 +0200
[Message part 1 (text/plain, inline)]
Hello,

On Wed, 2 May 2012 11:53:02 +0200
Guillem Jover <guillem@debian.org> wrote:

> On Sat, 2012-04-28 at 20:22:23 -0700, Andrew Pollock wrote:
> > Just wanted to let you know that dhclient now sports a -x option to
> > quit the client without releasing the lease, so ifupdown could now
> > do something about this if it wanted to.

> Here's an untested patch fixing this.

Hi, but what's the rationale of using it in this context? I'd rather
call it in 'up' to kill any already running dhclient so we don't have
two running at the same moment.

-- 
WBR, Andrew
[signature.asc (application/pgp-signature, attachment)]

Information forwarded to debian-bugs-dist@lists.debian.org, Andrew O. Shadura <bugzilla@tut.by>:
Bug#246621; Package ifupdown. (Wed, 02 May 2012 12:11:11 GMT) Full text and rfc822 format available.

Acknowledgement sent to Andrew Shadura <bugzilla@tut.by>:
Extra info received and forwarded to list. Copy sent to Andrew O. Shadura <bugzilla@tut.by>. (Wed, 02 May 2012 12:11:54 GMT) Full text and rfc822 format available.

Message #84 received at 246621@bugs.debian.org (full text, mbox):

From: Andrew Shadura <bugzilla@tut.by>
To: 246621@bugs.debian.org
Cc: Guillem Jover <guillem@debian.org>, Andrew Pollock <apollock@debian.org>
Subject: Re: Bug#246621: FYI dhclient supports this now
Date: Wed, 2 May 2012 14:08:13 +0200
[Message part 1 (text/plain, inline)]
Hello,

On Wed, 2 May 2012 14:01:43 +0200
Andrew Shadura <bugzilla@tut.by> wrote:

> > On Sat, 2012-04-28 at 20:22:23 -0700, Andrew Pollock wrote:
> > > Just wanted to let you know that dhclient now sports a -x option
> > > to quit the client without releasing the lease, so ifupdown could
> > > now do something about this if it wanted to.

> > Here's an untested patch fixing this.

> Hi, but what's the rationale of using it in this context? I'd rather
> call it in 'up' to kill any already running dhclient so we don't have
> two running at the same moment.

Aha, I see now (I've just read the discussion which is here since 2004).
Maybe it's better to make it an optional, but still -r by default? Or
-x is better?

-- 
WBR, Andrew
[signature.asc (application/pgp-signature, attachment)]

Information forwarded to debian-bugs-dist@lists.debian.org, Andrew O. Shadura <bugzilla@tut.by>:
Bug#246621; Package ifupdown. (Sat, 12 May 2012 14:03:24 GMT) Full text and rfc822 format available.

Acknowledgement sent to Guillem Jover <guillem@debian.org>:
Extra info received and forwarded to list. Copy sent to Andrew O. Shadura <bugzilla@tut.by>. (Sat, 12 May 2012 14:03:27 GMT) Full text and rfc822 format available.

Message #89 received at 246621@bugs.debian.org (full text, mbox):

From: Guillem Jover <guillem@debian.org>
To: Andrew Shadura <bugzilla@tut.by>
Cc: 246621@bugs.debian.org, Andrew Pollock <apollock@debian.org>
Subject: Re: Bug#246621: FYI dhclient supports this now
Date: Sat, 12 May 2012 16:01:41 +0200
On Wed, 2012-05-02 at 14:08:13 +0200, Andrew Shadura wrote:
> On Wed, 2 May 2012 14:01:43 +0200 Andrew Shadura <bugzilla@tut.by> wrote:
> > > On Sat, 2012-04-28 at 20:22:23 -0700, Andrew Pollock wrote:
> > > > Just wanted to let you know that dhclient now sports a -x option
> > > > to quit the client without releasing the lease, so ifupdown could
> > > > now do something about this if it wanted to.
> 
> > > Here's an untested patch fixing this.
> 
> > Hi, but what's the rationale of using it in this context? I'd rather
> > call it in 'up' to kill any already running dhclient so we don't have
> > two running at the same moment.
> 
> Aha, I see now (I've just read the discussion which is here since 2004).
> Maybe it's better to make it an optional, but still -r by default? Or
> -x is better?

After seeing #610553 I guess making it an option might ineed seem
better. I'd be happy either way as long as I can make some of my
systems not release the lease ever.

thanks,
guillem




Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Sat Apr 19 08:07:10 2014; Machine Name: buxtehude.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.