From 7f0e3e8df1a47581ec20d3554c6edcd010d4766d Mon Sep 17 00:00:00 2001 From: krw Date: Wed, 3 Aug 2016 23:22:48 +0000 Subject: [PATCH] Apply fix from David Binderman via NetBSD. "Use all 3 of b, p, n to determine if route changed". Spotted by the Echelon team with AppChecker static analyzer. NetBSD fix pointed out by millert@ --- usr.sbin/mtrace/mtrace.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.sbin/mtrace/mtrace.c b/usr.sbin/mtrace/mtrace.c index fa7141bbbd0..7f2c52ea038 100644 --- a/usr.sbin/mtrace/mtrace.c +++ b/usr.sbin/mtrace/mtrace.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mtrace.c,v 1.35 2016/03/07 00:16:35 mmcc Exp $ */ +/* $OpenBSD: mtrace.c,v 1.36 2016/08/03 23:22:48 krw Exp $ */ /* $NetBSD: mtrace.c,v 1.5 1995/12/10 10:57:15 mycroft Exp $ */ /* @@ -1057,7 +1057,7 @@ print_stats(struct resp_buf *base, struct resp_buf *prev, struct resp_buf *new) } while (TRUE) { - if ((n->tr_inaddr != b->tr_inaddr) || (n->tr_inaddr != b->tr_inaddr)) + if ((n->tr_inaddr != b->tr_inaddr) || (p->tr_inaddr != b->tr_inaddr)) return 1; /* Route changed */ if ((n->tr_inaddr != n->tr_outaddr)) -- 2.20.1