[LTP] [PATCH] syscalls/setsockopt05: associate receiver with destination address

Martin Doucha mdoucha@suse.cz
Mon Aug 24 17:21:28 CEST 2020


On 24. 08. 20 17:01, Jan Stancek wrote:
> I assumed it's from previous one, not partial one. From man(7) udp:
> 
>  ECONNREFUSED
>               No receiver was associated with the destination address.
>               This might be caused by a previous packet sent over the socket.
> 

Wait, looking closer at the error message, it looks like send(MSG_MORE)
is broken on your test kernel. Let me quote the man page here:

>        MSG_MORE (since Linux 2.4.4)
>               The  caller  has  more data to send.  This flag is used with TCP
>               sockets to obtain the same effect as the TCP_CORK socket  option
>               (see tcp(7)), with the difference that this flag can be set on a
>               per-call basis.
> 
>               Since Linux 2.6, this flag is also supported  for  UDP  sockets,
>               and  informs the kernel to package all of the data sent in calls
>               with this flag set into a single datagram which  is  transmitted
>               only  when  a call is performed that does not specify this flag.
>               (See also the UDP_CORK socket option described in udp(7).)

The data from the SAFE_SEND() call are supposed to stay in kernel buffer
until the send() call where we (intentionally) ignore the return value.

-- 
Martin Doucha   mdoucha@suse.cz
QA Engineer for Software Maintenance
SUSE LINUX, s.r.o.
CORSO IIa
Krizikova 148/34
186 00 Prague 8
Czech Republic


More information about the ltp mailing list