If vhid exists return more informative EEXIST instead of EINVAL. While here
remove redundant brackets.
This commit is contained in:
parent
2322a0a77d
commit
ee6f227017
@ -1844,9 +1844,8 @@ carp_ioctl(struct ifnet *ifp, u_long cmd, caddr_t addr)
|
|||||||
cif = (struct carp_if *)sc->sc_carpdev->if_carp;
|
cif = (struct carp_if *)sc->sc_carpdev->if_carp;
|
||||||
TAILQ_FOREACH(vr, &cif->vhif_vrs, sc_list)
|
TAILQ_FOREACH(vr, &cif->vhif_vrs, sc_list)
|
||||||
if (vr != sc &&
|
if (vr != sc &&
|
||||||
vr->sc_vhid == carpr.carpr_vhid) {
|
vr->sc_vhid == carpr.carpr_vhid)
|
||||||
return EINVAL;
|
return EEXIST;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
sc->sc_vhid = carpr.carpr_vhid;
|
sc->sc_vhid = carpr.carpr_vhid;
|
||||||
sc->sc_ac.ac_enaddr[0] = 0;
|
sc->sc_ac.ac_enaddr[0] = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user