-
Notifications
You must be signed in to change notification settings - Fork 893
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
Insufficient condition in ff_rte_frm_extcl function #568
Comments
You are right, i had modify it. |
jfb8856606
pushed a commit
that referenced
this issue
Mar 6, 2021
jfb8856606
pushed a commit
that referenced
this issue
Mar 6, 2021
jfb8856606
pushed a commit
that referenced
this issue
Mar 6, 2021
jfb8856606
pushed a commit
that referenced
this issue
Jul 5, 2022
jfb8856606
pushed a commit
that referenced
this issue
Sep 2, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi there,
I think the if-condition in the function
ff_rte_frm_extcl
needs to be changed from thisif ( bsd_mbuf->m_ext.ext_type==EXT_DISPOSABLE && bsd_mbuf->m_ext.ext_free==ff_mbuf_ext_free )
to this
if ( (bsd_mbuf->m_flags & M_EXT) && bsd_mbuf->m_ext.ext_type==EXT_DISPOSABLE && bsd_mbuf->m_ext.ext_free==ff_mbuf_ext_free )
.I just hit the following case:
ff_rte_frm_extcl
it'll return wrong non NULL result because the BSD stack just leave the external storage as it is unless functions likem_extadd
orm_extaddref
are used.Also in the
freebsd/sys/mbuf.h
you can see the comment abovestruct m_ext
Description of external storage mapped into mbuf; valid only if M_EXT is set
and all BSD functions which read from them_ext
are guarded with checks or assertions if this flag is set.I just use the F-stack not as a server but as a mixed L3-L4 proxy and noticed that this function returns wrong results for the output packets. I use it because it allows me to skip allocation of
rte_pktmbuf
for an output packet if this packet is being L3 forwarded because it already hasrte_pktmbuf
attached on input.Regards,
Pavel.
The text was updated successfully, but these errors were encountered: