diff options
author | sam <sam@FreeBSD.org> | 2008-03-18 21:45:27 +0000 |
---|---|---|
committer | sam <sam@FreeBSD.org> | 2008-03-18 21:45:27 +0000 |
commit | f5c289e7a87eda5b4525ebf960bf279bbd6d6246 (patch) | |
tree | bd231b4417c3e00dd4b65f241475220ef8243a94 /usr.sbin/arp/arp.c | |
parent | f46620ae374ea61cbb68746c3da2ad4c05cf2258 (diff) | |
download | FreeBSD-src-f5c289e7a87eda5b4525ebf960bf279bbd6d6246.zip FreeBSD-src-f5c289e7a87eda5b4525ebf960bf279bbd6d6246.tar.gz |
add reject+blackhole keywords to install entries with RTF_BLACKHOLE
and RTF_REJECT, respectively
PR: bin/79228
Submitted by: Dan Lukes <dan@obluda.cz>
MFC after: 2 weeks
Diffstat (limited to 'usr.sbin/arp/arp.c')
-rw-r--r-- | usr.sbin/arp/arp.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/usr.sbin/arp/arp.c b/usr.sbin/arp/arp.c index 65b55ad..c8ef3e9 100644 --- a/usr.sbin/arp/arp.c +++ b/usr.sbin/arp/arp.c @@ -321,8 +321,7 @@ set(int argc, char **argv) struct timeval tv; gettimeofday(&tv, 0); expire_time = tv.tv_sec + 20 * 60; - } - else if (strncmp(argv[0], "pub", 3) == 0) { + } else if (strncmp(argv[0], "pub", 3) == 0) { flags |= RTF_ANNOUNCE; doing_proxy = 1; if (argc && strncmp(argv[1], "only", 3) == 0) { @@ -330,6 +329,10 @@ set(int argc, char **argv) dst->sin_other = SIN_PROXY; argc--; argv++; } + } else if (strncmp(argv[0], "blackhole", 9) == 0) { + flags |= RTF_BLACKHOLE; + } else if (strncmp(argv[0], "reject", 6) == 0) { + flags |= RTF_REJECT; } else if (strncmp(argv[0], "trail", 5) == 0) { /* XXX deprecated and undocumented feature */ printf("%s: Sending trailers is no longer supported\n", @@ -627,8 +630,8 @@ usage(void) " arp [-n] [-i interface] -a", " arp -d hostname [pub]", " arp -d [-i interface] -a", - " arp -s hostname ether_addr [temp] [pub [only]]", - " arp -S hostname ether_addr [temp] [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); } |