GNOME Bugzilla – Bug 679428
dhcp: do not require dhclient-4.x to be built with DHCPv6
Last modified: 2012-12-27 03:35:22 UTC
(As reported downstream at https://bugs.gentoo.org/show_bug.cgi?id=335147) Currently, NM calls dhclient with the "-6" flag when requesting an ipv6 address, and with the "-4" flag when requesting ipv4. However, if dhclient-4.x was built with --enable-dhcpv6, the "-4" flag is the default behavior, and does not need to be specified manually. And if dhclient-4.x was built with --disable-dhcpv6, the "-4" flag is invalid, and results in an error. So NM should simply never use the "-4" flag when calling dhclient; this will allow it to support dhclient-4.x whether or not it was built with DHCPv6 support.
Created attachment 218067 [details] [review] proposed patch
“And if dhclient-4.x was built with --disable-dhcpv6, the "-4" flag is invalid, and results in an error.” AFAIK this should be fixed in dhclient and not NetworkManager as we are using valid command-line interface.
Information about reporting bugs on dhclient: https://www.isc.org/software/dhcp/news
I'd agree that it should be fixed upstream in dhclient, but if they really, really don't want to do that, I'm open to taking the proposed patch.
Changed my mind after speaking with Michal Hrušecký and Amy Winston. When -4 is redundant anyway, and as I have no information that dhclient would be changing its default, it might be safe to remove the -4 flag and make life easier to those distributions. I don't have a strong opinion on this in any direction. Patch here: http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/net-misc/networkmanager/files/networkmanager-0.9.4.0-dhclient-ipv6.patch?view=markup
Added to 'pavlix/dhcp' and will be merged eventually.
a52fba46fecd214ad1ae3378c44328565240776a