mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-12-04 18:59:37 +00:00
MFC r282594:
m_dup() is supposed to give a writable copy of an mbuf chain. It uses m_dup_pkthdr(), that uses M_COPYFLAGS mask to copy m_flags field. If original mbuf chain has M_RDONLY flag, its copy also will have it. Reset this flag explicitly.
This commit is contained in:
parent
be572085e6
commit
0991b150c8
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/stable/10/; revision=283198
@ -934,6 +934,7 @@ m_dup(struct mbuf *m, int how)
|
|||||||
}
|
}
|
||||||
if ((n->m_flags & M_EXT) == 0)
|
if ((n->m_flags & M_EXT) == 0)
|
||||||
nsize = MHLEN;
|
nsize = MHLEN;
|
||||||
|
n->m_flags &= ~M_RDONLY;
|
||||||
}
|
}
|
||||||
n->m_len = 0;
|
n->m_len = 0;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user