MFC the ability to restrict deletions to a particular inteface in the -a

case.
This commit is contained in:
brooks 2006-01-24 05:39:22 +00:00
parent b351d53260
commit ebafce1b5d
2 changed files with 3 additions and 2 deletions

View File

@ -48,6 +48,7 @@
.Op Cm pub
.Nm
.Fl d
.Op Fl i Ar interface
.Fl a
.Nm
.Fl s Ar hostname ether_addr

View File

@ -152,7 +152,7 @@ main(int argc, char *argv[])
if (!func)
func = F_GET;
if (rifname) {
if (func != F_GET)
if (func != F_GET && !(func == F_DELETE && aflag))
errx(1, "-i not applicable to this operation");
if (if_nametoindex(rifname) == 0) {
if (errno == ENXIO)
@ -625,7 +625,7 @@ usage(void)
"usage: arp [-n] [-i interface] hostname",
" arp [-n] [-i interface] -a",
" arp -d hostname [pub]",
" arp -d -a",
" arp -d [-i interface] -a",
" arp -s hostname ether_addr [temp] [pub]",
" arp -S hostname ether_addr [temp] [pub]",
" arp -f filename");