Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 652925 Details for
Bug 875798
NTP service crashed after stopping network service
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
fix IPv6 only interface iteration
ntp-4.2.4p2-noif.patch (text/plain), 3.56 KB, created by
Miroslav Lichvar
on 2012-11-27 16:57:28 UTC
(
hide
)
Description:
fix IPv6 only interface iteration
Filename:
MIME Type:
Creator:
Miroslav Lichvar
Created:
2012-11-27 16:57:28 UTC
Size:
3.56 KB
patch
obsolete
>diff -up ntp-4.2.4p2/libisc/ifiter_sysctl.c.noif ntp-4.2.4p2/libisc/ifiter_sysctl.c >--- ntp-4.2.4p2/libisc/ifiter_sysctl.c.noif 2006-06-06 22:16:23.000000000 +0200 >+++ ntp-4.2.4p2/libisc/ifiter_sysctl.c 2007-09-24 16:08:55.000000000 +0200 >@@ -309,7 +309,10 @@ internal_destroy(isc_interfaceiter_t *it > */ > } > >-static >-void internal_first(isc_interfaceiter_t *iter) { >+static isc_result_t >+internal_first(isc_interfaceiter_t *iter) { > iter->pos = 0; >+ if (iter->pos >= iter->bufused) >+ return (ISC_R_NOMORE); >+ return (ISC_R_SUCCESS); > } >diff -up ntp-4.2.4p2/libisc/ifiter_ioctl.c.noif ntp-4.2.4p2/libisc/ifiter_ioctl.c >--- ntp-4.2.4p2/libisc/ifiter_ioctl.c.noif 2007-09-24 16:08:55.000000000 +0200 >+++ ntp-4.2.4p2/libisc/ifiter_ioctl.c 2007-09-24 16:08:55.000000000 +0200 >@@ -568,7 +571,6 @@ internal_current4(isc_interfaceiter_t *i > #endif > > REQUIRE(VALID_IFITER(iter)); >- REQUIRE (iter->pos < (unsigned int) iter->ifc.ifc_len); > > #ifdef __linux > result = linux_if_inet6_current(iter); >@@ -577,6 +579,7 @@ internal_current4(isc_interfaceiter_t *i > iter->first = ISC_TRUE; > #endif > >+ REQUIRE (iter->pos < (unsigned int) iter->ifc.ifc_len); > ifrp = (struct ifreq *)((char *) iter->ifc.ifc_req + iter->pos); > > memset(&ifreq, 0, sizeof(ifreq)); >@@ -1005,14 +1005,16 @@ static isc_result_t > internal_next4(isc_interfaceiter_t *iter) { > struct ifreq *ifrp; > >- REQUIRE (iter->pos < (unsigned int) iter->ifc.ifc_len); >- > #ifdef __linux > if (linux_if_inet6_next(iter) == ISC_R_SUCCESS) > return (ISC_R_SUCCESS); >- if (!iter->first) >+ if (!iter->first) { >+ if (iter->pos >= (unsigned int) iter->ifc.ifc_len) >+ return (ISC_R_NOMORE); > return (ISC_R_SUCCESS); >+ } > #endif >+ REQUIRE (iter->pos < (unsigned int) iter->ifc.ifc_len); > ifrp = (struct ifreq *)((char *) iter->ifc.ifc_req + iter->pos); > > #ifdef ISC_PLATFORM_HAVESALEN >@@ -1098,8 +1098,8 @@ internal_destroy(isc_interfaceiter_t *it > #endif > } > >-static >-void internal_first(isc_interfaceiter_t *iter) { >+static isc_result_t >+internal_first(isc_interfaceiter_t *iter) { > #ifdef HAVE_TRUCLUSTER > int clua_result; > #endif >@@ -1118,5 +1118,10 @@ void internal_first(isc_interfaceiter_t > #endif > #ifdef __linux > linux_if_inet6_first(iter); >+ if (iter->valid == ISC_R_SUCCESS) >+ return (iter->valid); > #endif >+ if (iter->pos >= (unsigned int) iter->ifc.ifc_len) >+ return (ISC_R_NOMORE); >+ return (ISC_R_SUCCESS); > } >diff -up ntp-4.2.4p2/libisc/interfaceiter.c.noif ntp-4.2.4p2/libisc/interfaceiter.c >--- ntp-4.2.4p2/libisc/interfaceiter.c.noif 2006-06-06 22:16:24.000000000 +0200 >+++ ntp-4.2.4p2/libisc/interfaceiter.c 2007-09-24 16:08:55.000000000 +0200 >@@ -170,14 +170,11 @@ isc_interfaceiter_first(isc_interfaceite > > REQUIRE(VALID_IFITER(iter)); > >- internal_first(iter); >- for (;;) { >+ for (result = internal_first(iter); result == ISC_R_SUCCESS; >+ result = internal_next(iter)) { > result = internal_current(iter); > if (result != ISC_R_IGNORE) > break; >- result = internal_next(iter); >- if (result != ISC_R_SUCCESS) >- break; > } > iter->result = result; > return (result); >diff -up ntp-4.2.4p2/libisc/ifiter_getifaddrs.c.noif ntp-4.2.4p2/libisc/ifiter_getifaddrs.c >--- ntp-4.2.4p2/libisc/ifiter_getifaddrs.c.noif 2006-06-06 22:16:22.000000000 +0200 >+++ ntp-4.2.4p2/libisc/ifiter_getifaddrs.c 2007-09-24 16:08:55.000000000 +0200 >@@ -185,7 +185,10 @@ internal_destroy(isc_interfaceiter_t *it > iter->ifaddrs = NULL; > } > >-static >-void internal_first(isc_interfaceiter_t *iter) { >+static isc_result_t >+internal_first(isc_interfaceiter_t *iter) { > iter->pos = iter->ifaddrs; >+ if (iter->pos == NULL) >+ return (ISC_R_NOMORE); >+ return (ISC_R_SUCCESS); > }
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 875798
: 652925