[LTP] [PATCH v2 2/4] Network helpers in landlock suite common functions

Cyril Hrubis chrubis@suse.cz
Tue Nov 5 16:27:59 CET 2024


Hi!
> +#define IPV4_ADDRESS "127.0.0.1"

Maybe IPV4_LOCALHOST instead?

> +#define IPV6_ADDRESS "::1"

Here as well?

> +struct socket_data {
> +	struct sockaddr_in addr_ipv4;
> +	struct sockaddr_in6 addr_ipv6;

These two could be inside an anonymous union I suppose, but we hardly
optimize for size here.

> +	size_t address_size;

Otherwise it looks good:

Reviewed-by: Cyril Hrubis <chrubis@suse.cz>

-- 
Cyril Hrubis
chrubis@suse.cz


More information about the ltp mailing list