Skip to content

Changes proposed on freebsd-net@ #3

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 22, 2017

Conversation

danielfojt
Copy link
Contributor

After sending an advertisement, free mbuf from packet_mp and NULL it.
As was stated in disscussion on freebsd-net@, "freeing mbuf is under pfil
hook responsibility, if it returns nonzero value it must call m_freem()".

Link: https://lists.freebsd.org/pipermail/freebsd-net/2017-July/048537.html
Citing from disscussion on freebsd-net@:

"ip6_output() always consumes mbuf, it is wrong to call m_freem() after calling
ip6_output(), even when it returns error".

Link: https://lists.freebsd.org/pipermail/freebsd-net/2017-July/048537.html
Copy link
Owner

@AlexandreFenyo AlexandreFenyo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Many thanks for this bug report and patch.

Copy link
Owner

@AlexandreFenyo AlexandreFenyo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Many thanks

@AlexandreFenyo
Copy link
Owner

Thanks for these patches.

For information, I've submited this kernel module to the ports tree in this request: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=219622

I'm currently testing the port with poudriere. I will soon make some minor updates due to new warnings (-Waddress-of-packed-member) that appeared with the change from clang 3.8.0 to clang 4.0.0 that occured between FreeBSD 11.0 and 11.1-RC3.

@AlexandreFenyo AlexandreFenyo merged commit 738bd67 into AlexandreFenyo:master Jul 22, 2017
@danielfojt danielfojt deleted the fix-mbuf-leak branch July 23, 2017 12:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants