# network problem after emerge

## c707176

Hi, 

today, I did an update on my gentoo system. After the update and a restart my internet connection was gone. I suspect that the new dhcpcd screwed up my system.

The problem is that I cannot get any ip address anymore.

Do you have any ideas what the problem could be?

Cheers.

----------

## My_World

You need to give us a lot more information than what you just did...

For one, how are you connected to the internet, dial-up, router, share connection, etc?

And then secondly, how is your network set up?

Output of:

```

ifconfig -a

route

cat /etc/resolv.conf

```

That would also be helpful!

 :Razz: 

----------

## astaines

Hi,

I have the same problem (I think)

net-misc/dhcpcd-3.2.3 just emerged

dchp fails completely on my wired and wireless connections, both of which were fine yesterday on two different machines.

I connect to the internet through an ADSL modem/router combo (Netgear Wireless  ADSL Router DG834G) which is still working fine.

Manual network setup is fine - 

/etc/resolv.conf

==Old

```
[was empty]
```

==New

```
nameserver 192.168.0.1 
```

==

/etc/conf.d.net

==Old

```
dns_domain_lo="staines"

config_eth0=("dhcp")

dhcp_eth0="nontp nonis"
```

==New

```
dns_domain_lo="staines"

#config_eth0=("dhcp")

dhcp_eth0="nontp nonis"

# If you don't specify an interface then we prefer iproute2 if it's installed

# To prefer ifconfig over iproute2

modules=( "ifconfig" )

# For a static configuration, use something like this

# (They all do exactly the same thing btw)

#config_eth0=( "192.168.0.2/24" )

#config_eth0=( "192.168.0.2 netmask 255.255.255.0" )

# We can also specify a broadcast

#config_eth0=( "192.168.0.2/24 brd 192.168.0.255" )

config_eth0=( "192.168.0.4 netmask 255.255.255.0 broadcast 192.168.0.255" )

# Here's how to do routing if you need it

routes_eth0=(

       "default via 192.168.0.1"               # IPv4 default route

#       "10.0.0.0/8 via 192.168.0.1"            # IPv4 subnet route

#       "::/0"                                  # IPv6 unicast

)
```

==

(Taken straight from /etc/conf.d/net.example with 192.168.0.4 substituted for 192.168.0.2 in the original)

Any ideas?

Anthony

==

----------

## tekhnofiend

