]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
[Bug 1217] libisc/ifiter_sysctl.c:internal_current(): Ignore RTM messages with wrong...
authorHarlan Stenn <stenn@ntp.org>
Mon, 12 Nov 2012 05:58:20 +0000 (00:58 -0500)
committerHarlan Stenn <stenn@ntp.org>
Mon, 12 Nov 2012 05:58:20 +0000 (00:58 -0500)
bk: 50a08ffcFK8EH3R4BEHkML1RypfMuw

ChangeLog
lib/isc/unix/ifiter_sysctl.c

index 4ee0f8710cf15c8efda9e70eec29b1b5f4ece63c..7cd8d994fe772d52f8ebadec14facb667d2a142c 100644 (file)
--- 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 <stenn@ntp.org>
 * [Bug 2296] Fix compile problem with building with old OpenSSL.
 (4.2.7p318) 2012/11/05 Released by Harlan Stenn <stenn@ntp.org>
index 2c56f3ebb12261d9292781a7e84473b685129c5a..0fbb3778e73ade6141f805c826d71681388f6ba1 100644 (file)
@@ -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);