From: Harlan Stenn Date: Mon, 12 Nov 2012 05:58:20 +0000 (-0500) Subject: [Bug 1217] libisc/ifiter_sysctl.c:internal_current(): Ignore RTM messages with wrong... X-Git-Tag: NTP_4_2_7P320~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=febeb2d1ffbd910cd2d4d4b83100015206e56d68;p=thirdparty%2Fntp.git [Bug 1217] libisc/ifiter_sysctl.c:internal_current(): Ignore RTM messages with wrong version bk: 50a08ffcFK8EH3R4BEHkML1RypfMuw --- 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);