diff options
author | Roy Marples <uberlord@gentoo.org> | 2005-06-01 17:36:52 +0000 |
---|---|---|
committer | Roy Marples <uberlord@gentoo.org> | 2005-06-01 17:36:52 +0000 |
commit | 6af102eb1e8b451ca454e798670e9a5ca22c604f (patch) | |
tree | 84db140cf0c63b122960e990f94014b8a5cbc952 /net-misc | |
parent | How this was not already keyworded for mips is quite beyond me. (diff) | |
download | gentoo-2-6af102eb1e8b451ca454e798670e9a5ca22c604f.tar.gz gentoo-2-6af102eb1e8b451ca454e798670e9a5ca22c604f.tar.bz2 gentoo-2-6af102eb1e8b451ca454e798670e9a5ca22c604f.zip |
Made routemetric and FQDN patches work together
(Portage version: 2.0.51.19)
Diffstat (limited to 'net-misc')
-rw-r--r-- | net-misc/dhcpcd/ChangeLog | 10 | ||||
-rw-r--r-- | net-misc/dhcpcd/Manifest | 8 | ||||
-rw-r--r-- | net-misc/dhcpcd/dhcpcd-1.3.22_p4-r9.ebuild (renamed from net-misc/dhcpcd/dhcpcd-1.3.22_p4-r8.ebuild) | 7 | ||||
-rw-r--r-- | net-misc/dhcpcd/files/dhcpcd-1.3.22_p4-optionFQDN.patch | 21 | ||||
-rw-r--r-- | net-misc/dhcpcd/files/dhcpcd-1.3.22_p4-routemetric.patch | 146 | ||||
-rw-r--r-- | net-misc/dhcpcd/files/digest-dhcpcd-1.3.22_p4-r9 (renamed from net-misc/dhcpcd/files/digest-dhcpcd-1.3.22_p4-r8) | 0 |
6 files changed, 167 insertions, 25 deletions
diff --git a/net-misc/dhcpcd/ChangeLog b/net-misc/dhcpcd/ChangeLog index 41621aab9112..cca0d5639e03 100644 --- a/net-misc/dhcpcd/ChangeLog +++ b/net-misc/dhcpcd/ChangeLog @@ -1,6 +1,14 @@ # 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.41 2005/06/01 15:24:58 uberlord Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcpcd/ChangeLog,v 1.42 2005/06/01 17:36:52 uberlord Exp $ + +*dhcpcd-1.3.22_p4-r9 (01 Jun 2005) + + 01 Jun 2005; Roy Marples <uberlord@gentoo.org> + files/dhcpcd-1.3.22_p4-optionFQDN.patch, + files/dhcpcd-1.3.22_p4-routemetric.patch, -dhcpcd-1.3.22_p4-r8.ebuild, + +dhcpcd-1.3.22_p4-r9.ebuild: + Made routemetric and FQDN patches work together *dhcpcd-1.3.22_p4-r8 (01 Jun 2005) diff --git a/net-misc/dhcpcd/Manifest b/net-misc/dhcpcd/Manifest index 17e402c17079..879feef31eb6 100644 --- a/net-misc/dhcpcd/Manifest +++ b/net-misc/dhcpcd/Manifest @@ -2,11 +2,11 @@ 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 e1c4db70482c746c242283889c005ca8 dhcpcd-1.3.22_p4-r9.ebuild 2266 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 ad580fb02fc1fa72a24fb3c952491bce files/dhcpcd-1.3.22_p4-routemetric.patch 4652 +MD5 34b2bd2c58141701c8ba5279c6669e0c files/dhcpcd-1.3.22_p4-optionFQDN.patch 17381 MD5 e5580d4472c718a772f6e1c700757968 files/dhcpcd-1.3.22_p4-no-iface-down.diff 2606 MD5 daaf0c8fa44a481c8943f585ff870714 files/digest-dhcpcd-1.3.22_p4-r5 224 MD5 daaf0c8fa44a481c8943f585ff870714 files/digest-dhcpcd-1.3.22_p4-r7 224 -MD5 daaf0c8fa44a481c8943f585ff870714 files/digest-dhcpcd-1.3.22_p4-r8 224 +MD5 daaf0c8fa44a481c8943f585ff870714 files/digest-dhcpcd-1.3.22_p4-r9 224 diff --git a/net-misc/dhcpcd/dhcpcd-1.3.22_p4-r8.ebuild b/net-misc/dhcpcd/dhcpcd-1.3.22_p4-r9.ebuild index ee2b0880d61d..d769681e6385 100644 --- a/net-misc/dhcpcd/dhcpcd-1.3.22_p4-r8.ebuild +++ b/net-misc/dhcpcd/dhcpcd-1.3.22_p4-r9.ebuild @@ -1,6 +1,6 @@ # 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 $ +# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcpcd/dhcpcd-1.3.22_p4-r9.ebuild,v 1.1 2005/06/01 17:36:52 uberlord Exp $ inherit gnuconfig flag-o-matic eutils @@ -47,13 +47,14 @@ src_unpack() { # 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 + # 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 + append-flags -DDRAFT_OPTION_FQDN econf --prefix=/ || die emake || die } 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 index 2789490b7ed6..fb65c8791196 100644 --- a/net-misc/dhcpcd/files/dhcpcd-1.3.22_p4-optionFQDN.patch +++ b/net-misc/dhcpcd/files/dhcpcd-1.3.22_p4-optionFQDN.patch @@ -472,21 +472,22 @@ diff -ur dhcpcd-1.3.22-pl4.orig/dhcpcd.c dhcpcd-1.3.22-pl4/dhcpcd.c case 't': if ( argc[i][s+1] ) goto usage; i++; -@@ -333,10 +356,17 @@ +@@ -373,11 +373,19 @@ 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, ++#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]] [interface]\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); } 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 index 0b93ea090d37..453b0191ddc1 100644 --- a/net-misc/dhcpcd/files/dhcpcd-1.3.22_p4-routemetric.patch +++ b/net-misc/dhcpcd/files/dhcpcd-1.3.22_p4-routemetric.patch @@ -1,5 +1,137 @@ +--- 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:41:53.027864771 +0100 ++++ dhcpcd.8 2005-06-01 13:31:39.003123246 +0100 @@ -20,6 +20,7 @@ \%[\-G\ [gateway]] \%[\-w\ <windowsize>] @@ -8,13 +140,13 @@ \%[interface] .in -.5i .SH DESCRIPTION -@@ -230,6 +231,9 @@ - .B dhcpcd - will return exit code 1 to the parent process. +@@ -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 \-c \ <ExecFilePath> - .B dhcpcd - will try to execute + .BI \-n + Sends + .B SIGALRM 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-r9 index 80b4247cc65e..80b4247cc65e 100644 --- a/net-misc/dhcpcd/files/digest-dhcpcd-1.3.22_p4-r8 +++ b/net-misc/dhcpcd/files/digest-dhcpcd-1.3.22_p4-r9 |