Module Name: src Committed By: roy Date: Wed Sep 21 14:50:48 UTC 2016
Modified Files: src/usr.sbin/ifwatchd: ifwatchd.c Log Message: Skip message if not our RTM_VERSION and silently ignore old message types. To generate a diff of this commit: cvs rdiff -u -r1.28 -r1.29 src/usr.sbin/ifwatchd/ifwatchd.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/usr.sbin/ifwatchd/ifwatchd.c diff -u src/usr.sbin/ifwatchd/ifwatchd.c:1.28 src/usr.sbin/ifwatchd/ifwatchd.c:1.29 --- src/usr.sbin/ifwatchd/ifwatchd.c:1.28 Wed Sep 21 14:46:55 2016 +++ src/usr.sbin/ifwatchd/ifwatchd.c Wed Sep 21 14:50:48 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: ifwatchd.c,v 1.28 2016/09/21 14:46:55 roy Exp $ */ +/* $NetBSD: ifwatchd.c,v 1.29 2016/09/21 14:50:48 roy Exp $ */ /*- * Copyright (c) 2002, 2003 The NetBSD Foundation, Inc. @@ -262,6 +262,9 @@ dispatch(void *msg, size_t len) struct ifa_msghdr *ifam; enum event ev; + if (hd->rtm_version != RTM_VERSION) + return; + switch (hd->rtm_type) { case RTM_NEWADDR: ev = UP; @@ -284,6 +287,9 @@ dispatch(void *msg, size_t len) case RTM_REDIRECT: case RTM_MISS: case RTM_IEEE80211: + case RTM_ONEWADDR: + case RTM_ODELADDR: + case RTM_OCHGADDR: return; } if (verbose)