Re: [PATCH 2/3] Make udhcpc continuously retry getting a lease until dhcp_timeout.

2011-01-07 Thread Ferenc Wagner
Matthew Palmer mpal...@debian.org writes:

 On Thu, Jan 06, 2011 at 09:32:02PM +0100, Ferenc Wagner wrote:
 
 Signed-off-by: Ferenc Wagner wf...@niif.hu
 ---
  packages/netcfg/dhcp.c |   10 --
  1 files changed, 8 insertions(+), 2 deletions(-)
 
 diff --git a/packages/netcfg/dhcp.c b/packages/netcfg/dhcp.c
 index f706c5c..385799b 100644

 I've reviewed and tested this patch, and it looks good.  I tested it by
 running a DHCP install with the DHCP server off, and then starting it when
 the progress bar was at around 50%.  Without the patch applied, DHCP failed
 and I was asked to manually configure the network.  With the patch applied,
 udhcpc quickly found the DHCP server and we were away.  Dumping the traffic
 with tcpdump also showed a lot more DHCP requests flying around.

Thanks for the review and the testing!

 I'd recommend this patch be applied before the Squeeze release, as there are
 a number of bugs related to DHCP timeouts, as Ferenc mentions.  I'm not sure
 that the other patches should be applied pre-Squeeze; the cleanups involved
 are minor.

Yes, they don't even influence the object code I suppose.  I included
the first only because the next part touched that line anyway, so it
would feel silly to leave the mistake in place.

 Otavio, any objection to me committing this patch to SVN?  (I'm assuming
 that Ferenc doesn't have SVN commit access...)

Correct. :)
-- 
Thanks,
Feri.


-- 
To UNSUBSCRIBE, email to debian-boot-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/87fwt52dpj@tac.ki.iif.hu



Re: [PATCH 2/3] Make udhcpc continuously retry getting a lease until dhcp_timeout.

2011-01-07 Thread Julien Cristau
On Fri, Jan  7, 2011 at 14:58:58 +1100, Matthew Palmer wrote:

 I'd recommend this patch be applied before the Squeeze release, as there are
 a number of bugs related to DHCP timeouts, as Ferenc mentions.  I'm not sure
 that the other patches should be applied pre-Squeeze; the cleanups involved
 are minor.
 
I'm not sure about squeeze r0, I guess it depends whether we need a rc2.
But it can probably be included in an installer rebuild for a point
release if it doesn't make r0?

Cheers,
Julien


signature.asc
Description: Digital signature


Re: [PATCH 2/3] Make udhcpc continuously retry getting a lease until dhcp_timeout.

2011-01-07 Thread Otavio Salvador
Hello,

On Fri, Jan 7, 2011 at 01:58, Matthew Palmer mpal...@debian.org wrote:
 I'd recommend this patch be applied before the Squeeze release, as there are
 a number of bugs related to DHCP timeouts, as Ferenc mentions.  I'm not sure
 that the other patches should be applied pre-Squeeze; the cleanups involved
 are minor.

