Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 04 Aug 2018 20:27:18 +0000
From:      bugzilla-noreply@freebsd.org
To:        net@FreeBSD.org
Subject:   [Bug 181741] Packet loss when 'control' messages are present with large data (sendmsg(2))
Message-ID:  <bug-181741-7501-B8VEhTDjlx@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-181741-7501@https.bugs.freebsd.org/bugzilla/>
References:  <bug-181741-7501@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D181741

--- Comment #21 from commit-hook@freebsd.org ---
A commit references this bug:

Author: markj
Date: Sat Aug  4 20:26:55 UTC 2018
New revision: 337328
URL: https://svnweb.freebsd.org/changeset/base/337328

Log:
  Don't check rcv sockbuf limits when sending on a unix stream socket.

  sosend_generic() performs an initial comparison of the amount of data
  (including control messages) to be transmitted with the send buffer
  size. When transmitting on a unix socket, we then compare the amount
  of data being sent with the amount of space in the receive buffer size;
  if insufficient space is available, sbappendcontrol() returns an error
  and the data is lost.  This is easily triggered by sending control
  messages together with an amount of data roughly equal to the send
  buffer size, since the control message size may change in uipc_send()
  as file descriptors are internalized.

  Fix the problem by removing the space check in sbappendcontrol(),
  whose only consumer is the unix sockets code.  The stream sockets code
  uses the SB_STOP mechanism to ensure that senders will block if the
  receive buffer fills up.

  PR:           181741
  MFC after:    1 month
  Sponsored by: The FreeBSD Foundation
  Differential Revision:        https://reviews.freebsd.org/D16515

Changes:
  head/sys/kern/uipc_sockbuf.c
  head/sys/kern/uipc_usrreq.c
  head/sys/sys/sockbuf.h

--=20
You are receiving this mail because:
You are on the CC list for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-181741-7501-B8VEhTDjlx>