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:
Bjoern A. Zeeb 2010-09-04 16:06:01 +00:00
parent d0654c8566
commit 42db1b87d6

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 &&