Precisely the same problem here as well. dhcpcd now fails for both my wired and wireless connections after emerging it to the latest version just now. Is there a temporary fix for this via manual configuration to get online (I'm stuck in Windows until then)? Then I can at least roll back to the previous version.

I should add that I tried the manual configuration suggested by astaines but with no success.

----------

## tekhnofiend

So, I rolled back to version dhcpcd-3.1.5-r1 and everything works fine again. I think the problem has something to do with all of the packages between 3.5.1-r1 and 3.2.3 (not including those 2 versions) being masked. Perhaps 3.2.3 should be masked as well? The thing in common with the versions starting with 3.1.6-r1 is the automatically enabled USE flag zeroconf. Perhaps this is bad.

----------

## c707176

Hi, 

rolling back to the version dhcpcd-3.1.5-r1 solved the problem also for me!

I also tried emerging without the useflag zeroconf but got same problems...

Does anybody know how to fix it? Otherwise the new package should be masked and revised before posting it to the Gentoo user community...

Cheers.

----------

## astaines

$ equery l dhcpcd

  net-misc/dhcpcd-3.2.3

add the line 

 *Quote:*   

> =net-misc/dhcpcd-3.2.3

 

to the file /etc/portage/package.mask

```
emerge -C dhcpcd
```

Seems to work now![/code]

----------

## yabs

Same problem here! After emerging version 3.2.3 of dhcpcd I could no longer connect to my ISP. I tried the options -I '' and -L in /etc/conf.d/net.lo, but that did not help.

I resolved it via:

```
emerge --oneshot \<dhcpcd-3.2.3
```

Which lead to the reinstallation of version 3.1.5-r1. After that, all works well!

Cheers.

----------

## UberLord

dhcpcd-3.2 uses BPF style packet filtering that has been available since Linux-2.2

However, it has been broken in the Linux-2.6 kernel from at least .19 and finally fixed again in .24, so upgrade to a less buggy kernel.

----------

## metalus

And how exactly am I supposed to emerge either the kernel or dhcpcd once the network is busted?

----------

## tekhnofiend

The post by astaines worked for me actually, on the manual config that let me access the internet without dhcpcd.

Just be sure to use the right ip addresses everywhere to access your router, etc. if you are using a router, and the manual config should work alright.

Regarding the kernel version stuff, I am using .19 of the Linux-2.6 kernel, so that makes sense then..

----------

## d_m

 *UberLord wrote:*   

> dhcpcd-3.2 uses BPF style packet filtering that has been available since Linux-2.2
> 
> However, it has been broken in the Linux-2.6 kernel from at least .19 and finally fixed again in .24, so upgrade to a less buggy kernel.

 

Just FYI, I am seeing this in a (mostly) vanilla 2.6.24 kernel. The sources are patched with the "mactel" patches (running on an Apple Macbook Pro). I don't think the patches involve networking.

So, maybe this isn't fully fixed in 2.6.24.

I am downgrading to see if this fixes the issue for me (the same one cited... after upgrade dhcpcd basically doesn't work).

EDIT: Strangely, downgrading hasn't fixed this issue yet (although I haven't tried a full reboot). This is definitely confusing.

EDIT2: Ok, so after a reboot, dhcpcd-3.1.5-r1 works fine and I'm getting an IP address. So the downgrade fixed it!

----------

## meron

Just wondering how this made it into stable portage. Not blaming anyone, but I'm just interested.

Now I have to figure out how to downgrade dhcpcd so I can connect to the internet to downgrade dhcpcd.

ah well... all went well for to long. It was about time for something like this...

----------

## meron

I had a quick glance, but i can only find the sources for the new (and problematic) version. Does anyone know where

to find the sources for the older (working) version? 

Putting this in the distfiles dir will probably ensure portage to find and compile it.

----------

## d_m

 *meron wrote:*   

> I had a quick glance, but i can only find the sources for the new (and problematic) version. Does anyone know where
> 
> to find the sources for the older (working) version? 
> 
> Putting this in the distfiles dir will probably ensure portage to find and compile it.

 

The correct way to fix this would be to follow astaines' directions. Just downloading the older sources and putting them in the distfiles dir will definitely not solve your problems.

----------

## meron

astaines fix only masks the package, but i've already installed it and need to install an older version, but emerge will need to download that one, since I recently cleaned by disfiles dir. And downloading is the problem... since that's broken. So I figured downloading it on another pc and putting it in the distfiles dir of my gentoo box, together with astaines fix should work .... or am i missing something??

----------

## d_m

 *meron wrote:*   

> astaines fix only masks the package, but i've already installed it and need to install an older version, but emerge will need to download that one, since I recently cleaned by disfiles dir. And downloading is the problem... since that's broken. So I figured downloading it on another pc and putting it in the distfiles dir of my gentoo box, together with astaines fix should work .... or am i missing something??

 

OK, right. I misunderstood you. Yes, if you mask it and then put the older sources in distfiles, it won't need to be downloaded.

Also, if you can guess an IP address that would work on your network, you could manually use ifconfig to get an IP.

----------

## meron

 *d_m wrote:*   

>  *meron wrote:*   astaines fix only masks the package, but i've already installed it and need to install an older version, but emerge will need to download that one, since I recently cleaned by disfiles dir. And downloading is the problem... since that's broken. So I figured downloading it on another pc and putting it in the distfiles dir of my gentoo box, together with astaines fix should work .... or am i missing something?? 
> 
> OK, right. I misunderstood you. Yes, if you mask it and then put the older sources in distfiles, it won't need to be downloaded.
> 
> Also, if you can guess an IP address that would work on your network, you could manually use ifconfig to get an IP.

 

A fix for those who need it, I used a live-cd to download the files and then used emerge. 

Download the following two files and place them in 

```
/usr/portage/dist-files
```

http://tinderbox.dev.gentoo.org/default-linux/ia64/dhcpcd-3.1.5-r1.tbz2

http://download.berlios.de/dhcpcd/dhcpcd-3.1.5.tar.bz2

then 

```
emerge --oneshot ="dhcpcd-3.1.5-r1"
```

and then restart dhcpcd (I used "dhcpcd - k eth0" and then "dhcpcd eth0", but there's probalby some flag that does it in one go)

----------

