Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.sbin/ifwatchd Skip message if not our RTM_VERSION and si...



details:   https://anonhg.NetBSD.org/src/rev/665b58ce584f
branches:  trunk
changeset: 347892:665b58ce584f
user:      roy <roy%NetBSD.org@localhost>
date:      Wed Sep 21 14:50:48 2016 +0000

description:
Skip message if not our RTM_VERSION and silently ignore old message types.

diffstat:

 usr.sbin/ifwatchd/ifwatchd.c |  8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diffs (29 lines):

diff -r 5a324e347645 -r 665b58ce584f usr.sbin/ifwatchd/ifwatchd.c
--- a/usr.sbin/ifwatchd/ifwatchd.c      Wed Sep 21 14:46:55 2016 +0000
+++ b/usr.sbin/ifwatchd/ifwatchd.c      Wed Sep 21 14:50:48 2016 +0000
@@ -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 @@
        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 @@
        case RTM_REDIRECT:
        case RTM_MISS:
        case RTM_IEEE80211:
+       case RTM_ONEWADDR:
+       case RTM_ODELADDR:
+       case RTM_OCHGADDR:
                return;
        }
        if (verbose)



Home | Main Index | Thread Index | Old Index