When scanning for control messages, don't process the data mbufs.
This could cause hangs if a unix domain socket was closed with data still to be read from it. Tested by: Andrea Campi <andrea@webcom.it>
This commit is contained in:
parent
4091481652
commit
12396bdca7
@ -1420,7 +1420,7 @@ unp_scan(m0, op)
|
|||||||
|
|
||||||
while (m0) {
|
while (m0) {
|
||||||
for (m = m0; m; m = m->m_next) {
|
for (m = m0; m; m = m->m_next) {
|
||||||
if (m->m_type == MT_CONTROL)
|
if (m->m_type != MT_CONTROL)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
cm = mtod(m, struct cmsghdr *);
|
cm = mtod(m, struct cmsghdr *);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user