I agree however...

 Otavio, any objection to me committing this patch to SVN?  (I'm assuming
 that Ferenc doesn't have SVN commit access...)  I'm happy to do the upload,
 too, if that's necessary.

At this moment, yes.

Please commit it but don't upload it.

Once rc1 is out, we can try to put it in if we need an rc2 or do it on
Squeeze r1.

-- 
Otavio Salvador                             O.S. Systems
E-mail: ota...@ossystems.com.br  http://www.ossystems.com.br
Mobile: +55 53 9981-7854              http://projetos.ossystems.com.br


--
To UNSUBSCRIBE, email to debian-boot-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/aanlktikfgmptisxk2cb0po1zcku=uwk=7imofadwm...@mail.gmail.com



Re: [PATCH 2/3] Make udhcpc continuously retry getting a lease until dhcp_timeout.

2011-01-07 Thread Matthew Palmer
On Fri, Jan 07, 2011 at 11:34:44AM -0200, Otavio Salvador wrote:
 On Fri, Jan 7, 2011 at 01:58, Matthew Palmer mpal...@debian.org wrote:
  I'd recommend this patch be applied before the Squeeze release, as there are
  a number of bugs related to DHCP timeouts, as Ferenc mentions.  I'm not sure
  that the other patches should be applied pre-Squeeze; the cleanups involved
  are minor.
 
 I agree however...
 
  Otavio, any objection to me committing this patch to SVN?  (I'm assuming
  that Ferenc doesn't have SVN commit access...)  I'm happy to do the upload,
  too, if that's necessary.
 
 At this moment, yes.
 
 Please commit it but don't upload it.

Committed, not uploaded.

Thanks for the patch, Ferenc.  I've also committed your other two patches to
my local d-i git repo, for pushing into SVN once squeeze is out.

- Matt


-- 
To UNSUBSCRIBE, email to debian-boot-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20110107234930.gt2...@hezmatt.org



[PATCH 2/3] Make udhcpc continuously retry getting a lease until dhcp_timeout.

2011-01-06 Thread Ferenc Wagner

Signed-off-by: Ferenc Wagner wf...@niif.hu
---
 packages/netcfg/dhcp.c |   10 --
 1 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/packages/netcfg/dhcp.c b/packages/netcfg/dhcp.c
index f706c5c..385799b 100644
--- a/packages/netcfg/dhcp.c
+++ b/packages/netcfg/dhcp.c
@@ -138,6 +138,7 @@ int start_dhcp_client (struct debconfclient *client, char* 
dhostname)
 int options_count;
 enum { DHCLIENT, PUMP, UDHCPC } dhcp_client;
 int dhcp_seconds;
+char dhcp_seconds_str[16];
 
 if (access(/sbin/dhclient, F_OK) == 0)
dhcp_client = DHCLIENT;
@@ -153,6 +154,7 @@ int start_dhcp_client (struct debconfclient *client, char* 
dhostname)
 
 debconf_get(client, netcfg/dhcp_timeout);
 dhcp_seconds = atoi(client-value);
+snprintf(dhcp_seconds_str, sizeof dhcp_seconds_str, %d, dhcp_seconds-1);
 
 if ((dhcp_pid = fork()) == 0) { /* child */
 /* disassociate from debconf */
@@ -202,10 +204,10 @@ int start_dhcp_client (struct debconfclient *client, 
char* dhostname)
 
 /* Allow space for:
 options: options_count * 2
- params: 5
+ params: 9
hostname: 2
NULL: 1 */
-arguments = malloc((options_count * 2 + 5 + 2 + 1) * sizeof(char 
*));
+arguments = malloc((options_count * 2 + 9 + 2 + 1) * sizeof(char 
*));
 
 /* set the command options */
 options_count = 0;
@@ -214,6 +216,10 @@ int start_dhcp_client (struct debconfclient *client, char* 
dhostname)
 arguments[options_count++] = interface;
 arguments[options_count++] = -V;
 arguments[options_count++] = d-i;
+arguments[options_count++] = -T;
+arguments[options_count++] = 1;
+arguments[options_count++] = -t;
+arguments[options_count++] = dhcp_seconds_str;
 for (ptr = dhclient_request_options_udhcpc; *ptr; ptr++) {
 arguments[options_count++] = -O;
 arguments[options_count++] = *ptr;
-- 
1.7.2.3


-- 
To UNSUBSCRIBE, email to debian-boot-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/f130572ac518a3a277238742c6a7ce31f2d8f807.129433.git.wf...@niif.hu



Re: [PATCH 2/3] Make udhcpc continuously retry getting a lease until dhcp_timeout.

2011-01-06 Thread Matthew Palmer
On Thu, Jan 06, 2011 at 09:32:02PM +0100, Ferenc Wagner wrote:
 
 Signed-off-by: Ferenc Wagner wf...@niif.hu
 ---
  packages/netcfg/dhcp.c |   10 --
  1 files changed, 8 insertions(+), 2 deletions(-)
 
 diff --git a/packages/netcfg/dhcp.c b/packages/netcfg/dhcp.c
 index f706c5c..385799b 100644

I've reviewed and tested this patch, and it looks good.  I tested it by
running a DHCP install with the DHCP server off, and then starting it when
the progress bar was at around 50%.  Without the patch applied, DHCP failed
and I was asked to manually configure the network.  With the patch applied,
udhcpc quickly found the DHCP server and we were away.  Dumping the traffic
with tcpdump also showed a lot more DHCP requests flying around.

I'd recommend this patch be applied before the Squeeze release, as there are
a number of bugs related to DHCP timeouts, as Ferenc mentions.  I'm not sure
that the other patches should be applied pre-Squeeze; the cleanups involved
are minor.

Otavio, any objection to me committing this patch to SVN?  (I'm assuming
that Ferenc doesn't have SVN commit access...)  I'm happy to do the upload,
too, if that's necessary.

- Matt


-- 
To UNSUBSCRIBE, email to debian-boot-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20110107035858.go2...@hezmatt.org