# dhcpcd 3.0.0 doesn't work [SOLVED]

## weaksauce

Anyone else having this problem?  Is it a config issue?  I try to do /etc/init.d/net.eth0 start with it and it just times out without getting an address.  I downgraded to 2.0.8-r3 and it works fine.  Anyone?  I'm on amd64 btw if that matters.Last edited by weaksauce on Thu Nov 30, 2006 6:07 pm; edited 1 time in total

----------

## martinm1000

Yep' and it su*ks. Thanks for that one !   :Evil or Very Mad: 

Its always fun to downgrade... without a *@&#*@ network...

----------

## martinm1000

https://bugs.gentoo.org/show_bug.cgi?id=156515

----------

## Nick C

argh, just spent almost an hour fighting with this bug while installing gentoo again on my laptop!  :Embarassed:   :Evil or Very Mad: 

----------

## mroconnor

I had the issue two nights ago....thought I had too many beers while emerge -vuDN world.

----------

## darkangel92

same problem too.

what did you do to downgrade dhcp ? only dhcp has to be downgraded?

----------

## weaksauce

yeah, just do

```

emerge =net-misc/dhcpcd-2.0.8-r3

```

but you will need to download dhcpcd-2.0.8.tar.gz from somewhere else and put it in /usr/portage/distfiles if you don't already have another one.  This one settles it for me, I'm leaving a backup of 2.0.8 in my /root folder from now on, it's a tiny tarball.

Why is this still in portage?  Does it actually work for some people I guess??

----------

## dencar

This has got to be just about the last straw. What has happened to Gentoo quality control lately? This is just the latest in a series of serious system stuff-ups for which there can be no excuse.

Edit: Thanks, weaksauce, that worked.  :Smile: 

----------

## RazielFMX

I just stuck >net-misc/dhcpcd-2.0.8-r3 in /etc/portage/package.mask...

----------

## UberLord

 *weaksauce wrote:*   

> Why is this still in portage?  Does it actually work for some people I guess??

 

It works on my sparc64/fbsd, x86/linux/fbsd and amd64/linux machines quite happily for around 6 months or so. It also works on quite a few other machines. Sadly your running ~ARCH which means while we expect things to work, there is no guarantee. And dhcpcd-3.0.0 worked well enough for me and some others, so in it went.

Hopefully dhcpcd-3.0.1 out soon should address everyones issues.

----------

## UberLord

If anyone wants to help testing (as obviously based on comments here I suck), you can try the latest snapshot here

http://dev.gentoo.org/~uberlord/dhcpcd-3.0.1_pre3.tar.bz2

And email me or reply here to say it works or not.

----------

## skoff

Took you up on that... the dhcpcd-3.0.1_pre3 release appears to be working fine, :Smile: 

which 3.0.0 definitely wasn't.   :Mad: 

----------

## UberLord

and dhcpcd-3.0.1 is now in portage

Hopefully it works for you guys now  :Smile: 

----------

## RazielFMX

 *UberLord wrote:*   

>  *weaksauce wrote:*   Why is this still in portage?  Does it actually work for some people I guess?? 
> 
> It works on my sparc64/fbsd, x86/linux/fbsd and amd64/linux machines quite happily for around 6 months or so. It also works on quite a few other machines. Sadly your running ~ARCH which means while we expect things to work, there is no guarantee. And dhcpcd-3.0.0 worked well enough for me and some others, so in it went.
> 
> Hopefully dhcpcd-3.0.1 out soon should address everyones issues.

 

