summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoy Marples <uberlord@gentoo.org>2005-06-01 15:24:58 +0000
committerRoy Marples <uberlord@gentoo.org>2005-06-01 15:24:58 +0000
commit3f883fe86457b360575cdcaa3ea90a40fbd8fdca (patch)
tree5373aa0a166b5a73234c274607158860cb9af818 /net-misc
parentVersion bump. (diff)
downloadhistorical-3f883fe86457b360575cdcaa3ea90a40fbd8fdca.tar.gz
historical-3f883fe86457b360575cdcaa3ea90a40fbd8fdca.tar.bz2
historical-3f883fe86457b360575cdcaa3ea90a40fbd8fdca.zip
Add route metric option -m - fixes #76694 thanks to Andy Dustman
man page buglet caused by drobbins patch - fixes #78839 Allow dhcpcd to use the FQDN option - fixes #64307 thanks to Kevin F. Quinn Package-Manager: portage-2.0.51.19
Diffstat (limited to 'net-misc')
-rw-r--r--net-misc/dhcpcd/ChangeLog15
-rw-r--r--net-misc/dhcpcd/Manifest22
-rw-r--r--net-misc/dhcpcd/dhcpcd-1.3.22_p4-r8.ebuild69
-rw-r--r--net-misc/dhcpcd/files/dhcpcd-1.3.22_p4-man.patch11
-rw-r--r--net-misc/dhcpcd/files/dhcpcd-1.3.22_p4-optionFQDN.patch530
-rw-r--r--net-misc/dhcpcd/files/dhcpcd-1.3.22_p4-routemetric.patch20
-rw-r--r--net-misc/dhcpcd/files/digest-dhcpcd-1.3.22_p4-r83
-rw-r--r--net-misc/dhcpcd/metadata.xml5
8 files changed, 660 insertions, 15 deletions
diff --git a/net-misc/dhcpcd/ChangeLog b/net-misc/dhcpcd/ChangeLog
index cbe198db5311..41621aab9112 100644
--- a/net-misc/dhcpcd/ChangeLog
+++ b/net-misc/dhcpcd/ChangeLog
@@ -1,6 +1,17 @@
# ChangeLog for net-misc/dhcpcd
-# Copyright 2002-2004 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcpcd/ChangeLog,v 1.40 2004/11/04 18:06:39 vapier Exp $
+# Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcpcd/ChangeLog,v 1.41 2005/06/01 15:24:58 uberlord Exp $
+
+*dhcpcd-1.3.22_p4-r8 (01 Jun 2005)
+
+ 01 Jun 2005; Roy Marples <uberlord@gentoo.org>
+ +files/dhcpcd-1.3.22_p4-man.patch,
+ +files/dhcpcd-1.3.22_p4-optionFQDN.patch,
+ +files/dhcpcd-1.3.22_p4-routemetric.patch, +metadata.xml,
+ +dhcpcd-1.3.22_p4-r8.ebuild:
+ Add route metric option -m - fixes #76694 thanks to Andy Dustman
+ man page buglet caused by drobbins patch - fixes #78839
+ Allow dhcpcd to use the FQDN option - fixes #64307 thanks to Kevin F. Quinn
*dhcpcd-1.3.22_p4-r7 (04 Nov 2004)
diff --git a/net-misc/dhcpcd/Manifest b/net-misc/dhcpcd/Manifest
index 8418fce8ad6f..17e402c17079 100644
--- a/net-misc/dhcpcd/Manifest
+++ b/net-misc/dhcpcd/Manifest
@@ -1,16 +1,12 @@
------BEGIN PGP SIGNED MESSAGE-----
-Hash: SHA1
-
-MD5 fe80c3aee0021c110ed23b4d0804d6c7 ChangeLog 6417
-MD5 1e047633de90aa61af62c58f294be932 dhcpcd-1.3.22_p4-r7.ebuild 1882
+MD5 f40d84640f6d0f7d92bf4bb480801a89 ChangeLog 6880
+MD5 6fe58567b648100d4ff11902921b6889 metadata.xml 165
MD5 72ed97191f3c741e2050bb69fc2edc55 dhcpcd-1.3.22_p4-r5.ebuild 1942
+MD5 1e047633de90aa61af62c58f294be932 dhcpcd-1.3.22_p4-r7.ebuild 1882
+MD5 11e6119078a62d601db7910e991aceed dhcpcd-1.3.22_p4-r8.ebuild 2236
+MD5 f62309143521db696e2229fd34a43fed files/dhcpcd-1.3.22_p4-man.patch 243
+MD5 4b508a5bcb30b073605d5163baef7cdc files/dhcpcd-1.3.22_p4-routemetric.patch 488
+MD5 16cf7dbbe9b35957c7af6c7700ddcee2 files/dhcpcd-1.3.22_p4-optionFQDN.patch 17356
MD5 e5580d4472c718a772f6e1c700757968 files/dhcpcd-1.3.22_p4-no-iface-down.diff 2606
-MD5 daaf0c8fa44a481c8943f585ff870714 files/digest-dhcpcd-1.3.22_p4-r7 224
MD5 daaf0c8fa44a481c8943f585ff870714 files/digest-dhcpcd-1.3.22_p4-r5 224
------BEGIN PGP SIGNATURE-----
-Version: GnuPG v1.9.10 (GNU/Linux)
-
-iD8DBQFBim/6HTu7gpaalycRAuVtAJ9gESuqEk6Yh2bRfZ+dJcW/LERjaACeOw1F
-7boJ9Od8DoXRhmsYlHYL2e8=
-=z7A1
------END PGP SIGNATURE-----
+MD5 daaf0c8fa44a481c8943f585ff870714 files/digest-dhcpcd-1.3.22_p4-r7 224
+MD5 daaf0c8fa44a481c8943f585ff870714 files/digest-dhcpcd-1.3.22_p4-r8 224
diff --git a/net-misc/dhcpcd/dhcpcd-1.3.22_p4-r8.ebuild b/net-misc/dhcpcd/dhcpcd-1.3.22_p4-r8.ebuild
new file mode 100644
index 000000000000..ee2b0880d61d
--- /dev/null
+++ b/net-misc/dhcpcd/dhcpcd-1.3.22_p4-r8.ebuild
@@ -0,0 +1,69 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcpcd/dhcpcd-1.3.22_p4-r8.ebuild,v 1.1 2005/06/01 15:24:58 uberlord Exp $
+
+inherit gnuconfig flag-o-matic eutils
+
+DESCRIPTION="A dhcp client only"
+HOMEPAGE="http://www.phystech.com/download/"
+SRC_URI="ftp://ftp.phystech.com/pub/${P/_p/-pl}.tar.gz
+ http://dev.gentoo.org/~drobbins/${P}.diff.bz2
+ http://dev.gentoo.org/~drobbins/${P}-keepCacheAndResolv.diff.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86"
+IUSE="build static"
+
+DEPEND="virtual/libc"
+PROVIDE="virtual/dhcpc"
+
+S="${WORKDIR}/${P/_p/-pl}"
+
+src_unpack() {
+ unpack ${A}
+ gnuconfig_update
+
+ cd "${S}"
+ #Started working on this patch from an older version I found; then
+ #discovered that LFS had an updated one. We're using a patch that is
+ #identical to theirs. It makes dhcpcd FHS-compliant. (drobbins, 06
+ #Sep 2003)
+ epatch "${DISTDIR}"/${P}.diff.bz2
+ #This next patch from Alwyn Schoeman <alwyn@smart.com.ph> is great;
+ #it adds a -z (shutdown, keep cache) and various other little tweaks.
+ #See http://bugs.gentoo.org/show_bug.cgi?id=23428 for more info.
+ epatch "${DISTDIR}"/${P}-keepCacheAndResolv.diff.bz2
+ #This patch remove the iface down instruction from dhcpcd allowing us
+ #to have physical iface scripts (gmsoft, 11 Nov 2003)
+ epatch "${FILESDIR}"/${P}-no-iface-down.diff
+ #remove hard-coded arch stuff (drobbins, 06 Sep 2003)
+ sed -i "s/ -march=i.86//g" configure
+ sed -i 's:/etc/ntp\.drift:/var/lib/ntp/ntp.drift:' dhcpconfig.c
+
+ # Add route metric option -m - fixes #76694 thanks to Andy Dustman
+ epatch "${FILESDIR}"/${P}-routemetric.patch
+
+ # man page buglet caused by drobbins patch - fixes #78839
+ epatch "${FILESDIR}"/${P}-man.patch
+
+ # Allow dhcpcd to use the FQDN option - fixes #64307 thanks to
+ # Kevin F. Quinn
+ epatch "${FILESDIR}"/${P}-optionFQDN.patch
+}
+
+src_compile() {
+ use static && append-flags -static
+ econf --prefix=/ || die
+ emake || die
+}
+
+src_install() {
+ make install DESTDIR="${D}" || die "Install failed"
+ rm -rf "${D}"/etc
+ if ! use build ; then
+ dodoc AUTHORS ChangeLog NEWS README
+ else
+ rm -rf "${D}"/usr/share
+ fi
+}
diff --git a/net-misc/dhcpcd/files/dhcpcd-1.3.22_p4-man.patch b/net-misc/dhcpcd/files/dhcpcd-1.3.22_p4-man.patch
new file mode 100644
index 000000000000..4e0ba4c17151
--- /dev/null
+++ b/net-misc/dhcpcd/files/dhcpcd-1.3.22_p4-man.patch
@@ -0,0 +1,11 @@
+--- dhcpcd.8.orig 2005-06-01 14:15:16.506055236 +0100
++++ dhcpcd.8 2005-06-01 14:17:50.878717049 +0100
+@@ -307,7 +307,7 @@
+ .SH FILES
+ .PD 0
+ .TP
++.BI /var/lib/dhcpc
+-.BI /etc/dhcpc
+ Default
+ .I <ConfigDir>
+ directory used for storing files
diff --git a/net-misc/dhcpcd/files/dhcpcd-1.3.22_p4-optionFQDN.patch b/net-misc/dhcpcd/files/dhcpcd-1.3.22_p4-optionFQDN.patch
new file mode 100644
index 000000000000..2789490b7ed6
--- /dev/null
+++ b/net-misc/dhcpcd/files/dhcpcd-1.3.22_p4-optionFQDN.patch
@@ -0,0 +1,530 @@
+diff -ur dhcpcd-1.3.22-pl4.orig/buildmsg.c dhcpcd-1.3.22-pl4/buildmsg.c
+--- dhcpcd-1.3.22-pl4.orig/buildmsg.c 2004-11-27 13:59:31.745759928 +0100
++++ dhcpcd-1.3.22-pl4/buildmsg.c 2004-11-27 13:59:07.477449272 +0100
+@@ -43,6 +43,10 @@
+ extern int BroadcastResp;
+ extern struct in_addr inform_ipaddr;
+
++#ifdef DRAFT_OPTION_FQDN
++extern int SetFQDNHostName;
++#endif
++
+ /*****************************************************************************/
+ void buildDhcpDiscover(xid)
+ unsigned xid;
+@@ -107,7 +111,12 @@
+ *p++ = nisDomainName;
+ *p++ = nisServers;
+ *p++ = ntpServers;
++#ifdef DRAFT_OPTION_FQDN
++ /* FQDN option (81) replaces HostName option (12) if requested */
++ if (( HostName ) && ( SetFQDNHostName == FQDNdisable ))
++#else
+ if ( HostName )
++#endif
+ {
+ *p++ = hostName;
+ *p++ = HostName_len;
+@@ -120,6 +129,25 @@
+ p += DhcpIface.class_len;
+ memcpy(p,DhcpIface.client_id,DhcpIface.client_len);
+ p += DhcpIface.client_len;
++#ifdef DRAFT_OPTION_FQDN
++ if (( HostName ) && ( SetFQDNHostName != FQDNdisable ))
++ {
++ /* Draft IETF DHC-FQDN option (81) */
++ *p++ = dhcpFQDNHostName;
++ *p++ = HostName_len + 3;
++ /* Flags: 0000NEOS
++ * S: 1 => Client requests Server to update A RR in DNS as well as PTR
++ * O: 1 => Server indicates to client that DNS has been updated regardless
++ * E: 1 => Name data is DNS format, i.e. <4>host<6>domain<4>com<0> not "host.domain.com"
++ * N: 1 => Client requests Server to not update DNS
++ */
++ *p++ = SetFQDNHostName & 0x9;
++ *p++ = 0; /* rcode1, response from DNS server to DHCP for PTR RR */
++ *p++ = 0; /* rcode2, response from DNS server to DHCP for A RR if S=1 */
++ memcpy(p,HostName,HostName_len);
++ p += HostName_len;
++ }
++#endif
+ *p = endOption;
+
+ /* build UDP/IP header */
+@@ -194,7 +222,12 @@
+ *p++ = nisDomainName;
+ *p++ = nisServers;
+ *p++ = ntpServers;
++#ifdef DRAFT_OPTION_FQDN
++ /* FQDN option (81) replaces HostName option (12) if requested */
++ if (( HostName ) && ( SetFQDNHostName == FQDNdisable ))
++#else
+ if ( HostName )
++#endif
+ {
+ *p++ = hostName;
+ *p++ = HostName_len;
+@@ -207,6 +240,25 @@
+ p += DhcpIface.class_len;
+ memcpy(p,DhcpIface.client_id,DhcpIface.client_len);
+ p += DhcpIface.client_len;
++#ifdef DRAFT_OPTION_FQDN
++ if (( HostName ) && ( SetFQDNHostName != FQDNdisable ))
++ {
++ /* Draft IETF DHC-FQDN option (81) */
++ *p++ = dhcpFQDNHostName;
++ *p++ = HostName_len + 3;
++ /* Flags: 0000NEOS
++ * S: 1 => Client requests Server to update A RR in DNS as well as PTR
++ * O: 1 => Server indicates to client that DNS has been updated regardless
++ * E: 1 => Name data is DNS format, i.e. <4>host<6>domain<4>com<0> not "host.domain.com"
++ * N: 1 => Client requests Server to not update DNS
++ */
++ *p++ = SetFQDNHostName & 0x9;
++ *p++ = 0; /* rcode1, response from DNS server to DHCP for PTR RR */
++ *p++ = 0; /* rcode2, response from DNS server to DHCP for A RR if S=1 */
++ memcpy(p,HostName,HostName_len);
++ p += HostName_len;
++ }
++#endif
+ *p = endOption;
+
+ /* build UDP/IP header */
+@@ -269,7 +321,12 @@
+ *p++ = nisDomainName;
+ *p++ = nisServers;
+ *p++ = ntpServers;
++#ifdef DRAFT_OPTION_FQDN
++ /* FQDN option (81) replaces HostName option (12) if requested */
++ if (( HostName ) && ( SetFQDNHostName == FQDNdisable ))
++#else
+ if ( HostName )
++#endif
+ {
+ *p++ = hostName;
+ *p++ = HostName_len;
+@@ -282,6 +339,25 @@
+ p += DhcpIface.class_len;
+ memcpy(p,DhcpIface.client_id,DhcpIface.client_len);
+ p += DhcpIface.client_len;
++#ifdef DRAFT_OPTION_FQDN
++ if (( HostName ) && ( SetFQDNHostName != FQDNdisable ))
++ {
++ /* Draft IETF DHC-FQDN option (81) */
++ *p++ = dhcpFQDNHostName;
++ *p++ = HostName_len + 3;
++ /* Flags: 0000NEOS
++ * S: 1 => Client requests Server to update A RR in DNS as well as PTR
++ * O: 1 => Server indicates to client that DNS has been updated regardless
++ * E: 1 => Name data is DNS format, i.e. <4>host<6>domain<4>com<0> not "host.domain.com"
++ * N: 1 => Client requests Server to not update DNS
++ */
++ *p++ = SetFQDNHostName & 0x9;
++ *p++ = 0; /* rcode1, response from DNS server to DHCP for PTR RR */
++ *p++ = 0; /* rcode2, response from DNS server to DHCP for A RR if S=1 */
++ memcpy(p,HostName,HostName_len);
++ p += HostName_len;
++ }
++#endif
+ *p = endOption;
+
+ udpipgen((udpiphdr *)UdpIpMsgSend.udpipmsg,
+@@ -342,7 +418,12 @@
+ *p++ = nisDomainName;
+ *p++ = nisServers;
+ *p++ = ntpServers;
++#ifdef DRAFT_OPTION_FQDN
++ /* FQDN option (81) replaces HostName option (12) if requested */
++ if (( HostName ) && ( SetFQDNHostName == FQDNdisable ))
++#else
+ if ( HostName )
++#endif
+ {
+ *p++ = hostName;
+ *p++ = HostName_len;
+@@ -355,6 +436,25 @@
+ p += DhcpIface.class_len;
+ memcpy(p,DhcpIface.client_id,DhcpIface.client_len);
+ p += DhcpIface.client_len;
++#ifdef DRAFT_OPTION_FQDN
++ if (( HostName ) && ( SetFQDNHostName != FQDNdisable ))
++ {
++ /* Draft IETF DHC-FQDN option (81) */
++ *p++ = dhcpFQDNHostName;
++ *p++ = HostName_len + 3;
++ /* Flags: 0000NEOS
++ * S: 1 => Client requests Server to update A RR in DNS as well as PTR
++ * O: 1 => Server indicates to client that DNS has been updated regardless
++ * E: 1 => Name data is DNS format, i.e. <4>host<6>domain<4>com<0> not "host.domain.com"
++ * N: 1 => Client requests Server to not update DNS
++ */
++ *p++ = SetFQDNHostName & 0x9;
++ *p++ = 0; /* rcode1, response from DNS server to DHCP for PTR RR */
++ *p++ = 0; /* rcode2, response from DNS server to DHCP for A RR if S=1 */
++ memcpy(p,HostName,HostName_len);
++ p += HostName_len;
++ }
++#endif
+ *p = endOption;
+
+ udpipgen((udpiphdr *)UdpIpMsgSend.udpipmsg,
+@@ -423,7 +523,12 @@
+ *p++ = nisDomainName;
+ *p++ = nisServers;
+ *p++ = ntpServers;
++#ifdef DRAFT_OPTION_FQDN
++ /* FQDN option (81) replaces HostName option (12) if requested */
++ if (( HostName ) && ( SetFQDNHostName == FQDNdisable ))
++#else
+ if ( HostName )
++#endif
+ {
+ *p++ = hostName;
+ *p++ = HostName_len;
+@@ -436,6 +541,25 @@
+ p += DhcpIface.class_len;
+ memcpy(p,DhcpIface.client_id,DhcpIface.client_len);
+ p += DhcpIface.client_len;
++#ifdef DRAFT_OPTION_FQDN
++ if (( HostName ) && ( SetFQDNHostName != FQDNdisable ))
++ {
++ /* Draft IETF DHC-FQDN option (81) */
++ *p++ = dhcpFQDNHostName;
++ *p++ = HostName_len + 3;
++ /* Flags: 0000NEOS
++ * S: 1 => Client requests Server to update A RR in DNS as well as PTR
++ * O: 1 => Server indicates to client that DNS has been updated regardless
++ * E: 1 => Name data is DNS format, i.e. <4>host<6>domain<4>com<0> not "host.domain.com"
++ * N: 1 => Client requests Server to not update DNS
++ */
++ *p++ = SetFQDNHostName & 0x9;
++ *p++ = 0; /* rcode1, response from DNS server to DHCP for PTR RR */
++ *p++ = 0; /* rcode2, response from DNS server to DHCP for A RR if S=1 */
++ memcpy(p,HostName,HostName_len);
++ p += HostName_len;
++ }
++#endif
+ *p = endOption;
+
+ udpipgen((udpiphdr *)UdpIpMsgSend.udpipmsg,0,INADDR_BROADCAST,
+@@ -571,7 +695,12 @@
+ *p++ = nisDomainName;
+ *p++ = nisServers;
+ *p++ = ntpServers;
++#ifdef DRAFT_OPTION_FQDN
++ /* FQDN option (81) replaces HostName option (12) if requested */
++ if (( HostName ) && ( SetFQDNHostName == FQDNdisable ))
++#else
+ if ( HostName )
++#endif
+ {
+ *p++ = hostName;
+ *p++ = HostName_len;
+@@ -584,6 +713,25 @@
+ p += DhcpIface.class_len;
+ memcpy(p,DhcpIface.client_id,DhcpIface.client_len);
+ p += DhcpIface.client_len;
++#ifdef DRAFT_OPTION_FQDN
++ if (( HostName ) && ( SetFQDNHostName != FQDNdisable ))
++ {
++ /* Draft IETF DHC-FQDN option (81) */
++ *p++ = dhcpFQDNHostName;
++ *p++ = HostName_len + 3;
++ /* Flags: 0000NEOS
++ * S: 1 => Client requests Server to update A RR in DNS as well as PTR
++ * O: 1 => Server indicates to client that DNS has been updated regardless
++ * E: 1 => Name data is DNS format, i.e. <4>host<6>domain<4>com<0> not "host.domain.com"
++ * N: 1 => Client requests Server to not update DNS
++ */
++ *p++ = SetFQDNHostName & 0x9;
++ *p++ = 0; /* rcode1, response from DNS server to DHCP for PTR RR */
++ *p++ = 0; /* rcode2, response from DNS server to DHCP for A RR if S=1 */
++ memcpy(p,HostName,HostName_len);
++ p += HostName_len;
++ }
++#endif
+ *p = endOption;
+
+ udpipgen((udpiphdr *)UdpIpMsgSend.udpipmsg,0,INADDR_BROADCAST,
+diff -ur dhcpcd-1.3.22-pl4.orig/client.c dhcpcd-1.3.22-pl4/client.c
+--- dhcpcd-1.3.22-pl4.orig/client.c 2004-11-27 13:59:31.754758560 +0100
++++ dhcpcd-1.3.22-pl4/client.c 2004-11-27 13:58:24.101043488 +0100
+@@ -80,6 +80,10 @@
+ extern int ClientMACaddr_ind;
+ #endif
+
++#ifdef DRAFT_OPTION_FQDN
++extern int SetFQDNHostName;
++#endif
++
+ #ifdef ARPCHECK
+ int arpCheck();
+ #endif
+@@ -187,6 +191,16 @@
+ fprintf(stderr,"i=%-2d len=%-2d option = %u\n",
+ i,DhcpOptions.len[i],*(unsigned char *)DhcpOptions.val[i]);
+ break;
++#ifdef DRAFT_OPTION_FQDN
++ case 81:/* dhcpFQDNHostName */
++ fprintf(stderr,"i=%-2d len=%-2d flags = %02X rcode1 = %02X rcode2 = %02X name = \"%s\"\n",
++ i,DhcpOptions.len[i],
++ ((unsigned char *)DhcpOptions.val[i])[0],
++ ((unsigned char *)DhcpOptions.val[i])[1],
++ ((unsigned char *)DhcpOptions.val[i])[2],
++ ((char *)DhcpOptions.val[i])+3);
++ break;
++#endif
+ default:
+ fprintf(stderr,"i=%-2d len=%-2d option = \"%s\"\n",
+ i,DhcpOptions.len[i],(char *)DhcpOptions.val[i]);
+@@ -393,6 +407,23 @@
+ if ( DebugFlag )
+ syslog(LOG_DEBUG,"dhcpT2value is missing in DHCP server response. Assuming %u sec\n",t2);
+ }
++#ifdef DRAFT_OPTION_FQDN
++ if ( DhcpOptions.val[dhcpFQDNHostName] )
++ {
++ syslog(LOG_DEBUG,"dhcpFQDNHostName response flags = %02X rcode1 = %02X rcode2 = %02X name = \"%s\"\n",
++ ((unsigned char *)DhcpOptions.val[dhcpFQDNHostName])[0],
++ ((unsigned char *)DhcpOptions.val[dhcpFQDNHostName])[1],
++ ((unsigned char *)DhcpOptions.val[dhcpFQDNHostName])[2],
++ ((char *)DhcpOptions.val[dhcpFQDNHostName])+3);
++ }
++ else
++ {
++ if ( DebugFlag && (SetFQDNHostName != FQDNdisable) )
++ {
++ syslog(LOG_DEBUG,"dhcpFQDNHostName is missing in DHCP server response.\n");
++ }
++ }
++#endif
+ if ( DhcpOptions.val[dhcpMessageType] )
+ return *(unsigned char *)DhcpOptions.val[dhcpMessageType];
+ return 0;
+diff -ur dhcpcd-1.3.22-pl4.orig/client.h dhcpcd-1.3.22-pl4/client.h
+--- dhcpcd-1.3.22-pl4.orig/client.h 2004-11-27 13:59:31.754758560 +0100
++++ dhcpcd-1.3.22-pl4/client.h 2004-11-27 13:58:24.103043184 +0100
+@@ -131,9 +131,25 @@
+ dhcpT2value = 59,
+ dhcpClassIdentifier = 60,
+ dhcpClientIdentifier = 61,
++#ifdef DRAFT_OPTION_FQDN
++ dhcpFQDNHostName = 81,
++#endif
+ endOption = 255
+ };
+
++#ifdef DRAFT_OPTION_FQDN
++/* SetFQDNHostName values - lsnybble used in flags
++ * byte (see buildmsg.c), hsnybble to create order
++ * and to allow 0x00 to mean disable
++ */
++enum {
++ FQDNdisable = 0x00,
++ FQDNnone = 0x18,
++ FQDNptr = 0x20,
++ FQDNboth = 0x31
++};
++#endif
++
+ typedef struct dhcpInterface
+ {
+ unsigned char version[11];
+diff -ur dhcpcd-1.3.22-pl4.orig/dhcpcd.8 dhcpcd-1.3.22-pl4/dhcpcd.8
+--- dhcpcd-1.3.22-pl4.orig/dhcpcd.8 2004-11-27 13:59:31.753758712 +0100
++++ dhcpcd-1.3.22-pl4/dhcpcd.8 2004-11-27 13:58:24.105042880 +0100
+@@ -9,14 +9,15 @@
+ .in +.5i
+ .ti -.5i
+ dhcpcd
+-\%[\-dknorzBCDHNRSTY]
++\%[\-dknorzBCDHNRSTY]
+ \%[\-t\ <timeout>]
+ \%[\-c\ <ExecFilePath>]
+-\%[-h\ <hostname>]
+-\%[-i\ <vendorClassID>]
+-\%[-I\ <clientID>]
++\%[\-h\ <hostname>]
++\%[\-i\ <vendorClassID>]
++\%[\-I\ <clientID>]
+ \%[\-l\ <leasetime>]
+ \%[\-s\ [ipaddr]]
++\%[\-F\ none|ptr|both]
+ \%[\-G\ [gateway]]
+ \%[\-w\ <windowsize>]
+ \%[\-L\ <ConfigDir>]
+@@ -28,7 +29,10 @@
+ .B RFC2131
+ (when -r option is not specified) and
+ .B RFC1541
+-(when -r option is specified).
++(when -r option is specified). Support for
++.B draft-ietf-dhc-fqdn-option
++in use in many systems (particularly networks using Microsoft DHCP
++servers) is also provided.
+
+ It gets the host information (IP address, netmask, broadcast address,
+ etc.) from a DHCP server and configures the network interface of the
+@@ -145,6 +149,31 @@
+ to set domainname of the host to the domainname option
+ supplied by DHCP server.
+ .TP
++.BI \-F \ none|ptr|both
++Forces
++.B dhcpcd
++to request the DHCP server update the DNS using the FQDN option
++instead of the Hostname option. The name used by this option
++is specified with the \fB-h\fP switch, which must be present. If
++the \fB-h\fP switch is not present, the FQDN option is ignored.
++The name should be fully qualified, although servers usually
++accept a simple name.
++.I both
++requests that the DHCP server update both the A and PTR
++records in the DNS.
++.I ptr
++requests that the DHCP server updates only the PTR record in
++the DNS.
++.I none
++requests that the DHCP server perform no updates.
++.B dhcpcd
++does not perform any DNS update, even when the server is
++requested to perform no updates. This can be easily
++implemented outside the client; all the necessary
++information is recorded in the
++.I <ConfigDir>/dhcpcd-<interface>.info
++file.
++.TP
+ .BI \-H
+ Forces
+ .B dhcpcd
+@@ -249,6 +278,8 @@
+ sends DHCP messages. Some DHCP servers, notably those used by
+ @Home Networks, require the hostname option
+ field containing a specific string in the DHCP messages from clients.
++When combined with the -F switch, specifies the string used for the
++FQDN option field instead of the hostname option field.
+ .TP
+ .BI \-i \ <vendorClassID>
+ Specifies the vendor class identifier string.
+@@ -413,10 +444,18 @@
+ is attached.
+
+ .SH SEE ALSO
++.BR dig (1),
++.BR nslookup (8),
++.BR nsupdate (8)
++.LP
+ .I Dynamic Host Configuration Protocol,
+ RFC2131 and RFC1541 (obsolete)
++.LP
+ .I DHCP Options and BOOTP Vendor Extensions,
+ RFC2132
++.LP
++.I Draft DHC FQDN Option specification,
++draft-ietf-dhc-fqdn-option
+
+ .SH BUGS
+ .PD 0
+diff -ur dhcpcd-1.3.22-pl4.orig/dhcpcd.c dhcpcd-1.3.22-pl4/dhcpcd.c
+--- dhcpcd-1.3.22-pl4.orig/dhcpcd.c 2004-11-27 13:59:31.753758712 +0100
++++ dhcpcd-1.3.22-pl4/dhcpcd.c 2004-11-27 13:58:24.107042576 +0100
+@@ -75,6 +75,9 @@
+ unsigned char ClientMACaddr[ETH_ALEN];
+ int ClientMACaddr_ind = 0;
+ #endif
++#ifdef DRAFT_OPTION_FQDN
++int SetFQDNHostName = FQDNdisable;
++#endif
+ /*****************************************************************************/
+ void print_version()
+ {
+@@ -109,6 +112,9 @@
+ int k = 1;
+ int i = 1;
+ int j;
++#ifdef DRAFT_OPTION_FQDN
++ char *FQDNOption = NULL;
++#endif
+
+ /*
+ * Ensure that fds 0, 1, 2 are open, to /dev/null if nowhere else.
+@@ -262,6 +268,23 @@
+ fprintf(stderr,"**** %s: too long HostName string: strlen=%d\n",
+ argc[0],HostName_len);
+ break;
++#ifdef DRAFT_OPTION_FQDN
++ case 'F':
++ if ( argc[i][s+1] ) goto usage;
++ i++;
++ FQDNOption=argc[i++];
++ if ( FQDNOption == NULL || FQDNOption[0] == '-' ) goto usage;
++ if ( strcmp(FQDNOption,"none") == 0 )
++ SetFQDNHostName=FQDNnone;
++ else if ( strcmp(FQDNOption,"ptr") == 0 )
++ SetFQDNHostName=FQDNptr;
++ else if ( strcmp(FQDNOption,"both") == 0 )
++ SetFQDNHostName=FQDNboth;
++ else
++ goto usage;
++ s=1;
++ break;
++#endif
+ case 't':
+ if ( argc[i][s+1] ) goto usage;
+ i++;
+@@ -333,10 +356,17 @@
+ break;
+ default:
+ usage: print_version();
+- fprintf(stderr,
++#ifdef DRAFT_OPTION_FQDN
++ fprintf(stderr,
++"Usage: dhcpcd [-dknorzBCDHNRSTY] [-l leasetime] [-h hostname] [-t timeout]\n\
++ [-i vendorClassID] [-I ClientID] [-c filename] [-s [ipaddr]]\n\
++ [-w windowsize] [-L ConfigDir] [-G [gateway]] [-F none|ptr|both] [interface]\n");
++#else
++ fprintf(stderr,
+ "Usage: dhcpcd [-dknorzBCDHNRSTY] [-l leasetime] [-h hostname] [-t timeout]\n\
+ [-i vendorClassID] [-I ClientID] [-c filename] [-s [ipaddr]]\n\
+ [-w windowsize] [-L ConfigDir] [-G [gateway]] [interface]\n");
++#endif
+ exit(1);
+ }
+ else
+diff -ur dhcpcd-1.3.22-pl4.orig/dhcpconfig.c dhcpcd-1.3.22-pl4/dhcpconfig.c
+--- dhcpcd-1.3.22-pl4.orig/dhcpconfig.c 2004-11-27 13:59:31.752758864 +0100
++++ dhcpcd-1.3.22-pl4/dhcpconfig.c 2004-11-27 13:58:24.261019168 +0100
+@@ -61,6 +61,10 @@
+ extern dhcpOptions DhcpOptions;
+ extern const dhcpMessage *DhcpMsgRecv;
+
++#ifdef DRAFT_OPTION_FQDN
++extern int SetFQDNHostName;
++#endif
++
+ int arpInform();
+
+ char hostinfo_file[128];
+@@ -735,6 +739,22 @@
+ fprintf(f,"CLIENTID=%02X:%02X:%02X:%02X:%02X:%02X\n",
+ DhcpIface.client_id[3],DhcpIface.client_id[4],DhcpIface.client_id[5],
+ DhcpIface.client_id[6],DhcpIface.client_id[7],DhcpIface.client_id[8]);
++#ifdef DRAFT_OPTION_FQDN
++ if ( SetFQDNHostName != FQDNdisable )
++ {
++ if ( DhcpOptions.len[dhcpFQDNHostName] )
++ {
++fprintf(f,"FQDNFLAGS=%u\n\
++FQDNRCODE1=%u\n\
++FQDNRCODE2=%u\n\
++FQDNHOSTNAME=%s\n",
++((unsigned char *)DhcpOptions.val[dhcpFQDNHostName])[0],
++((unsigned char *)DhcpOptions.val[dhcpFQDNHostName])[1],
++((unsigned char *)DhcpOptions.val[dhcpFQDNHostName])[2],
++(((char *)DhcpOptions.val[dhcpFQDNHostName])+3));
++ }
++ }
++#endif
+ fclose(f);
+ }
+ else
diff --git a/net-misc/dhcpcd/files/dhcpcd-1.3.22_p4-routemetric.patch b/net-misc/dhcpcd/files/dhcpcd-1.3.22_p4-routemetric.patch
new file mode 100644
index 000000000000..0b93ea090d37
--- /dev/null
+++ b/net-misc/dhcpcd/files/dhcpcd-1.3.22_p4-routemetric.patch
@@ -0,0 +1,20 @@
+--- dhcpcd.8.orig 2005-06-01 13:28:30.899167422 +0100
++++ dhcpcd.8 2005-06-01 13:41:53.027864771 +0100
+@@ -20,6 +20,7 @@
+ \%[\-G\ [gateway]]
+ \%[\-w\ <windowsize>]
+ \%[\-L\ <ConfigDir>]
++\%[\-m\ <routemetric>]
+ \%[interface]
+ .in -.5i
+ .SH DESCRIPTION
+@@ -230,6 +231,9 @@
+ .B dhcpcd
+ will return exit code 1 to the parent process.
+ .TP
++.BI \-m \ <routemetric>
++routes will be added with the given metric. The default is 0.
++.TP
+ .BI \-c \ <ExecFilePath>
+ .B dhcpcd
+ will try to execute
diff --git a/net-misc/dhcpcd/files/digest-dhcpcd-1.3.22_p4-r8 b/net-misc/dhcpcd/files/digest-dhcpcd-1.3.22_p4-r8
new file mode 100644
index 000000000000..80b4247cc65e
--- /dev/null
+++ b/net-misc/dhcpcd/files/digest-dhcpcd-1.3.22_p4-r8
@@ -0,0 +1,3 @@
+MD5 dd627a121e43835bead3ffef5b1a72fd dhcpcd-1.3.22-pl4.tar.gz 148455
+MD5 0960ef5d5070da205ffacd5107492e36 dhcpcd-1.3.22_p4.diff.bz2 1646
+MD5 6a502cc0c572f898f8ba5daa34c37901 dhcpcd-1.3.22_p4-keepCacheAndResolv.diff.bz2 1800
diff --git a/net-misc/dhcpcd/metadata.xml b/net-misc/dhcpcd/metadata.xml
new file mode 100644
index 000000000000..659da0ca93c2
--- /dev/null
+++ b/net-misc/dhcpcd/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>base-system</herd>
+</pkgmetadata>