Only check error if one could have been generated
This commit is contained in:
parent
b6b5f63ea0
commit
8d283ef60a
@ -418,20 +418,22 @@ in_aifaddr_ioctl(u_long cmd, caddr_t data, struct ifnet *ifp, struct thread *td)
|
|||||||
LIST_INSERT_HEAD(INADDR_HASH(ia->ia_addr.sin_addr.s_addr), ia, ia_hash);
|
LIST_INSERT_HEAD(INADDR_HASH(ia->ia_addr.sin_addr.s_addr), ia, ia_hash);
|
||||||
IN_IFADDR_WUNLOCK();
|
IN_IFADDR_WUNLOCK();
|
||||||
|
|
||||||
if (vhid != 0)
|
if (vhid != 0) {
|
||||||
error = (*carp_attach_p)(&ia->ia_ifa, vhid);
|
error = (*carp_attach_p)(&ia->ia_ifa, vhid);
|
||||||
if (error)
|
if (error)
|
||||||
goto fail1;
|
goto fail1;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Give the interface a chance to initialize
|
* Give the interface a chance to initialize
|
||||||
* if this is its first address,
|
* if this is its first address,
|
||||||
* and to validate the address if necessary.
|
* and to validate the address if necessary.
|
||||||
*/
|
*/
|
||||||
if (ifp->if_ioctl != NULL)
|
if (ifp->if_ioctl != NULL) {
|
||||||
error = (*ifp->if_ioctl)(ifp, SIOCSIFADDR, (caddr_t)ia);
|
error = (*ifp->if_ioctl)(ifp, SIOCSIFADDR, (caddr_t)ia);
|
||||||
if (error)
|
if (error)
|
||||||
goto fail2;
|
goto fail2;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Add route for the network.
|
* Add route for the network.
|
||||||
|
Loading…
Reference in New Issue
Block a user