From owner-freebsd-hackers@freebsd.org Mon Jan 9 09:16:38 2017 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AA45ECA6ADD for ; Mon, 9 Jan 2017 09:16:38 +0000 (UTC) (envelope-from sebastian.huber@embedded-brains.de) Received: from dedi548.your-server.de (dedi548.your-server.de [85.10.215.148]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5EDCA1AFE for ; Mon, 9 Jan 2017 09:16:37 +0000 (UTC) (envelope-from sebastian.huber@embedded-brains.de) Received: from [88.198.220.132] (helo=sslproxy03.your-server.de) by dedi548.your-server.de with esmtpsa (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.85_2) (envelope-from ) id 1cQW4A-0001Aa-ET for freebsd-hackers@freebsd.org; Mon, 09 Jan 2017 10:16:34 +0100 Received: from [82.135.62.35] (helo=mail.embedded-brains.de) by sslproxy03.your-server.de with esmtpsa (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cQW49-0001Zk-TE for freebsd-hackers@freebsd.org; Mon, 09 Jan 2017 10:16:34 +0100 Received: from localhost (localhost.localhost [127.0.0.1]) by mail.embedded-brains.de (Postfix) with ESMTP id EAD422A180D for ; Mon, 9 Jan 2017 10:17:31 +0100 (CET) Received: from mail.embedded-brains.de ([127.0.0.1]) by localhost (zimbra.eb.localhost [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id 2xVckrf95gzj; Mon, 9 Jan 2017 10:17:31 +0100 (CET) Received: from localhost (localhost.localhost [127.0.0.1]) by mail.embedded-brains.de (Postfix) with ESMTP id 96BF42A180C; Mon, 9 Jan 2017 10:17:31 +0100 (CET) X-Virus-Scanned: amavisd-new at zimbra.eb.localhost Received: from mail.embedded-brains.de ([127.0.0.1]) by localhost (zimbra.eb.localhost [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 4jpFo9ktNw2i; Mon, 9 Jan 2017 10:17:31 +0100 (CET) Received: from huber-linux.eb.localhost (unknown [192.168.96.129]) by mail.embedded-brains.de (Postfix) with ESMTP id 6ADD92A0010; Mon, 9 Jan 2017 10:17:31 +0100 (CET) From: Sebastian Huber To: freebsd-hackers@freebsd.org Cc: Sebastian Huber Subject: [PATCH] Fix "netstat -rs" Date: Mon, 9 Jan 2017 10:16:31 +0100 Message-Id: <1483953391-11045-1-git-send-email-sebastian.huber@embedded-brains.de> X-Mailer: git-send-email 1.8.4.5 X-Authenticated-Sender: smtp-embedded@poldinet.de X-Virus-Scanned: Clear (ClamAV 0.99.2/22862/Mon Jan 9 09:02:26 2017) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jan 2017 09:16:38 -0000 Load KVM symbols early so that for example rt_stats() can use them, otherwise we get: $ netstat -rs rtstat: symbol not in namelist --- usr.bin/netstat/main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/usr.bin/netstat/main.c b/usr.bin/netstat/main.c index 4e4428d..f26bf57 100644 --- a/usr.bin/netstat/main.c +++ b/usr.bin/netstat/main.c @@ -427,6 +427,9 @@ main(int argc, char *argv[]) if (xflag && Tflag) xo_errx(1, "-x and -T are incompatible, pick one."); + /* Load all necessary kvm symbols */ + kresolve_list(nl); + if (Bflag) { if (!live) usage(); @@ -507,9 +510,6 @@ main(int argc, char *argv[]) exit(0); } - /* Load all necessary kvm symbols */ - kresolve_list(nl); - if (tp) { xo_open_container("statistics"); printproto(tp, tp->pr_name, &first); -- 1.8.4.5