Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.sbin/mtrace ignore non-AF_INET addrs. from openbsd
details: https://anonhg.NetBSD.org/src/rev/69b413c3f797
branches: trunk
changeset: 552300:69b413c3f797
user: itojun <itojun%NetBSD.org@localhost>
date: Tue Sep 23 10:50:51 2003 +0000
description:
ignore non-AF_INET addrs. from openbsd
diffstat:
usr.sbin/mtrace/mtrace.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diffs (27 lines):
diff -r dea131fe6a26 -r 69b413c3f797 usr.sbin/mtrace/mtrace.c
--- a/usr.sbin/mtrace/mtrace.c Tue Sep 23 10:26:54 2003 +0000
+++ b/usr.sbin/mtrace/mtrace.c Tue Sep 23 10:50:51 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: mtrace.c,v 1.33 2003/09/06 12:45:01 itojun Exp $ */
+/* $NetBSD: mtrace.c,v 1.34 2003/09/23 10:50:51 itojun Exp $ */
/*
* mtrace.c
@@ -52,7 +52,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: mtrace.c,v 1.33 2003/09/06 12:45:01 itojun Exp $");
+__RCSID("$NetBSD: mtrace.c,v 1.34 2003/09/23 10:50:51 itojun Exp $");
#endif
#include <sys/types.h>
@@ -307,6 +307,8 @@
return (retval);
}
for (ifa = ifap; ifa; ifa = ifa->ifa_next) {
+ if (ifa->ifa_addr->sa_family != AF_INET)
+ continue;
if_addr = ((struct sockaddr_in *)ifa->ifa_addr)->sin_addr.s_addr;
if_mask = ((struct sockaddr_in *)ifa->ifa_netmask)->sin_addr.s_addr;
if ((dst & if_mask) == (if_addr & if_mask)) {
Home |
Main Index |
Thread Index |
Old Index