In case of RADIX_MPATH do not leak the IN_IFADDR read lock on

early return.

MFC after:	3 days
This commit is contained in:
bz 2010-09-04 16:06:01 +00:00
parent ddc5322166
commit ef87b56ba4

View File

@ -1039,9 +1039,10 @@ in_addprefix(struct in_ifaddr *target, int flags)
if (ia->ia_flags & IFA_ROUTE) {
#ifdef RADIX_MPATH
if (ia->ia_addr.sin_addr.s_addr ==
target->ia_addr.sin_addr.s_addr)
target->ia_addr.sin_addr.s_addr) {
IN_IFADDR_RUNLOCK();
return (EEXIST);
else
} else
break;
#endif
if (V_sameprefixcarponly &&