Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 22 Jul 2017 15:51:57 +0200
From:      Daniel Bilik <ddb@neosystem.org>
To:        "Andrey V. Elsukov" <bu7cher@yandex.ru>
Cc:        freebsd-net@freebsd.org
Subject:   Re: mbuf clusters leak in netinet6
Message-ID:  <20170722155157.b29206752f49422e40e58c5d@neosystem.cz>
In-Reply-To: <5dadd0d0-d5ce-3a2c-7ad6-1c0a39a4a0e7@yandex.ru>
References:  <20170721232112.82f6e78b76057312183be937@neosystem.cz> <5dadd0d0-d5ce-3a2c-7ad6-1c0a39a4a0e7@yandex.ru>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, 22 Jul 2017 12:11:31 +0300
"Andrey V. Elsukov" <bu7cher@yandex.ru> wrote:

> Freeing mbuf is under pfil hook responsibility, if it returns nonzero
> value it must call m_freem(). So, it is bug in the ndpacket.c.

Ah, thanks for clarifying this. It was quite unclear to me, because at
other place I've seen m_freem() is called after non-zero pfil_run_hooks()
result. [1]

Nevertheless, I've patched and tested ndproxy as you suggested, and it
works fine, with no mbuf leaks. Pull request created. [2]

Thank you once again for looking at this.

--
						Dan

[1] https://github.com/freebsd/freebsd/blob/master/sys/netinet/ip_fastfwd.c#L232
[2] https://github.com/AlexandreFenyo/ndproxy/pull/3



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20170722155157.b29206752f49422e40e58c5d>