Re: [PATCH net-next 2/4] selftests: net: test IPV6_FL_F_REMOTE

Jakub Kicinski <[email protected]>
Newsgroups org.kernel.vger.linux-kselftest,org.kernel.vger.netdev
Message-ID <20260730184205.20e85357@kicinski-fedora-PF5CM1Y0>
On Mon, 27 Jul 2026 01:25:08 -0300 Marcelo Mendes Spessoto Junior wrote:
> +#define INIT_SIN6_LOOPBACK(name)					\
> +	struct sockaddr_in6 name = {					\
> +		.sin6_family	= AF_INET6,				\
> +		.sin6_addr	= IN6ADDR_LOOPBACK_INIT,		\
> +		.sin6_port	= htons(8888),				\
> +	}

Please avoid magic macros

> @@ -183,6 +239,21 @@ static void run_tests(int fd)
>  		expect_fail(flowlabel_get(fd, 5, IPV6_FL_S_ANY, IPV6_FL_F_CREATE));
>  	}
>  
> +	explain("Prepare TCP SYN for REMOTE flag validation");
> +	int remote_listener = tcp_listen();
> +	int remote_cfd, remote_afd;

and don't declare variables half way thru the function
C coding style applies
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.