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

Martin Doucha mdoucha@suse.cz
Wed Aug 26 12:20:43 CEST 2020


Sorry, ignore this patch, I meant to add a bind() there to change the
source port...

On 26. 08. 20 12:08, Martin Doucha wrote:
> Let's see if it's really a delayed ICMP message. Can you reproduce the error
> after applying this patch?
> 
> In the meantime, I'll write a test for send(MSG_MORE).
> 
> ---
>  testcases/kernel/syscalls/setsockopt/setsockopt05.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/testcases/kernel/syscalls/setsockopt/setsockopt05.c b/testcases/kernel/syscalls/setsockopt/setsockopt05.c
> index e78ef236e..594178744 100644
> --- a/testcases/kernel/syscalls/setsockopt/setsockopt05.c
> +++ b/testcases/kernel/syscalls/setsockopt/setsockopt05.c
> @@ -63,6 +63,7 @@ static void run(void)
>  	memset(buf, 0x42, BUFSIZE);
>  
>  	for (i = 0; i < 1000; i++) {
> +		addr.sin_port = 12345 + i;
>  		sock = SAFE_SOCKET(AF_INET, SOCK_DGRAM, 0);
>  		SAFE_CONNECT(sock, (struct sockaddr *)&addr, sizeof(addr));
>  		SAFE_SEND(1, sock, buf, BUFSIZE, MSG_MORE);
> 


-- 
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