mirror of
https://github.com/isc-projects/bind9.git
synced 2026-04-23 07:07:00 -04:00
1673. [port] linux: issue a error messages if IPv6 interface
scans fails.
This commit is contained in:
parent
fda92f1127
commit
7d8e34f866
2 changed files with 20 additions and 4 deletions
3
CHANGES
3
CHANGES
|
|
@ -1,3 +1,6 @@
|
|||
1673. [port] linux: issue a error messages if IPv6 interface
|
||||
scans fails.
|
||||
|
||||
1672. [cleanup] Tests which only function in a threaded build
|
||||
now return R:THREADONLY (rather than R:UNTESTED)
|
||||
in a non-threaded build.
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: ifiter_ioctl.c,v 1.19.2.5.2.12 2004/06/19 01:03:38 marka Exp $ */
|
||||
/* $Id: ifiter_ioctl.c,v 1.19.2.5.2.13 2004/06/22 02:10:48 marka Exp $ */
|
||||
|
||||
/*
|
||||
* Obtain the list of network interfaces using the SIOCGLIFCONF ioctl.
|
||||
|
|
@ -454,15 +454,28 @@ linux_if_inet6_current(isc_interfaceiter_t *iter) {
|
|||
|
||||
if (iter->valid != ISC_R_SUCCESS)
|
||||
return (iter->valid);
|
||||
if (iter->proc == NULL)
|
||||
if (iter->proc == NULL) {
|
||||
isc_log_write(isc_lctx, ISC_LOGCATEGORY_GENERAL,
|
||||
ISC_LOGMODULE_INTERFACE, ISC_LOG_ERROR,
|
||||
"/proc/net/if_inet6:iter->proc == NULL");
|
||||
return (ISC_R_FAILURE);
|
||||
}
|
||||
|
||||
res = sscanf(iter->entry, "%32[a-f0-9] %x %x %x %x %16s\n",
|
||||
address, &ifindex, &prefix, &flag3, &flag4, name);
|
||||
if (res != 6)
|
||||
if (res != 6) {
|
||||
isc_log_write(isc_lctx, ISC_LOGCATEGORY_GENERAL,
|
||||
ISC_LOGMODULE_INTERFACE, ISC_LOG_ERROR,
|
||||
"/proc/net/if_inet6:sscanf() -> %d (expected 6)",
|
||||
res);
|
||||
return (ISC_R_FAILURE);
|
||||
if (strlen(address) != 32)
|
||||
}
|
||||
if (strlen(address) != 32) {
|
||||
isc_log_write(isc_lctx, ISC_LOGCATEGORY_GENERAL,
|
||||
ISC_LOGMODULE_INTERFACE, ISC_LOG_ERROR,
|
||||
"/proc/net/if_inet6:strlen(%s) != 32", address);
|
||||
return (ISC_R_FAILURE);
|
||||
}
|
||||
for (i = 0; i < 16; i++) {
|
||||
unsigned char byte;
|
||||
static const char hex[] = "0123456789abcdef";
|
||||
|
|
|
|||
Loading…
Reference in a new issue