1
0
mirror of https://github.com/openbsd/src.git synced 2024-12-21 23:18:00 -08:00

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@
This commit is contained in:
bluhm 2023-04-05 13:56:41 +00:00
parent d096889826
commit 15967fb264

View File

@ -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);