bug-hurd
[Top][All Lists]
Advanced

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

Re: DHCP support


From: Alfred M. Szmidt
Subject: Re: DHCP support
Date: Tue, 04 Jan 2005 15:37:01 +0100

   Here is a patch to make pfinet use 0.0.0.0 as IP address and make
   broadcasting possible when pfinet is started with `--dhcp'.
   Perhaps it would be nice to include this in the Hurd, or just in
   Debian if it is too much of a hack.  I don't want to put too much
   time in it if it is completely wrong.  In that case, just use it
   when you don't care about such things.

Indeed, it is a hack but it isn't really ugly.  But it would still be
nice to see it in the Hurd, and pfinet is a hack anyway.  Roland, what
do you think?

   Alfred promised me to make the dhcp client itself work.  I have
   some hacked stuff around to start with, the only thing that really
   needs to be done is hacking the script to change the ip address,
   etc, when the DHCP server replied.

Will do that when I'm in Uppsala.

Thanks Marco!

   Index: options.c
   ===================================================================
   RCS file: /cvsroot/hurd/hurd/pfinet/options.c,v
   retrieving revision 1.11
   diff -u -p -r1.11 options.c
   --- options.c        18 Jul 2001 16:56:57 -0000      1.11
   +++ options.c        4 Jan 2005 14:18:09 -0000
   @@ -315,6 +330,53 @@ parse_opt (int opt, char *arg, struct ar
             }
          }

   +      /*  Setup the routing required for DHCP. */
   +      if (dhcp_option)
   +    {
   +      struct kern_rta rta;
   +      struct
   +      {
   +        struct nlmsghdr nlh;
   +        struct rtmsg rtm;
   +      } req;
   +      struct fib_table *tb;
   +      struct rtentry route;
   +      struct sockaddr_in *dst;
   +      struct device *dev;
   +
   +      dst = (struct sockaddr_in *) &route.rt_dst;
   +      dev = dev_get ("eth0");

What if I use eth1 instead?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]