If the vhid already present, return EEXIST instead of

non-informative EINVAL.
This commit is contained in:
Gleb Smirnoff 2008-02-07 13:18:59 +00:00
parent 3a2f50140c
commit e60a0104f8

View file

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