ifaddr refcount problem

Gleb Smirnoff glebius at FreeBSD.org
Wed Jun 25 10:08:49 UTC 2014


  Alan,

On Tue, Jun 24, 2014 at 08:43:40AM -0600, Alan Somers wrote:
A> That looks better.  But I think there is one more possibility for a
A> leak.  For multicast packets, IFP_TO_IA at line 263 will call
A> ifa_ref(), unless the the interface has no address assigned.  How
A> about this patch instead?  Also, not tested.

Again you are right, thanks.

The patch needs to reset have_ia_ref in the 'goto again' case.

Also, I'd suggest a tiny change to your patch so that we don't
have a broken logic reading the code as "I have ia reference,
but don't have ia".

-- 
Totus tuus, Glebius.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ip_output_v4.diff
Type: text/x-diff
Size: 1872 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-net/attachments/20140625/b90152e9/attachment.diff>


More information about the freebsd-net mailing list