From febeb2d1ffbd910cd2d4d4b83100015206e56d68 Mon Sep 17 00:00:00 2001 From: Harlan Stenn Date: Mon, 12 Nov 2012 00:58:20 -0500 Subject: [PATCH] [Bug 1217] libisc/ifiter_sysctl.c:internal_current(): Ignore RTM messages with wrong version bk: 50a08ffcFK8EH3R4BEHkML1RypfMuw --- ChangeLog | 2 ++ lib/isc/unix/ifiter_sysctl.c | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/ChangeLog b/ChangeLog index 4ee0f8710..7cd8d994f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,6 @@ * [Bug 969] Clarify ntpdate.html documentation about -u and ntpd. +* [Bug 1217] libisc/ifiter_sysctl.c:internal_current(): Ignore RTM + messages with wrong version (4.2.7p319) 2012/11/11 Released by Harlan Stenn * [Bug 2296] Fix compile problem with building with old OpenSSL. (4.2.7p318) 2012/11/05 Released by Harlan Stenn diff --git a/lib/isc/unix/ifiter_sysctl.c b/lib/isc/unix/ifiter_sysctl.c index 2c56f3ebb..0fbb3778e 100644 --- a/lib/isc/unix/ifiter_sysctl.c +++ b/lib/isc/unix/ifiter_sysctl.c @@ -159,6 +159,10 @@ internal_current(isc_interfaceiter_t *iter) { ifam = (struct ifa_msghdr *) ((char *) iter->buf + iter->pos); ifam_end = (struct ifa_msghdr *) ((char *) iter->buf + iter->bufused); + // Skip wrong RTM version headers + if (ifam->ifam_version != RTM_VERSION) + return (ISC_R_IGNORE); + if (ifam->ifam_type == RTM_IFINFO) { struct if_msghdr *ifm = (struct if_msghdr *) ifam; struct sockaddr_dl *sdl = (struct sockaddr_dl *) (ifm + 1); -- 2.47.3