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

Cyril Hrubis
2024-11-05T15:28:12Z

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