diff options
author | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2023-04-05 13:56:42 +0000 |
---|---|---|
committer | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2023-04-05 13:56:42 +0000 |
commit | 0b312395aecdc3a7a2ce891c1167ebf01b697e45 (patch) | |
tree | 7b2dbecc6fc845698fa592c2645cec55b8bc1b36 /usr.sbin/ndp | |
parent | 62e991f5aacdb08f4a48643ad504931536331575 (diff) |
If ndp -d did not find a neigbor entry, it removed the cloning route
instead. Comparing the arp(8) and ndp(8) code shows that the latter
has a fallthrough to delete. Return an error also in this case.
OK kn@
Diffstat (limited to 'usr.sbin/ndp')
-rw-r--r-- | usr.sbin/ndp/ndp.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/usr.sbin/ndp/ndp.c b/usr.sbin/ndp/ndp.c index d358a912ea0..198ac6381ec 100644 --- a/usr.sbin/ndp/ndp.c +++ b/usr.sbin/ndp/ndp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ndp.c,v 1.108 2023/04/04 21:18:04 bluhm Exp $ */ +/* $OpenBSD: ndp.c,v 1.109 2023/04/05 13:56:41 bluhm Exp $ */ /* $KAME: ndp.c,v 1.101 2002/07/17 08:46:33 itojun Exp $ */ /* @@ -436,13 +436,14 @@ delete(const char *host) if ((rtm->rtm_flags & RTF_GATEWAY) == 0) goto delete; } - /* - * IPv4 arp command retries with sin_other = SIN_PROXY here. - */ - warnx("delete: cannot locate %s", host); - return 1; } + /* + * IPv4 arp command retries with sin_other = SIN_PROXY here. + */ + warnx("delete: cannot locate %s", host); + return 1; + delete: if (sdl->sdl_family != AF_LINK) { printf("cannot locate %s\n", host); |