From e60a0104f883bd8e24e794ac0dfa512cd66f3cfa Mon Sep 17 00:00:00 2001 From: Gleb Smirnoff Date: Thu, 7 Feb 2008 13:18:59 +0000 Subject: [PATCH] If the vhid already present, return EEXIST instead of non-informative EINVAL. --- sys/netinet/ip_carp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/netinet/ip_carp.c b/sys/netinet/ip_carp.c index 3b98187a8ce..07dd9cad007 100644 --- a/sys/netinet/ip_carp.c +++ b/sys/netinet/ip_carp.c @@ -1504,7 +1504,7 @@ carp_set_addr(struct carp_softc *sc, struct sockaddr_in *sin) TAILQ_FOREACH(vr, &cif->vhif_vrs, sc_list) if (vr != sc && vr->sc_vhid == sc->sc_vhid) { CARP_UNLOCK(cif); - error = EINVAL; + error = EEXIST; goto cleanup; } }