summaryrefslogtreecommitdiffstats
path: root/usr.sbin/arp/arp.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/arp/arp.c')
-rw-r--r--usr.sbin/arp/arp.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/usr.sbin/arp/arp.c b/usr.sbin/arp/arp.c
index 4154c3a1..ab3587c 100644
--- a/usr.sbin/arp/arp.c
+++ b/usr.sbin/arp/arp.c
@@ -330,8 +330,14 @@ set(int argc, char **argv)
argc--; argv++;
}
} else if (strncmp(argv[0], "blackhole", 9) == 0) {
+ if (flags & RTF_REJECT) {
+ printf("Choose one of blackhole or reject, not both.\n");
+ }
flags |= RTF_BLACKHOLE;
} else if (strncmp(argv[0], "reject", 6) == 0) {
+ if (flags & RTF_BLACKHOLE) {
+ printf("Choose one of blackhole or reject, not both.\n");
+ }
flags |= RTF_REJECT;
} else if (strncmp(argv[0], "trail", 5) == 0) {
/* XXX deprecated and undocumented feature */
@@ -648,8 +654,8 @@ usage(void)
" arp [-n] [-i interface] -a",
" arp -d hostname [pub]",
" arp -d [-i interface] -a",
- " arp -s hostname ether_addr [temp] [reject] [blackhole] [pub [only]]",
- " arp -S hostname ether_addr [temp] [reject] [blackhole] [pub [only]]",
+ " arp -s hostname ether_addr [temp] [reject | blackhole] [pub [only]]",
+ " arp -S hostname ether_addr [temp] [reject | blackhole] [pub [only]]",
" arp -f filename");
exit(1);
}
OpenPOWER on IntegriCloud