Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 89728 Details for
Bug 137478
dhcpcd does not run dhcpcd.exe
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Use unsigned ints for lease times
dhcpcd.patch (text/plain), 3.79 KB, created by
Roy Marples (RETIRED)
on 2006-06-21 08:22:25 UTC
(
hide
)
Description:
Use unsigned ints for lease times
Filename:
MIME Type:
Creator:
Roy Marples (RETIRED)
Created:
2006-06-21 08:22:25 UTC
Size:
3.79 KB
patch
obsolete
>Index: src/dhcpconfig.c >=================================================================== >--- src/dhcpconfig.c (revision 60) >+++ src/dhcpconfig.c (working copy) >@@ -122,9 +122,12 @@ > argc[1]=hostinfo_file; > argc[2]=prm; > argc[3]=NULL; >- if ( execve(exec_on_change,argc,ProgramEnviron) && errno != ENOENT ) >- logger(LOG_ERR,"error executing \"%s %s %s\": %s", >- exec_on_change,hostinfo_file,prm,strerror(errno)); >+ logger(LOG_DEBUG, "about to exec \"%s %s %s\"", exec_on_change, >+ hostinfo_file, prm); >+ if ( execve(exec_on_change,argc,ProgramEnviron) && >+ ( errno != ENOENT || Cfilename ) ) >+ logger(LOG_ERR, "error executing \"%s %s %s\": %s", >+ exec_on_change,hostinfo_file, prm, strerror(errno)); > exit(0); > } > } >@@ -785,19 +788,7 @@ > } > else > logger(LOG_ERR,"dhcpConfig: fopen %s: %s", hostinfo_file, strerror(errno)); >-#if 0 >- if ( Cfilename ) >- if ( fork() == 0 ) >- { >- char *argc[2]; >- argc[0]=Cfilename; >- argc[1]=NULL; >- if ( execve(Cfilename,argc,ProgramEnviron) ) >- logger(LOG_ERR,"error executing \"%s\": %s", >- Cfilename,strerror(errno)); >- exit(0); >- } >-#endif >+ > if ( DhcpIface.ciaddr == prev_ip_addr ) > execute_on_change("up"); > else /* IP address has changed */ >@@ -805,11 +796,7 @@ > execute_on_change("new"); > prev_ip_addr=DhcpIface.ciaddr; > } >-/* if ( *(unsigned int *)DhcpOptions.val[dhcpIPaddrLeaseTime] == 0xffffffff ) >- { >- logger(LOG_INFO,"infinite IP address lease time. Exiting"); >- exit(0); >- } */ >+ > return 0; > } > /*****************************************************************************/ >Index: src/dhcpcd.8 >=================================================================== >--- src/dhcpcd.8 (revision 60) >+++ src/dhcpcd.8 (working copy) >@@ -48,7 +48,8 @@ > > > .SH OPTIONS >-.TP \-a >+.TP >+.BI \-a > Don't do an > .B ARP > check on the IP address give to us by the DHCP server. Normally we do this to >Index: src/client.c >=================================================================== >--- src/client.c (revision 60) >+++ src/client.c (working copy) >@@ -1122,7 +1122,8 @@ > /*****************************************************************************/ > void *dhcpBound() > { >- int i, maxfd; >+ unsigned int i; >+ int maxfd; > fd_set rset; > char foobuf[512]; > >@@ -1175,7 +1176,7 @@ > /*****************************************************************************/ > void *dhcpRenew() > { >- int i; >+ unsigned int i; > if ( sigsetjmp(env,0xffff) ) return &dhcpRebind; > i = ReqSentTime+ntohl(*(unsigned int *)DhcpOptions.val[dhcpT2value])-time(NULL); > if ( i > 0 ) >@@ -1205,7 +1206,7 @@ > /*****************************************************************************/ > void *dhcpRebind() > { >- int i; >+ unsigned int i; > if ( sigsetjmp(env,0xffff) ) return &dhcpStop; > i = ReqSentTime+ntohl(*(unsigned int *)DhcpOptions.val[dhcpIPaddrLeaseTime])-time(NULL); > if ( i > 0 ) >Index: src/dhcpcd.c >=================================================================== >--- src/dhcpcd.c (revision 60) >+++ src/dhcpcd.c (working copy) >@@ -198,8 +198,7 @@ > if ((LogLevel = log_to_level(argc[i])) < 0) > LogLevel = atoi(argc[i]); > i++; >- s=1; >- goto prgs; >+ break; > case 'd': > s++; > LogLevel = log_to_level("LOG_DEBUG"); >Index: ChangeLog >=================================================================== >--- ChangeLog (revision 61) >+++ ChangeLog (working copy) >@@ -1,3 +1,13 @@ >+21 Jun 2006; Roy Marples <uberlord@gentoo.org> >+ >+ Always report exec errors when -c is used, Gentoo bug #137478. >+ >+ Use a unsigned int instead of an int when comparing alarm time > 0. >+ >+ Fixed man page by putting the option -a against its description. >+ >+ Fixed segfault when using the -v option. >+ > ** dhcpcd-2.0.6 Released > > 02 Jun 2006; Roy Marples <uberlord@gentoo.org>
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 137478
:
89714
|
89728
|
89741