From: bluhm Date: Sat, 15 Apr 2017 11:42:09 +0000 (+0000) Subject: Let ndp(8) use the process's current routing table by default. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=e3e2e38b745de5db915293b3425f1a7342bb84ca;p=openbsd Let ndp(8) use the process's current routing table by default. from Pierre Emeriaud; OK jca@ claudio@ Sync code and man page with arp(8). OK florian@ --- diff --git a/usr.sbin/ndp/ndp.8 b/usr.sbin/ndp/ndp.8 index 56ae05ccb5b..b880445596d 100644 --- a/usr.sbin/ndp/ndp.8 +++ b/usr.sbin/ndp/ndp.8 @@ -1,4 +1,4 @@ -.\" $OpenBSD: ndp.8,v 1.40 2016/04/05 18:18:42 jca Exp $ +.\" $OpenBSD: ndp.8,v 1.41 2017/04/15 11:42:09 bluhm Exp $ .\" $KAME: ndp.8,v 1.28 2002/07/17 08:46:33 itojun Exp $ .\" .\" Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -28,7 +28,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd $Mdocdate: April 5 2016 $ +.Dd $Mdocdate: April 15 2017 $ .Dt NDP 8 .Os .Sh NAME @@ -187,8 +187,7 @@ making it possible to merge output with Most useful when used with .Fl A . .It Fl V Ar rdomain -Set the routing domain to be used. -The default is 0. +Select the routing domain. .El .Sh EXIT STATUS .Ex -std ndp diff --git a/usr.sbin/ndp/ndp.c b/usr.sbin/ndp/ndp.c index b6bdcef184b..f8269b19938 100644 --- a/usr.sbin/ndp/ndp.c +++ b/usr.sbin/ndp/ndp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ndp.c,v 1.79 2016/11/29 08:55:06 mpi Exp $ */ +/* $OpenBSD: ndp.c,v 1.80 2017/04/15 11:42:09 bluhm Exp $ */ /* $KAME: ndp.c,v 1.101 2002/07/17 08:46:33 itojun Exp $ */ /* @@ -142,7 +142,7 @@ void rtr_flush(void); void harmonize_rtr(void); static char *sec2str(time_t); static void ts_print(const struct timeval *); -static int rdomain = 0; +static int rdomain; static char *rtpref_str[] = { "medium", /* 00 */ @@ -161,7 +161,8 @@ main(int argc, char *argv[]) pid = getpid(); thiszone = gmt2local(0); - while ((ch = getopt(argc, argv, "acd:f:i:nprstA:HPRV:")) != -1) + rdomain = getrtable(); + while ((ch = getopt(argc, argv, "acd:f:i:nprstA:HPRV:")) != -1) { switch (ch) { case 'a': case 'c': @@ -217,7 +218,7 @@ main(int argc, char *argv[]) default: usage(); } - + } argc -= optind; argv += optind;