Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/rump_dhcpclient Record address from offer to actuall...



details:   https://anonhg.NetBSD.org/src/rev/270f53817c53
branches:  trunk
changeset: 763242:270f53817c53
user:      pooka <pooka%NetBSD.org@localhost>
date:      Mon Mar 14 23:02:16 2011 +0000

description:
Record address from offer to actually send it as part of the
request.  May fix interaction with some pickier dhcp servers
(like riz's).  Thanks to Jeff for debugging assistance.

diffstat:

 usr.bin/rump_dhcpclient/main.c |  4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diffs (18 lines):

diff -r 31a5e046d225 -r 270f53817c53 usr.bin/rump_dhcpclient/main.c
--- a/usr.bin/rump_dhcpclient/main.c    Mon Mar 14 20:41:25 2011 +0000
+++ b/usr.bin/rump_dhcpclient/main.c    Mon Mar 14 23:02:16 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: main.c,v 1.1 2011/01/20 18:47:20 pooka Exp $   */
+/*     $NetBSD: main.c,v 1.2 2011/03/14 23:02:16 pooka Exp $   */
 
 /*-
  * Copyright (c) 2011 Antti Kantee.  All Rights Reserved.
@@ -204,6 +204,8 @@
 
        ifp->state->offer = xzalloc(sizeof(*ifp->state->offer));
        memcpy(ifp->state->offer, dhcp, sizeof(*ifp->state->offer));
+       ifp->state->lease.addr.s_addr = dhcp->yiaddr;
+       ifp->state->lease.cookie = dhcp->cookie;
        free(raw);
 }
 



Home | Main Index | Thread Index | Old Index