Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 335147 - >=net-misc/networkmanager-0.8 needs IPv6-enabled dhclient
Summary: >=net-misc/networkmanager-0.8 needs IPv6-enabled dhclient
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Robert Piasek (RETIRED)
URL:
Whiteboard:
Keywords:
: 387451 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-08-29 18:32 UTC by Victor Mataré
Modified: 2012-07-05 02:35 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
networkmanager-0.8.9997-dhclient_ipv4_fix.patch (networkmanager-0.8.9997-dhclient_ipv4_fix.patch,539 bytes, patch)
2012-04-15 09:44 UTC, Rick Harris
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Victor Mataré 2010-08-29 18:32:25 UTC
As stated in the title. This leads to every wlan connection failing on my system. NetworkManager calls dhclient with the -4 option, which is only supported from dhclient 4.0.0 onwards (which is masked atm). This may be worth an upstream bug, but I think the ebuild should reflect the current state.

Reproducible: Always

Steps to Reproduce:
Comment 1 Mu Qiao (RETIRED) gentoo-dev 2010-09-01 02:16:24 UTC
(In reply to comment #0)
> As stated in the title. This leads to every wlan connection failing on my
> system. NetworkManager calls dhclient with the -4 option, which is only
> supported from dhclient 4.0.0 onwards (which is masked atm). This may be worth
> an upstream bug, but I think the ebuild should reflect the current state.
> 
> Reproducible: Always
> 
> Steps to Reproduce:
> 

I've checked NM's source code and I think NM supports -6 option. So I'd suggest making sure that your connection has enabled IPv6.
Comment 2 Robert Piasek (RETIRED) gentoo-dev 2010-09-01 20:24:25 UTC
Which NM version are you using?

Can you reproduce your problem with 0.8.1-r6?
Comment 3 Victor Mataré 2010-09-03 00:38:21 UTC
(In reply to comment #2)
> Which NM version are you using?
> 
> Can you reproduce your problem with 0.8.1-r6?
> 
yes, that's the version I'm using. It calls dhclient unconditionally with the -4 option, which doesn't exist (and leads to an error) in =dhcp-3.*. Unmasking =dhcp-4.* (and enabling ipv6 on it) fixes the problem.
Comment 4 Victor Mataré 2010-09-03 00:47:58 UTC
(In reply to comment #1)
> (In reply to comment #0)
> > As stated in the title. This leads to every wlan connection failing on my
> > system. NetworkManager calls dhclient with the -4 option, which is only
> > supported from dhclient 4.0.0 onwards (which is masked atm). This may be worth
> > an upstream bug, but I think the ebuild should reflect the current state.
> > 
> > Reproducible: Always
> > 
> > Steps to Reproduce:
> > 
> 
> I've checked NM's source code and I think NM supports -6 option. So I'd suggest
> making sure that your connection has enabled IPv6.
> 

This has nothing to do with "the connection". (what's "connection" supposed to mean in this context, anyway?)
dhclient < 4.0 has neither the -4, nor the -6 option, and dhclient >= 4.0 only has them when ipv6 is enabled in configure. So the networkmanager-0.8* ebuilds should depend on >=dhcp-4.0[ipv6]. Plus NM should be fixed. I might see about that next week.
Comment 5 Robert Piasek (RETIRED) gentoo-dev 2010-09-08 14:57:08 UTC
Networkmanager 0.8.1-r6 detects DHCP client version during configure. If you have dhclient4 installed, it will build support for it and supply -4 option to dhclient. If you have dhclient3, it will disable DHCPv6 and build with version 3 support - which won't pass -4 to dhclient.

From your descriptions, it looks like you had dhclient4 installed during NM build and downgraded it to dhclient3 later on.

Because it's runtime dependency, NM doesn't link against dhclient libraries, so revdep-rebuild won't pick it up.
Please rebuild NM - it should build against your current version of dhclient. That should fix your problem.

Comment 6 Rick Harris 2011-05-09 02:44:43 UTC
(In reply to comment #5)
> Networkmanager 0.8.1-r6 detects DHCP client version during configure. If you
> have dhclient4 installed, it will build support for it and supply -4 option to
> dhclient. If you have dhclient3, it will disable DHCPv6 and build with version
> 3 support - which won't pass -4 to dhclient.

> From your descriptions, it looks like you had dhclient4 installed during NM
> build and downgraded it to dhclient3 later on.

> Because it's runtime dependency, NM doesn't link against dhclient libraries, so
> revdep-rebuild won't pick it up.
> Please rebuild NM - it should build against your current version of dhclient.
> That should fix your problem.

Nevertheless the problem still remains that for networkmanager to work with dhcp-4, then net-misc/dhcp-4 needs to be built with 'ipv6' enabled.

We should patch out the '-4' command line option for dhclient in networkmanager.
'-4' is the default for dhclient anyway when not specified, and if networkmanager wants '-6' it'll specify it.

The way it stands now, neither of those command line options are present in dhclient if dhcp-4 is compiled with USE="-ipv6", so networkmanager fails when it calls '-4'.

Should be pushed upstream to the networkmanager devs as a bug and point them towards dhclient's manpage.
But we already maintain such a large amount of networkmanager patches to get it to work on Gentoo (around 15 at last count) that one more patch is probably not going to be such a great stretch :)
Comment 7 Rick Harris 2012-04-15 09:44:55 UTC
Created attachment 309017 [details, diff]
networkmanager-0.8.9997-dhclient_ipv4_fix.patch

This patch applies to all networkmanager versions from 0.8.9997 to current 0.9.4.0
Comment 8 Alexandre Rostovtsev (RETIRED) gentoo-dev 2012-07-05 02:34:35 UTC
Thanks for the patch! Fixed in 0.9.4.0-r4; patch submitted upstream at https://bugzilla.gnome.org/show_bug.cgi?id=679428

>*networkmanager-0.9.4.0-r4 (05 Jul 2012)
>
>  05 Jul 2012; Alexandre Rostovtsev <tetromino@gentoo.org>
>  +files/10-openrc-status-r2, -networkmanager-0.9.4.0-r3.ebuild,
>  +networkmanager-0.9.4.0-r4.ebuild,
>  +files/networkmanager-0.9.4.0-dhclient-ipv6.patch:
>  Fix the hang in 10-openrc-status that resulted in networkmanager getting
>  marked as 'inactive' on resuming from suspend; many thanks to Travis Hansen
>  for the solution (bugs #410661, #417283). Fix incompatibility with
>  net-misc/dhcp[-ipv6] (bug #335147, thanks to Rick Harris). Move polkit
>  rules.d file to /usr/share (bug #421577 comment #12, thanks to Dennis
>  Lissov).
Comment 9 Alexandre Rostovtsev (RETIRED) gentoo-dev 2012-07-05 02:35:16 UTC
*** Bug 387451 has been marked as a duplicate of this bug. ***