Date: Tue, 6 Sep 2005 17:15:43 +0000 (UTC) From: Gleb Smirnoff <glebius@FreeBSD.org> To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/sys/netgraph ng_ksocket.c Message-ID: <200509061715.j86HFi79038055@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
glebius 2005-09-06 17:15:43 UTC FreeBSD src repository Modified files: sys/netgraph ng_ksocket.c Log: When we read data from socket buffer using soreceive() the socket layer does not clear m_nextpkt for us. The mbufs are sent into netgraph and then, if they contain a TCP packet delivered locally, they will enter socket code again. They can pass the first assert in sbappendstream() because m_nextpkt may be set not in the first mbuf, but deeper in the chain. So the problem will trigger much later, when local program reads the data from socket, and an mbuf with m_nextpkt becomes a first one. This bug was demasked by revision 1.54, when I made upcall queueable. Before revision 1.54 there was a very small probability to have 2 mbufs in GRE socket buffer, because ng_ksocket_incoming2() dequeued the first one immediately. - in ng_ksocket_incoming2() clear m_nextpkt on all mbufs read from socket. - restore rev. 1.54 change in ng_ksocket_incoming(). PR: kern/84952 PR: kern/82413 In collaboration with: rwatson Revision Changes Path 1.57 +13 -4 src/sys/netgraph/ng_ksocket.c
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200509061715.j86HFi79038055>