On Mon, Feb 23, 2015 at 01:41:36PM +0000, Andrey V. Elsukov wrote: A> Author: ae A> Date: Mon Feb 23 13:41:35 2015 A> New Revision: 279206 A> URL: https://svnweb.freebsd.org/changeset/base/279206 A> A> Log: A> In some cases soreceive_dgram() can return no data, but has control A> message. This can happen when application is sending packets too big A> for the path MTU and recvmsg() will return zero (indicating no data) A> but there will be a cmsghdr with cmsg_type set to IPV6_PATHMTU. A> Remove KASSERT() which does NULL pointer dereference in such case. A> Also call m_freem() only when m isn't NULL. A> A> PR: 197882 A> MFC after: 1 week A> Sponsored by: Yandex LLC
All this code is so entangled, due to historical decision to have code to handle dgram and stream sockets, data messages and control messages. Now that dgram and stream are almost[1] split, splitting data and control would finish un-entangling. This would require introducing extra pr_ methods, not a big deal. [1] Struct sockbuf is still the same. -- Totus tuus, Glebius. _______________________________________________ [email protected] mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "[email protected]"
