Pass really available buffer size to libalias instead of MCLBYTES constant.
MCLBYTES constant were used with believe that m_megapullup() always moves date into a fresh cluster that may become not so.
This commit is contained in:
parent
0fecb888b2
commit
a9a13b54e9
@ -704,14 +704,14 @@ ng_nat_rcvdata(hook_p hook, item_p item )
|
||||
("ng_nat: ip_len != m_pkthdr.len"));
|
||||
|
||||
if (hook == priv->in) {
|
||||
rval = LibAliasIn(priv->lib, c, MCLBYTES);
|
||||
rval = LibAliasIn(priv->lib, c, m->m_len + M_TRAILINGSPACE(m));
|
||||
if (rval != PKT_ALIAS_OK &&
|
||||
rval != PKT_ALIAS_FOUND_HEADER_FRAGMENT) {
|
||||
NG_FREE_ITEM(item);
|
||||
return (EINVAL);
|
||||
}
|
||||
} else if (hook == priv->out) {
|
||||
rval = LibAliasOut(priv->lib, c, MCLBYTES);
|
||||
rval = LibAliasOut(priv->lib, c, m->m_len + M_TRAILINGSPACE(m));
|
||||
if (rval != PKT_ALIAS_OK) {
|
||||
NG_FREE_ITEM(item);
|
||||
return (EINVAL);
|
||||
|
Loading…
Reference in New Issue
Block a user