diff options
author | Roy Marples <uberlord@gentoo.org> | 2005-09-17 01:22:40 +0000 |
---|---|---|
committer | Roy Marples <uberlord@gentoo.org> | 2005-09-17 01:22:40 +0000 |
commit | ad228a617b7abad44dbb9baea6147f333f2e46b9 (patch) | |
tree | 425865903c855017e48f06022d8dea9e68770531 | |
parent | bug 106150 (diff) | |
download | gentoo-2-ad228a617b7abad44dbb9baea6147f333f2e46b9.tar.gz gentoo-2-ad228a617b7abad44dbb9baea6147f333f2e46b9.tar.bz2 gentoo-2-ad228a617b7abad44dbb9baea6147f333f2e46b9.zip |
Punted old versions - no more -z "release lease but keep cache" option :)
(Portage version: 2.0.51.22-r2)
-rw-r--r-- | net-misc/dhcpcd/ChangeLog | 13 | ||||
-rw-r--r-- | net-misc/dhcpcd/dhcpcd-1.3.22_p4-r11.ebuild | 69 | ||||
-rw-r--r-- | net-misc/dhcpcd/dhcpcd-1.3.22_p4-r12.ebuild | 89 | ||||
-rw-r--r-- | net-misc/dhcpcd/files/dhcpcd-1.3.22_p4-gcc2.patch | 84 | ||||
-rw-r--r-- | net-misc/dhcpcd/files/dhcpcd-1.3.22_p4-gentoo-config.patch | 389 | ||||
-rw-r--r-- | net-misc/dhcpcd/files/dhcpcd-1.3.22_p4-man.patch | 11 | ||||
-rw-r--r-- | net-misc/dhcpcd/files/dhcpcd-1.3.22_p4-no-iface-down.diff | 80 | ||||
-rw-r--r-- | net-misc/dhcpcd/files/dhcpcd-1.3.22_p4-optionFQDN.patch | 531 | ||||
-rw-r--r-- | net-misc/dhcpcd/files/dhcpcd-1.3.22_p4-routemetric.patch | 152 | ||||
-rw-r--r-- | net-misc/dhcpcd/files/dhcpcd-1.3.22_p4-security.patch | 11 | ||||
-rw-r--r-- | net-misc/dhcpcd/files/digest-dhcpcd-1.3.22_p4-r11 | 3 |
11 files changed, 12 insertions, 1420 deletions
diff --git a/net-misc/dhcpcd/ChangeLog b/net-misc/dhcpcd/ChangeLog index 79c1e1508c5f..9c32feb54145 100644 --- a/net-misc/dhcpcd/ChangeLog +++ b/net-misc/dhcpcd/ChangeLog @@ -1,6 +1,17 @@ # ChangeLog for net-misc/dhcpcd # Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcpcd/ChangeLog,v 1.66 2005/09/16 02:56:50 agriffis Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcpcd/ChangeLog,v 1.67 2005/09/17 01:22:40 uberlord Exp $ + + 17 Sep 2005; Roy Marples <uberlord@gentoo.org> + -files/dhcpcd-1.3.22_p4-gcc2.patch, + -files/dhcpcd-1.3.22_p4-gentoo-config.patch, + -files/dhcpcd-1.3.22_p4-man.patch, + -files/dhcpcd-1.3.22_p4-no-iface-down.diff, + -files/dhcpcd-1.3.22_p4-optionFQDN.patch, + -files/dhcpcd-1.3.22_p4-routemetric.patch, + -files/dhcpcd-1.3.22_p4-security.patch, -dhcpcd-1.3.22_p4-r11.ebuild, + -dhcpcd-1.3.22_p4-r12.ebuild: + Punted old versions - no more -z "release lease but keep cache" option :) 15 Sep 2005; Aron Griffis <agriffis@gentoo.org> dhcpcd-2.0.0.ebuild: Mark 2.0.0 stable on alpha diff --git a/net-misc/dhcpcd/dhcpcd-1.3.22_p4-r11.ebuild b/net-misc/dhcpcd/dhcpcd-1.3.22_p4-r11.ebuild deleted file mode 100644 index 9ee2d8bc2cac..000000000000 --- a/net-misc/dhcpcd/dhcpcd-1.3.22_p4-r11.ebuild +++ /dev/null @@ -1,69 +0,0 @@ -# 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-r11.ebuild,v 1.10 2005/07/17 06:34:29 vapier 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) - - # Stop a possible DoS issue - fixes #98394 - epatch "${FILESDIR}"/${P}-security.patch - - sed -i "s/ -march=i.86//g" configure - sed -i 's:/etc/ntp\.drift:/var/lib/ntp/ntp.drift:' dhcpconfig.c -} - -src_compile() { - use static && append-flags -static - - ./configure \ - --prefix="" \ - --sysconfdir=/var/lib \ - --mandir=/usr/share/man || die - - emake || die -} - -src_install() { - einstall sbindir=${D}/sbin || die "Install failed" - rmdir ${D}/etc/dhcpc - if ! use build - then - dodoc AUTHORS ChangeLog NEWS README - else - rm -rf ${D}/usr/share - fi -} diff --git a/net-misc/dhcpcd/dhcpcd-1.3.22_p4-r12.ebuild b/net-misc/dhcpcd/dhcpcd-1.3.22_p4-r12.ebuild deleted file mode 100644 index ef13eed0abcb..000000000000 --- a/net-misc/dhcpcd/dhcpcd-1.3.22_p4-r12.ebuild +++ /dev/null @@ -1,89 +0,0 @@ -# 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-r12.ebuild,v 1.2 2005/07/24 10:53:28 azarah Exp $ - -inherit 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="" -PROVIDE="virtual/dhcpc" - -S=${WORKDIR}/${P/_p/-pl} - -src_unpack() { - unpack ${A} - - 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 - epatch "${FILESDIR}"/${P}-optionFQDN.patch - - # Make dhcpcd mirror baselayout-1.11.x /etc/{resolv,ntp,yp}.conf files - # Also enables the -e option to specify the /etc dir where dhcpcd - # creates {resolv,ntp,yp}.conf - epatch "${FILESDIR}"/${P}-gentoo-config.patch - - # Stop a possible DoS issue - fixes #98394 - epatch "${FILESDIR}"/${P}-security.patch - - # Fix compiling on gcc2 - epatch "${FILESDIR}"/${P}-gcc2.patch - - # Make sure we use paths from configure rather than hardcoded crap - sed -i \ - -e '/^mandir/s:=.*:=@mandir@:' \ - -e "/^docdir/s:=.*:=@datadir@/doc/${PF}:" \ - Makefile.in || die - - # Brand dhcpcd with the gentoo version - sed -i '/^#define VERSION/s/"$/-gentoo-'"${PR}"'"/' dhcpcd.h - sed -i '/^DHCPCD_REL=/s/$/-gentoo-'"${PR}"'/' configure -} - -src_compile() { - use static && append-flags -static - append-flags -DDRAFT_OPTION_FQDN - econf --prefix=/ || die - emake || die -} - -src_install() { - make install DESTDIR="${D}" || die "Install failed" - rm -r "${D}"/etc - if ! use build ; then - dodoc AUTHORS ChangeLog NEWS README - else - rm -r "${D}"/usr/share - fi -} diff --git a/net-misc/dhcpcd/files/dhcpcd-1.3.22_p4-gcc2.patch b/net-misc/dhcpcd/files/dhcpcd-1.3.22_p4-gcc2.patch deleted file mode 100644 index e62013fea3e0..000000000000 --- a/net-misc/dhcpcd/files/dhcpcd-1.3.22_p4-gcc2.patch +++ /dev/null @@ -1,84 +0,0 @@ ---- dhcpcd-1.3.22-pl4/dhcpconfig.c 2005-07-24 12:51:33 +0200 -+++ dhcpcd-1.3.22-pl4.az/dhcpconfig.c 2005-07-24 12:53:34 +0200 -@@ -382,8 +382,8 @@ - f=fopen(resolv_file, "w"); - if ( f ) - { -- fprintf(f, "# Generated by dhcpcd for interface %s\n", IfName); - int i; -+ fprintf(f, "# Generated by dhcpcd for interface %s\n", IfName); - if ( DhcpOptions.len[domainName] ) - fprintf(f,"domain %s\n",(char *)DhcpOptions.val[domainName]); - -@@ -413,9 +413,9 @@ - f=fopen(nis_file, "w"); - if ( f ) - { -- fprintf(f, "# Generated by dhcpcd for interface %s\n", IfName); - int i; - char *prefix=NULL; -+ fprintf(f, "# Generated by dhcpcd for interface %s\n", IfName); - if ( DhcpOptions.len[nisDomainName] ) { - if ( DhcpOptions.len[nisServers] ) { - prefix=(char *)malloc(DhcpOptions.len[nisDomainName] + 15); -@@ -447,8 +447,10 @@ - f=fopen(ntp_file, "w"); - if ( f ) - { -- fprintf(f, "# Generated by dhcpcd for interface %s\n", IfName); - int net, mask; -+ int i; -+ char addr[4*3+3*1+1]; -+ fprintf(f, "# Generated by dhcpcd for interface %s\n", IfName); - memcpy(&mask,DhcpOptions.val[subnetMask],4); - net = DhcpIface.ciaddr & mask; - -@@ -456,17 +458,15 @@ - fprintf(f,"restrict default noquery notrust nomodify\n"); - fprintf(f,"restrict 127.0.0.1\n"); - -- int i; -- char addr[4*3+3*1+1]; -- for (i=0;i<DhcpOptions.len[ntpServers];i+=4) -- { -- snprintf(addr,sizeof(addr),"%u.%u.%u.%u", -- ((unsigned char *)DhcpOptions.val[ntpServers])[i], -- ((unsigned char *)DhcpOptions.val[ntpServers])[i+1], -- ((unsigned char *)DhcpOptions.val[ntpServers])[i+2], -- ((unsigned char *)DhcpOptions.val[ntpServers])[i+3]); -- fprintf(f,"restrict %s nomodify notrap noquery\nserver %s\n",addr,addr); -- } -+ for (i=0;i<DhcpOptions.len[ntpServers];i+=4) -+ { -+ snprintf(addr,sizeof(addr),"%u.%u.%u.%u", -+ ((unsigned char *)DhcpOptions.val[ntpServers])[i], -+ ((unsigned char *)DhcpOptions.val[ntpServers])[i+1], -+ ((unsigned char *)DhcpOptions.val[ntpServers])[i+2], -+ ((unsigned char *)DhcpOptions.val[ntpServers])[i+3]); -+ fprintf(f,"restrict %s nomodify notrap noquery\nserver %s\n",addr,addr); -+ } - - fprintf(f, "driftfile /var/lib/ntp/ntp.drift\n"); - fprintf(f, "logfile /var/log/ntp.log\n"); ---- dhcpcd-1.3.22-pl4/dhcpcd.c 2005-07-24 12:53:57 +0200 -+++ dhcpcd-1.3.22-pl4.az/dhcpcd.c 2005-07-24 12:55:42 +0200 -@@ -146,6 +146,8 @@ - if ( argc[i][0]=='-' ) - prgs: switch ( argc[i][s] ) - { -+ char *tmp; -+ long m; - case 0: - i++; - s=1; -@@ -158,9 +160,8 @@ - if ( argc[i][s+1] ) goto usage; - i++; - if ( ! argc[i] ) goto usage; -- char *tmp; - errno = 0; -- long m=strtol(argc[i], &tmp, 0); -+ m=strtol(argc[i], &tmp, 0); - if (argc[i][0] == '\0' || *tmp != '\0' ) goto usage; - if ((errno == ERANGE && - (m == LONG_MAX || m == LONG_MIN )) || diff --git a/net-misc/dhcpcd/files/dhcpcd-1.3.22_p4-gentoo-config.patch b/net-misc/dhcpcd/files/dhcpcd-1.3.22_p4-gentoo-config.patch deleted file mode 100644 index c04022522286..000000000000 --- a/net-misc/dhcpcd/files/dhcpcd-1.3.22_p4-gentoo-config.patch +++ /dev/null @@ -1,389 +0,0 @@ ---- client.c.orig 2005-06-02 23:26:17.293931424 +0100 -+++ client.c 2005-06-02 23:53:14.186126448 +0100 -@@ -75,6 +75,13 @@ - extern char *InitialHostName,*InitialDomainName; - extern int DownIfaceOnStop; - -+extern char resolv_file[128]; -+extern char resolv_file_sv[128]; -+extern char ntp_file[128]; -+extern char ntp_file_sv[128]; -+extern char nis_file[128]; -+extern char nis_file_sv[128]; -+ - #if 0 - extern unsigned char ClientMACaddr[ETH_ALEN]; - extern int ClientMACaddr_ind; -@@ -1183,11 +1190,11 @@ - tsc: - close(dhcpSocket); - if ( resolv_renamed ) -- rename(""RESOLV_CONF".sv",RESOLV_CONF); -+ rename(resolv_file_sv, resolv_file); - if ( yp_renamed ) -- rename(""NIS_CONF".sv",NIS_CONF); -+ rename(nis_file_sv, nis_file); - if ( ntp_renamed ) -- rename(""NTP_CONF".sv",NTP_CONF); -+ rename(ntp_file_sv, ntp_file); - execute_on_change("down"); - return &dhcpStart; - } ---- dhcpcd.8.orig 2005-06-02 23:34:18.549769416 +0100 -+++ dhcpcd.8 2005-06-02 23:38:53.617952696 +0100 -@@ -22,6 +22,7 @@ - \%[\-w\ <windowsize>] - \%[\-L\ <ConfigDir>] - \%[\-m\ <routemetric>] -+\%[\-e\ <etcDir>] - \%[interface] - .in -.5i - .SH DESCRIPTION -@@ -207,21 +208,21 @@ - Prevents - .B dhcpcd - from replacing existing --.I /etc/resolv.conf -+.I <etcDir>/resolv.conf - file. - .TP - .BI \-Y - Prevents - .B dhcpcd - from replacing existing --.I /etc/yp.conf -+.I <etcDir>/yp.conf - file. Domainname is not updated unless \fB-D\fP is specified. - .TP - .BI \-N - Prevents - .B dhcpcd - from replacing existing --.I /etc/ntp.conf -+.I <etcDir>/ntp.conf - file. - .TP - .BI \-T -@@ -328,6 +329,12 @@ - .BI \-w \ <windowsize> - Specifies the window size for the gateway route. Default = 32768. - .TP -+.TP -+.NI \-e \ <etcDir> -+Specifies where -+.B dhcpcd -+should create resolv.conf, ntp.conf and yp.conf. Default is the /etc -+directory. - .BI interface - Specifies the network interface name (eth0, eth1, etc.). - .B dhcpcd -@@ -400,38 +407,38 @@ - .B dhcpcd - is attached. - .TP --.BI /etc/resolv.conf -+.BI <etcDir>/resolv.conf - file created by - .B dhcpcd - when the client receives DNS and domain name options. - The old --.B /etc/resolv.conf -+.B <etcDir>/resolv.conf - file is renamed to --.B /etc/resolv.conf.sv -+.B <etcDir>/resolv.conf.sv - and will be restored back when - .B dhcpcd - exits for any reason. - .TP --.BI /etc/yp.conf -+.BI <etcDir>/yp.conf - file created by - .B dhcpcd - when the client receives NIS options. - The old --.B /etc/yp.conf -+.B <etcDir>/yp.conf - file is renamed to --.B /etc/yp.conf.sv -+.B <etcDir>/yp.conf.sv - and is restored back when - .B dhcpcd - exits for any reason. - .TP --.BI /etc/ntp.conf -+.BI <etcDir>/ntp.conf - file created by - .B dhcpcd - when the client receives NTP options. - The old --.B /etc/ntp.conf -+.B <etcDir>/ntp.conf - file is renamed to --.B /etc/ntp.conf.sv -+.B <etcDir>/ntp.conf.sv - and is restored back when - .B dhcpcd - exits for any reason. ---- dhcpcd.c.orig 2005-06-02 22:59:57.597081848 +0100 -+++ dhcpcd.c 2005-06-02 23:48:04.753167408 +0100 -@@ -76,6 +76,15 @@ - unsigned char ClientMACaddr[ETH_ALEN]; - int ClientMACaddr_ind = 0; - #endif -+ -+char *etcDir = ETC_DIR; -+char resolv_file[128]; -+char resolv_file_sv[128]; -+char nis_file[128]; -+char nis_file_sv[128]; -+char ntp_file[128]; -+char ntp_file_sv[128]; -+ - #ifdef DRAFT_OPTION_FQDN - int SetFQDNHostName = FQDNdisable; - #endif -@@ -216,6 +225,13 @@ - if ( ConfigDir == NULL || ConfigDir[0] != '/' ) goto usage; - s=1; - break; -+ case 'e': -+ if (argc[i][s+1] ) goto usage; -+ i++; -+ etcDir=argc[i++]; -+ if (etcDir == NULL || etcDir[0] != '/' ) goto usage; -+ s=1; -+ break; - #if 0 - case 'M': - if ( argc[i][s+1] ) goto usage; -@@ -379,13 +395,13 @@ - "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]] [-m routemetric]\n\ -- [interface]\n"); -+ [-e etcDir] [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]] [-m routemetric]\n\ -- [-F none|ptr|both] [interface]\n"); -+ [-e etcDir] [-F none|ptr|both] [interface]\n"); - #endif - exit(1); - } -@@ -423,6 +439,18 @@ - syslog(LOG_ERR,"mkdir(\"%s\",0): %m\n",ConfigDir); - exit(1); - } -+ if ( mkdir(etcDir,S_IRUSR|S_IWUSR|S_IXUSR|S_IRGRP|S_IXGRP|S_IROTH|S_IXOTH) && errno != EEXIST ) -+ { -+ syslog(LOG_ERR,"mkdir(\"%s\",0): %m\n", etcDir); -+ exit(1); -+ } -+ snprintf(resolv_file, sizeof(resolv_file), RESOLV_FILE, etcDir); -+ snprintf(resolv_file_sv, sizeof(resolv_file_sv), ""RESOLV_FILE"-%s.sv", etcDir, IfName); -+ snprintf(nis_file, sizeof(nis_file), NIS_FILE, etcDir); -+ snprintf(nis_file_sv, sizeof(nis_file_sv), ""NIS_FILE"-%s.sv", etcDir, IfName); -+ snprintf(ntp_file, sizeof(ntp_file), NTP_FILE, etcDir); -+ snprintf(ntp_file_sv, sizeof(ntp_file_sv), ""NTP_FILE"-%s.sv", etcDir, IfName); -+ - magic_cookie = htonl(MAGIC_COOKIE); - dhcpMsgSize = htons(sizeof(dhcpMessage)); - nleaseTime = htonl(LeaseTime); ---- dhcpconfig.c.orig 2005-06-02 22:57:14.614858912 +0100 -+++ dhcpconfig.c 2005-06-02 23:52:15.702017384 +0100 -@@ -62,6 +62,13 @@ - extern dhcpOptions DhcpOptions; - extern const dhcpMessage *DhcpMsgRecv; - -+extern char resolv_file[128]; -+extern char resolv_file_sv[128]; -+extern char ntp_file[128]; -+extern char ntp_file_sv[128]; -+extern char nis_file[128]; -+extern char nis_file_sv[128]; -+ - #ifdef DRAFT_OPTION_FQDN - extern int SetFQDNHostName; - #endif -@@ -363,46 +370,30 @@ - /* In the case where machine dies for some reason, resolv.conf.sv would - * not have been restored to original glory - */ -- if ( 1+rename(""RESOLV_CONF".sv",RESOLV_CONF) ) { -+ if ( 1+rename(resolv_file_sv, resolv_file) ) { - if ( DebugFlag ) syslog (LOG_DEBUG, "Restored resolv.conf.sv from improper shutdown"); - } else { - if ( DebugFlag ) syslog (LOG_DEBUG, "No resolv.conf.sv to restore"); - } - -- if ( ReplResolvConf ) -+ if ( ReplResolvConf && (DhcpOptions.len[domainName] || DhcpOptions.len[dns])) - { -- resolv_renamed=1+rename(RESOLV_CONF,""RESOLV_CONF".sv"); -- f=fopen(RESOLV_CONF,"w"); -+ resolv_renamed=1+rename(resolv_file, resolv_file_sv); -+ f=fopen(resolv_file, "w"); - if ( f ) - { -+ fprintf(f, "# Generated by dhcpcd for interface %s\n", IfName); - int i; --#if 0 -- if ( DhcpOptions.len[nisDomainName] ) -- fprintf(f,"domain %s\n",(char *)DhcpOptions.val[nisDomainName]); -- else -- if ( DhcpOptions.len[domainName] ) -- fprintf(f,"domain %s\n",(char *)DhcpOptions.val[domainName]); --#endif -+ if ( DhcpOptions.len[domainName] ) -+ fprintf(f,"domain %s\n",(char *)DhcpOptions.val[domainName]); -+ - for (i=0;i<DhcpOptions.len[dns];i+=4) - fprintf(f,"nameserver %u.%u.%u.%u\n", - ((unsigned char *)DhcpOptions.val[dns])[i], - ((unsigned char *)DhcpOptions.val[dns])[i+1], - ((unsigned char *)DhcpOptions.val[dns])[i+2], - ((unsigned char *)DhcpOptions.val[dns])[i+3]); --#if 0 -- if ( DhcpOptions.len[nisDomainName] + DhcpOptions.len[domainName] ) -- { -- fprintf(f,"search"); -- if ( DhcpOptions.len[nisDomainName] ) -- fprintf(f," %s",(char *)DhcpOptions.val[nisDomainName]); -- if ( DhcpOptions.len[domainName] ) -- fprintf(f," %s",(char *)DhcpOptions.val[domainName]); -- fprintf(f,"\n"); -- } --#else -- if ( DhcpOptions.len[domainName] ) -- fprintf(f,"search %s\n",(char *)DhcpOptions.val[domainName]); --#endif -+ - fclose(f); - } - else -@@ -416,37 +407,47 @@ - * because the resolver won't notice the change in resolv.conf */ - (void)res_init(); - } -- if ( ReplNISConf ) -+ if ( ReplNISConf && (DhcpOptions.len[nisDomainName] || DhcpOptions.len[nisServers])) - { -- yp_renamed=1+rename(NIS_CONF,""NIS_CONF".sv"); -- f=fopen(NIS_CONF,"w"); -+ yp_renamed=1+rename(nis_file, nis_file_sv); -+ f=fopen(nis_file, "w"); - if ( f ) - { -+ fprintf(f, "# Generated by dhcpcd for interface %s\n", IfName); - int i; -- char *domain=NULL; -- if ( DhcpOptions.len[nisDomainName] ) -- domain=(char *)DhcpOptions.val[nisDomainName]; -+ char *prefix=NULL; -+ if ( DhcpOptions.len[nisDomainName] ) { -+ if ( DhcpOptions.len[nisServers] ) { -+ prefix=(char *)malloc(DhcpOptions.len[nisDomainName] + 15); -+ sprintf(prefix, "domain %s server", (char *)DhcpOptions.val[nisDomainName]); -+ } -+ else -+ fprintf(f, "domain %s broadcast\n", (char *)DhcpOptions.val[nisDomainName]); -+ } - else -- domain=(char *)DhcpOptions.val[domainName]; -+ prefix=strdup("ypserver"); -+ - for (i=0;i<DhcpOptions.len[nisServers];i+=4) -- fprintf(f,"domain %s server %u.%u.%u.%u\n",(domain?domain:"localdomain"), -+ fprintf(f, "%s %u.%u.%u.%u\n", prefix, - ((unsigned char *)DhcpOptions.val[nisServers])[i], - ((unsigned char *)DhcpOptions.val[nisServers])[i+1], - ((unsigned char *)DhcpOptions.val[nisServers])[i+2], - ((unsigned char *)DhcpOptions.val[nisServers])[i+3]); -- if ( !DhcpOptions.len[nisServers] ) -- fprintf(f,"domain %s broadcast\n", (domain?domain:"localdomain")); -+ - fclose(f); -+ -+ if (prefix) free(prefix); - } - else - syslog(LOG_ERR,"dhcpConfig: fopen: %m\n"); - } -- if ( ReplNTPConf ) -+ if ( ReplNTPConf && DhcpOptions.len[ntpServers]>=4 ) - { -- ntp_renamed=1+rename(NTP_CONF,""NTP_CONF".sv"); -- f=fopen(NTP_CONF,"w"); -+ ntp_renamed=1+rename(ntp_file, ntp_file_sv); -+ f=fopen(ntp_file, "w"); - if ( f ) - { -+ fprintf(f, "# Generated by dhcpcd for interface %s\n", IfName); - int net, mask; - memcpy(&mask,DhcpOptions.val[subnetMask],4); - net = DhcpIface.ciaddr & mask; -@@ -454,17 +455,7 @@ - /* Note: Revise drift/log file names and stratum for local clock */ - fprintf(f,"restrict default noquery notrust nomodify\n"); - fprintf(f,"restrict 127.0.0.1\n"); -- fprintf(f,"restrict %u.%u.%u.%u mask %u.%u.%u.%u\n", -- ((unsigned char *)&net)[0], -- ((unsigned char *)&net)[1], -- ((unsigned char *)&net)[2], -- ((unsigned char *)&net)[3], -- ((unsigned char *)&mask)[0], -- ((unsigned char *)&mask)[1], -- ((unsigned char *)&mask)[2], -- ((unsigned char *)&mask)[3]); -- if ( DhcpOptions.len[ntpServers]>=4 ) -- { -+ - int i; - char addr[4*3+3*1+1]; - for (i=0;i<DhcpOptions.len[ntpServers];i+=4) -@@ -474,15 +465,10 @@ - ((unsigned char *)DhcpOptions.val[ntpServers])[i+1], - ((unsigned char *)DhcpOptions.val[ntpServers])[i+2], - ((unsigned char *)DhcpOptions.val[ntpServers])[i+3]); -- fprintf(f,"restrict %s\nserver %s\n",addr,addr); -+ fprintf(f,"restrict %s nomodify notrap noquery\nserver %s\n",addr,addr); - } -- } -- else -- { /* No servers found, use local clock */ -- fprintf(f, "fudge 127.127.1.0 stratum 3\n"); -- fprintf(f, "server 127.127.1.0\n"); -- } -- fprintf(f, "driftfile /var/lib/ntp/ntp.drift\n"); -+ -+ fprintf(f, "driftfile /var/lib/ntp/ntp.drift\n"); - fprintf(f, "logfile /var/log/ntp.log\n"); - fclose(f); - } ---- pathnames.h.orig 2005-06-02 23:27:39.011508464 +0100 -+++ pathnames.h 2005-06-02 23:29:32.415268472 +0100 -@@ -34,15 +34,15 @@ - #define EXEC_ON_CHANGE "%s/"PROGRAM_NAME".exe" - - #ifdef EMBED -+#define ETC_DIR "/etc/config" - #define CONFIG_DIR "/etc/config/dhcpc" --#define RESOLV_CONF "/etc/config/resolv.conf" --#define NIS_CONF "/etc/config/yp.conf" --#define NTP_CONF "/etc/config/ntp.conf" - #else -+#define ETC_DIR "/etc" - #define CONFIG_DIR "/var/lib/dhcpc" --#define RESOLV_CONF "/etc/resolv.conf" --#define NIS_CONF "/etc/yp.conf" --#define NTP_CONF "/etc/ntp.conf" - #endif - -+#define RESOLV_FILE "%s/resolv.conf" -+#define NIS_FILE "%s/yp.conf" -+#define NTP_FILE "%s/ntp.conf" -+ - #endif 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 deleted file mode 100644 index 4e0ba4c17151..000000000000 --- a/net-misc/dhcpcd/files/dhcpcd-1.3.22_p4-man.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- 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-no-iface-down.diff b/net-misc/dhcpcd/files/dhcpcd-1.3.22_p4-no-iface-down.diff deleted file mode 100644 index 5736a5e6f1dd..000000000000 --- a/net-misc/dhcpcd/files/dhcpcd-1.3.22_p4-no-iface-down.diff +++ /dev/null @@ -1,80 +0,0 @@ -diff -uNr dhcpcd-1.3.22-pl4.orig/client.c dhcpcd-1.3.22-pl4/client.c ---- dhcpcd-1.3.22-pl4.orig/client.c 2003-11-12 13:19:38.000000000 +0100 -+++ dhcpcd-1.3.22-pl4/client.c 2003-11-12 14:39:45.000000000 +0100 -@@ -73,6 +73,7 @@ - extern int resolv_renamed,yp_renamed,ntp_renamed; - extern int InitialHostName_len,InitialDomainName_len; - extern char *InitialHostName,*InitialDomainName; -+extern int DownIfaceOnStop; - - #if 0 - extern unsigned char ClientMACaddr[ETH_ALEN]; -@@ -1142,9 +1143,12 @@ - if ( ioctl(dhcpSocket,SIOCSIFADDR,&ifr) == -1 ) - syslog(LOG_ERR,"dhcpStop: ioctl SIOCSIFADDR: %m\n"); - #endif -- ifr.ifr_flags = saved_if_flags & ~IFF_UP; -- if ( (IfName_len==IfNameExt_len) && ioctl(dhcpSocket,SIOCSIFFLAGS,&ifr) ) -- syslog(LOG_ERR,"dhcpStop: ioctl SIOCSIFFLAGS: %m\n"); -+ if (DownIfaceOnStop) -+ { -+ ifr.ifr_flags = saved_if_flags & ~IFF_UP; -+ if ( (IfName_len==IfNameExt_len) && ioctl(dhcpSocket,SIOCSIFFLAGS,&ifr) ) -+ syslog(LOG_ERR,"dhcpStop: ioctl SIOCSIFFLAGS: %m\n"); -+ } - tsc: - close(dhcpSocket); - if ( resolv_renamed ) -diff -uNr dhcpcd-1.3.22-pl4.orig/dhcpcd.8 dhcpcd-1.3.22-pl4/dhcpcd.8 ---- dhcpcd-1.3.22-pl4.orig/dhcpcd.8 2003-11-12 13:19:38.000000000 +0100 -+++ dhcpcd-1.3.22-pl4/dhcpcd.8 2003-11-12 14:39:45.000000000 +0100 -@@ -9,7 +9,7 @@ - .in +.5i - .ti -.5i - dhcpcd --\%[\-dknrzBCDHNRSTY] -+\%[\-dknorzBCDHNRSTY] - \%[\-t\ <timeout>] - \%[\-c\ <ExecFilePath>] - \%[-h\ <hostname>] -@@ -121,6 +121,13 @@ - .B dhcpcd - follows the normal startup procedure. - .TP -+.BI \-o -+Prevents -+.B dhcpcd -+from bringing -+.B interface -+down on exit. -+.TP - .BI \-r - Makes dhcpcd RFC1541 (obsolete) compliant. - .B dhcpcd -diff -uNr dhcpcd-1.3.22-pl4.orig/dhcpcd.c dhcpcd-1.3.22-pl4/dhcpcd.c ---- dhcpcd-1.3.22-pl4.orig/dhcpcd.c 2003-11-12 13:19:38.000000000 +0100 -+++ dhcpcd-1.3.22-pl4/dhcpcd.c 2003-11-12 15:20:11.000000000 +0100 -@@ -70,6 +70,7 @@ - int Window = 0; - char *ConfigDir = CONFIG_DIR; - int SetDHCPDefaultRoutes= 1; -+int DownIfaceOnStop = 1; - #if 0 - unsigned char ClientMACaddr[ETH_ALEN]; - int ClientMACaddr_ind = 0; -@@ -326,10 +327,14 @@ - goto usage; - s=1; - if ( LeaseTime > 0 ) break; -+ case 'o': -+ s++; -+ DownIfaceOnStop=0; -+ break; - default: - usage: print_version(); - fprintf(stderr, --"Usage: dhcpcd [-dknrzBCDHNRSTY] [-l leasetime] [-h hostname] [-t timeout]\n\ -+"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"); - exit(1); 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 deleted file mode 100644 index fb65c8791196..000000000000 --- a/net-misc/dhcpcd/files/dhcpcd-1.3.22_p4-optionFQDN.patch +++ /dev/null @@ -1,531 +0,0 @@ -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++; -@@ -373,11 +373,19 @@ - break; - default: - usage: print_version(); -+#ifndef 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]] [-m routemetric]\n\ - [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]] [-m routemetric]\n\ -+ [-F none|ptr|both] [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 deleted file mode 100644 index 453b0191ddc1..000000000000 --- a/net-misc/dhcpcd/files/dhcpcd-1.3.22_p4-routemetric.patch +++ /dev/null @@ -1,152 +0,0 @@ ---- dhcpconfig.c.orig 2005-06-01 11:30:15.141614117 +0100 -+++ dhcpconfig.c 2005-06-01 13:14:09.131020527 +0100 -@@ -52,6 +52,7 @@ - extern int ReplResolvConf; - extern int ReplNISConf; - extern int ReplNTPConf; -+extern int RouteMetric; - extern int IfName_len,IfNameExt_len; - extern char *IfName,*IfNameExt,*Cfilename,*ConfigDir; - extern char **ProgramEnviron; -@@ -157,7 +158,7 @@ - #else - rtent.rt_dev = IfNameExt; - #endif --rtent.rt_metric = 1; -+rtent.rt_metric = RouteMetric; - rtent.rt_window = Window; - rtent.rt_flags = RTF_UP|RTF_GATEWAY|(Window ? RTF_WINDOW : 0); - if ( ioctl(dhcpSocket,SIOCADDRT,&rtent) == -1 ) -@@ -179,7 +180,7 @@ - #else - rtent.rt_dev = IfNameExt; - #endif -- rtent.rt_metric = 0; -+ rtent.rt_metric = RouteMetric; - rtent.rt_flags = RTF_UP|RTF_HOST; - if ( ioctl(dhcpSocket,SIOCADDRT,&rtent) == 0 ) - { -@@ -198,7 +199,7 @@ - #else - rtent.rt_dev = IfNameExt; - #endif -- rtent.rt_metric = 1; -+ rtent.rt_metric = RouteMetric; - rtent.rt_window = Window; - rtent.rt_flags = RTF_UP|RTF_GATEWAY|(Window ? RTF_WINDOW : 0); - if ( ioctl(dhcpSocket,SIOCADDRT,&rtent) == -1 ) -@@ -260,8 +261,11 @@ - if ( ioctl(dhcpSocket,SIOCSIFBRDADDR,&ifr) == -1 ) /* setting broadcast address */ - syslog(LOG_ERR,"dhcpConfig: ioctl SIOCSIFBRDADDR: %m\n"); - -- /* setting local route - not needed on later kernels */ --#ifdef OLD_LINUX_VERSION -+ /* -+ * setting local route -+ * need to delete kernel added route on newer kernels -+ */ -+#ifndef OLD_LINUX_VERSION - memset(&rtent,0,sizeof(struct rtentry)); - p = (struct sockaddr_in *)&rtent.rt_dst; - p->sin_family = AF_INET; -@@ -276,9 +280,26 @@ - rtent.rt_dev = IfName; - rtent.rt_metric = 1; - rtent.rt_flags = RTF_UP; -+ if ( ioctl(dhcpSocket,SIOCDELRT,&rtent) ) -+ syslog(LOG_ERR,"dhcpConfig: ioctl SIOCDELRT: %m\n"); -+#endif -+ -+ memset(&rtent,0,sizeof(struct rtentry)); -+ p = (struct sockaddr_in *)&rtent.rt_dst; -+ p->sin_family = AF_INET; -+ memcpy(&p->sin_addr.s_addr,DhcpOptions.val[subnetMask],4); -+ p->sin_addr.s_addr &= DhcpIface.ciaddr; -+ p = (struct sockaddr_in *)&rtent.rt_gateway; -+ p->sin_family = AF_INET; -+ p->sin_addr.s_addr = 0; -+ p = (struct sockaddr_in *)&rtent.rt_genmask; -+ p->sin_family = AF_INET; -+ memcpy(&p->sin_addr.s_addr,DhcpOptions.val[subnetMask],4); -+ rtent.rt_dev = IfName; -+ rtent.rt_metric = RouteMetric; -+ rtent.rt_flags = RTF_UP; - if ( ioctl(dhcpSocket,SIOCADDRT,&rtent) ) - syslog(LOG_ERR,"dhcpConfig: ioctl SIOCADDRT: %m\n"); --#endif - - for (i=0;i<DhcpOptions.len[staticRoute];i+=8) - { /* setting static routes */ -@@ -303,7 +324,7 @@ - #else - rtent.rt_dev = IfNameExt; - #endif -- rtent.rt_metric = 1; -+ rtent.rt_metric = RouteMetric; - if ( ioctl(dhcpSocket,SIOCADDRT,&rtent) ) - syslog(LOG_ERR,"dhcpConfig: ioctl SIOCADDRT: %m\n"); - } ---- dhcpcd.c.orig 2005-06-01 11:38:08.987350330 +0100 -+++ dhcpcd.c 2005-06-01 13:13:44.174087798 +0100 -@@ -57,6 +57,7 @@ - int ReplResolvConf = 1; - int ReplNISConf = 1; - int ReplNTPConf = 1; -+int RouteMetric = 1; - int SetDomainName = 0; - int SetHostName = 0; - int BroadcastResp = 0; -@@ -138,6 +139,23 @@ - s++; - killFlag=SIGHUP; - goto prgs; -+ case 'm': -+ if ( argc[i][s+1] ) goto usage; -+ i++; -+ if ( ! argc[i] ) goto usage; -+ char *tmp; -+ errno = 0; -+ long m=strtol(argc[i], &tmp, 0); -+ if (argc[i][0] == '\0' || *tmp != '\0' ) goto usage; -+ if ((errno == ERANGE && -+ (m == LONG_MAX || m == LONG_MIN )) || -+ (m > INT_MAX || m < INT_MIN)) -+ goto usage; -+ RouteMetric=m; -+ if (RouteMetric < INT_MAX) RouteMetric++; -+ i++; -+ s=1; -+ break; - case 'n': - s++; - killFlag=SIGALRM; -@@ -336,7 +353,8 @@ - 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"); -+ [-w windowsize] [-L ConfigDir] [-G [gateway]] [-m routemetric]\n\ -+ [interface]\n"); - exit(1); - } - else ---- dhcpcd.8.orig 2005-06-01 13:28:30.899167422 +0100 -+++ dhcpcd.8 2005-06-01 13:31:39.003123246 +0100 -@@ -20,6 +20,7 @@ - \%[\-G\ [gateway]] - \%[\-w\ <windowsize>] - \%[\-L\ <ConfigDir>] -+\%[\-m\ <routemetric>] - \%[interface] - .in -.5i - .SH DESCRIPTION -@@ -108,6 +109,9 @@ - .B without - destroying the dhcpcd cache. - .TP -+.BI \-m \ <routemetric> -+routes will be added with the given metric. The default is 0. -+.TP - .BI \-n - Sends - .B SIGALRM diff --git a/net-misc/dhcpcd/files/dhcpcd-1.3.22_p4-security.patch b/net-misc/dhcpcd/files/dhcpcd-1.3.22_p4-security.patch deleted file mode 100644 index c8d8fb6448de..000000000000 --- a/net-misc/dhcpcd/files/dhcpcd-1.3.22_p4-security.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- client.c.orig 2005-07-10 10:16:43.000000000 +0100 -+++ client.c 2005-07-10 10:22:31.000000000 +0100 -@@ -129,6 +129,8 @@ - default: - if ( p[1] ) - { -+ if (p + 2 + p[1] >= end) -+ goto swend; /* Corrupt packet */ - if ( DhcpOptions.len[*p] == p[1] ) - memcpy(DhcpOptions.val[*p],p+2,p[1]); - else diff --git a/net-misc/dhcpcd/files/digest-dhcpcd-1.3.22_p4-r11 b/net-misc/dhcpcd/files/digest-dhcpcd-1.3.22_p4-r11 deleted file mode 100644 index 80b4247cc65e..000000000000 --- a/net-misc/dhcpcd/files/digest-dhcpcd-1.3.22_p4-r11 +++ /dev/null @@ -1,3 +0,0 @@ -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 |