From: bluhm Date: Wed, 5 Apr 2023 13:56:41 +0000 (+0000) Subject: If ndp -d did not find a neigbor entry, it removed the cloning route X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=15967fb26451e63bd36e43adafba5500a1645bf4;p=openbsd 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@ --- 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);