Wow, thanks for the reminder.  I totally forgot that I unmasked DHCPCD after the gcc4.1.1 migration (dhcpcd stopped working under gcc4.1, so I had to unmask it to upgrade from 2.05 to 2.0 :Cool: .

.... and if I remove it, it tries to install 2.0.5 again... looks like I'll try 3.0.1.

----------

## ozbird

 *UberLord wrote:*   

> And dhcpcd-3.0.0 worked well enough for me and some others, so in it went.

 

It kinda worked for me, but had weird issues where occasionally it would fail to negotiate a lease, or decided that the lease had expired (which it hadn't.)

Trying 3.0.1 now...    :Shocked: 

----------

## RazielFMX

3.0.1 hates me.  I haven't tried it yet on my home build (x86), but my work amd64 build doesn't work.

```

Nov 30 11:43:11 smbox dhcpcd[4393]: eth0: dhcpcd 3.0.1 starting

Nov 30 11:43:11 smbox dhcpcd[4393]: eth0: ethernet address = 0:14:22:50:6d:36

Nov 30 11:43:11 smbox dhcpcd[4393]: eth0: broadcasting for a lease

Nov 30 11:43:13 smbox tg3: eth0: Link is up at 100 Mbps, full duplex.

Nov 30 11:43:13 smbox tg3: eth0: Flow control is on for TX and on for RX.

Nov 30 11:43:41 smbox dhcpcd[4393]: eth0: timed out

Nov 30 11:43:41 smbox dhcpcd[4393]: eth0: exiting

```

Now, just to make sure it is the code and not my config that is doing this:

```

smbox ~ # cat /etc/conf.d/net

config_eth0=( "dhcp" )

modules=( "dhcpcd" )

dhcpcd_eth0=( "-t 30" )

dns_domain_eth0="REMOVED_FOR_SECURITY_REASONS.com"

```

After I re-emerged my 2.0.8-r3, which can only be recognized as normal by portage by unmasking it in package.keywords and masking anything newer in package.mask, which is crazy, since the 'stable' version doesn't work with the 'stable' gcc version, but I digress.

```

Nov 30 11:45:31 smbox rc-scripts: WARNING:  net.eth0 has not yet been started.

Nov 30 11:45:36 smbox dhcpcd[8170]: MAC address = XX:XX:XX:XX:XX:XX

Nov 30 11:45:38 smbox tg3: eth0: Link is up at 100 Mbps, full duplex.

Nov 30 11:45:38 smbox tg3: eth0: Flow control is on for TX and on for RX.

Nov 30 11:45:40 smbox dhcpcd[8170]: verified XXX.XXX.XXX.XXX address is not in use

Nov 30 11:45:40 smbox dhcpcd[8170]: your IP address = XXX.XXX.XXX.XXX

```

Any ideas?

----------

## weaksauce

well, I just put on 3.0.1 and it works fine, just thought I would put that out there.  But, I am going to keep the 2.0.8 tarball ready, because being without a working dhcp client sucks.... anyway, thanks UberLord.

----------

## sdtester

3.0.1 still wasn't working for me.  After this crude workaround patch for net.lo I got it working:

```
--- net.lo.orig 2006-12-01 11:04:17.000000000 +1100

+++ net.lo      2006-12-01 11:04:22.000000000 +1100

@@ -739,6 +739,8 @@

        einfo "Bringing up ${iface}"

        eindent

        for (( config_counter=0; config_counter<${#config[@]}; config_counter++ )); do

+               einfo "Sleeping"

+               sleep 2

                # Handle null and noop correctly

                if [[ ${config[config_counter]} == "null" \

                        || ${config[config_counter]} == "noop" ]] ; then

```

I had to give it a full 2 seconds for the interface to stablize.  1 wasn't good enough.

----------

## UberLord

For those of you with timeout issues, I think I finally have it solved.

http://dev.gentoo.org/~uberlord/dhcpcd-3.0.2_pre1.tar.bz2

Please test and report back if it works or not.

----------

## lenk

https://bugs.gentoo.org/show_bug.cgi?id=156831

----------

## UberLord

Can you test the above tarball to see if that fixes it?

----------

## RazielFMX

I've never installed outside of portage, how do I use this?

----------

## UberLord

```
cd /tmp

tar xvjpf /where/you/put/the/tarball

cd dhcpcd-3.0.2_pre1

make

killall dhcpcd

cp dhcpcd /sbin

dhcpcd -d eth0
```

Or you could put the tarball in /usr/portage/distfiles and then copy the dhcpcd-3.0.1 ebuild to dhcpcd-3.0.2_pre1.ebuild in /usr/portage/net-misc

----------

## Cloim

3.0.2_pre1 is currently working for me.  

3.0.0 had the timeout issue.  Would occasionally work for short periods.

3.0.1 obtained a connection then quickly lost it. Only tried it one time.

----------

## lenk

3.0.2_pre1 works.

----------

## manny15

net-misc/dhcpcd-3.0.1 didn't work for me. I had to downgrade to 2.0.8-r3. I've had issues with this package in the past, which is why I always use quickpgk to create a backup package prior to upgrading. I do the same with portage, firefox, baselayout, coreutils, Xorg, and python.

----------

## kernelOfTruth

=dhcpcd-3.0.2_pre1 works fine here, thanks UberLord  :Very Happy: 

----------

## UberLord

And dhcpcd-3.0.2 is now in portage.

----------

## lenk

I just love it when maintainer is so efficient. Thanks alot Uberlord. 

ps: Uberlord: Can you have a look at this bug https://bugs.gentoo.org/show_bug.cgi?id=148751 and https://bugs.gentoo.org/show_bug.cgi?id=146268. I know there is a sticky thread on netmount, but all I can read is nonsense and no solution. Please have a look. Thanks

regards,

Lenk

----------

## UberLord

I'm aware of those bugs as I'm on the base-system alias for bugzilla.

However, I've not gotten around to looking at them yet as I've a got a tonne of work to do in other things that I've neglected for a while. dhcpcd was one of them, hence the recent releases of it. dovecot sieve is next on my hitlist, then I'll get back into baselayout stuff.

----------

## sdtester

3.0.2_pre1 has my tick of approval! Well done!

----------

## wynn

The dhcpcd-3.0.2 in portage references linux/if_addr.h which is in /usr/src/linux-2.6.19-gentoo-r1/include/linux but not in /usr/include/linux (linux-headers-2.6.17-r2)

```
i686-pc-linux-gnu-gcc -O2 -march=pentium4 -pipe -c logger.c

interface.c:33:27: error: linux/if_addr.h: No such file or directory
```

```
#ifdef __linux__ 

#include <asm/types.h> /* Needed for 2.4 kernels */

#include <features.h>

#include <linux/if_addr.h>

#include <linux/netlink.h>

#include <linux/rtnetlink.h>

#include <netinet/ether.h>

#include <netpacket/packet.h>

/* Only glibc-2.3 ships with ifaddrs.h */

#if defined (__GLIBC__) && defined (__GLIBC_PREREQ) && __GLIBC_PREREQ (2,3)

#define HAVE_IFADDRS_H

#include <ifaddrs.h>

#endif

#else
```

but

```
$ equery belongs /usr/include/ifaddrs.h

[ Searching for file(s) /usr/include/ifaddrs.h in *... ]

sys-libs/glibc-2.4-r4 (/usr/include/ifaddrs.h)
```

If the line "#include <linux/if_addr.h>" is commented out and

```
#define HAVE_IFADDRS_H

#include <ifaddrs.h>
```

is added, it compiles without any further todo and works here (x86 and x86_64)

----------

## UberLord

 *wynn wrote:*   

> The dhcpcd-3.0.2 in portage references linux/if_addr.h which is in /usr/src/linux-2.6.19-gentoo-r1/include/linux but not in /usr/include/linux (linux-headers-2.6.17-r2)

 

Silly me

I now use a macro on the headers to work out if I can include the file or not. Fixed in cvs, sync up in an hour or so.

----------

## wynn

 *UberLord wrote:*   

> Silly me
> 
> I now use a macro on the headers to work out if I can include the file or not. Fixed in cvs, sync up in an hour or so.

 Of course, I'm only looking at it from the point of view of two machines, both up to date with 2006.1 and running the latest unstable kernel.

You have to consider a much wider range of possibilities. Much more difficult to get right. Up to only 3.0.2 and working, that deserves a pat on the back   :Very Happy: 

----------

## Bornio

With all respect to the developer and my kudos for his effort,

I see no reason why this tool should ever have reached to "~arch". This should, by all means, be hard masked until working out-of-the-box but in a buggy way.

This is, after all, why we have hard masks.

----------

## UberLord

 *Bornio wrote:*   

> This should, by all means, be hard masked until working out-of-the-box but in a buggy way.

 

That's why it went in ~ARCH   :Rolling Eyes: 

~ARCH does not guarantee that it works for everyone.

EDIT: Infact, if you're running ~ARCH right now, then you'll probably be using a 2.6.19 kernel, which currently panics at boot if ipv6 is enabled.

----------

## Wonkey_Donkey

dhcpcd-3.0.3 has just shown up in my portage.

This fails on the MD5 verification.

Using ebuild <foobar> digest fixes that issue, but once merged and rebooted the network fails saying 'No DHCP client installed'

[Edit: I will post a new thread on this, as this one is marked Solved]

[Edit: Scratch that, Uberlord, you posted rather quickly there  :Smile:  ]Last edited by Wonkey_Donkey on Tue Dec 05, 2006 1:51 pm; edited 2 times in total

----------

## UberLord

 *Wonkey_Donkey wrote:*   

> dhcpcd-3.0.3 has just shown up in my portage.
> 
> This fails on the MD5 verification.

 

It's currently being fixed - gotta wait for the mirrors to catch up.

In the meantime, you can download the correct tarball from the master site

http://prdownload.berlios.de/dhcpcd/dhcpcd-3.0.3.tar.bz2

----------

## RazielFMX

Well, I'm late to the party but 3.0.2 worked great on my i686 build and my x86_64 build.

I notice alot of mention of ~ARCH.

I run stable as possible on both my machines.  I had to unmask this as the 'safe' version for both x86 and amd64 is 2.0.5, which does not work under gcc 4.1 or greater.  So, since gcc4 was declared stable, I had to use 'unstable' versions of dhcpcd.  This is not the only software I have had to do this with.  Since 2.0.8-r3 or higher was never marked stable, I can't remove this entry from my package.keywords file.

I thank the developer for his hard work in this matter and continued engineering support in this matter for those of us who have no choice but to use the 'unstable' version of this software so we can connect to the internet.

----------

## asyr

Hi there !

dhcpcd-3.0.5 is not working with wifi !

2.0.8-r3 (that is now removed from portage) and 2.0.5-r1 works great !

Any other with the same problem ?

----------

## UberLord

Can you provide wireshark traces of 2.0.5 working and 3.0.5 not working as it works fine on my wireless cards (of which I have a few)?

Thanks

----------

## asyr

Where to upload the files ?

----------

## UberLord

email them to me at uberlord@gentoo.org

OR open a bug and attach them to it

----------

## asyr

Files e-mailed to your e-mail

----------

## UberLord

 *asyr wrote:*   

> Files e-mailed to your e-mail

 

OK, could you erase the dhcpcd cache and re do the 2.0.5 trace? I need to see it's discover message. Wireshark will have DHCP Discover in the info column for it.

rm /var/lib/dhcpc/*

Thanks

----------

## asyr

Sorry for the delay (it was weekend !)

New file, with DHCP Discover for dhcpcd-2.0.5-r1 emailed.

----------

## UberLord

Please test this patch

http://dev.gentoo.org/~uberlord/dhcpcd-unicast.patch

Another thing that is different is that we send the current hostname, to disable this to emulate the dhcpcd-2.x messages use the option -h '' (two single quotes)

```
dhcpcd_eth0="-h ''"
```

----------

## asyr

dhcpcd -h '' does not work, but the patch it works !

What exactly does the portion of code that removed?

Is this OK to be removed ?

----------

## UberLord

 *asyr wrote:*   

> dhcpcd -h '' does not work, but the patch it works !
> 
> What exactly does the portion of code that removed?
> 
> Is this OK to be removed ?

 

OK, I mis-undertood RFC2131 section 4.1 thanks to the silly table in 4.3.6

I've also checked the source of other DHCP clients and they don't set it either, so it's a safe removal.

Fixed in dhcpcd-3.0.6  :Smile: 

----------

## asyr

Well done !

Now the word [SOLVED] into the title is not meaningless ...

Thanks for the good co-operation !

----------

