summaryrefslogtreecommitdiff
path: root/usr.sbin/ndp/ndp.c
diff options
context:
space:
mode:
authorAlexander Bluhm <bluhm@cvs.openbsd.org>2017-04-15 11:42:10 +0000
committerAlexander Bluhm <bluhm@cvs.openbsd.org>2017-04-15 11:42:10 +0000
commit6d0f13e38679074596aec4d724a2e20a1a6aacb5 (patch)
treecc1adb5e5ee5b8f7bbb67a772876b869a90f3547 /usr.sbin/ndp/ndp.c
parent372e3bbfb35b808be429944398cdae65f26d86dc (diff)
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@
Diffstat (limited to 'usr.sbin/ndp/ndp.c')
-rw-r--r--usr.sbin/ndp/ndp.c9
1 files changed, 5 insertions, 4 deletions
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;