lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAKm6_Rvp+KotAyYrr6w0GCQT1ji5J+R5qX6X8B8ZZQoOBwveDQ@mail.gmail.com>
Date: Thu, 30 Jan 2025 14:27:27 +0100
From: Anna Nyiri <annaemesenyiri@...il.com>
To: Jakub Kicinski <kuba@...nel.org>
Cc: netdev@...r.kernel.org, fejes@....elte.hu, edumazet@...gle.com, 
	pabeni@...hat.com, willemb@...gle.com, idosch@...sch.org, davem@...emloft.net, 
	horms@...nel.org, shuah@...nel.org, linux-kselftest@...r.kernel.org
Subject: Re: [PATCH net-next 1/1] selftests: net: Add support for testing
 SO_RCVMARK and SO_RCVPRIORITY

Jakub Kicinski <kuba@...nel.org> ezt írta (időpont: 2025. jan. 29., Sze, 21:05):
>
> On Wed, 29 Jan 2025 15:36:01 +0100 Anna Emese Nyiri wrote:
> > diff --git a/tools/testing/selftests/net/Makefile b/tools/testing/selftests/net/Makefile
> > index 73ee88d6b043..98f05473e672 100644
> > --- a/tools/testing/selftests/net/Makefile
> > +++ b/tools/testing/selftests/net/Makefile
> > @@ -33,6 +33,7 @@ TEST_PROGS += gro.sh
> >  TEST_PROGS += gre_gso.sh
> >  TEST_PROGS += cmsg_so_mark.sh
> >  TEST_PROGS += cmsg_so_priority.sh
> > +TEST_PROGS += test_so_rcv.sh
>
> You need to add the C part to the TEST_GEN_PROGS, otherwise it won't
> get built. We're seeing:
>
> ./test_so_rcv.sh: line 25: ./so_rcv_listener: No such file or directory
>
> in the CI.
>
> > +     memset(&recv_addr, 0, sizeof(recv_addr));
> > +     recv_addr.sin_family = AF_INET;
> > +     recv_addr.sin_port = htons(atoi(opt.service));
> > +
> > +     if (inet_pton(AF_INET, opt.host, &recv_addr.sin_addr) <= 0) {
> > +             perror("Invalid address");
> > +             ret_value = -errno;
> > +             goto cleanup;
> > +     }
>
> Any reason not to use getaddrinfo() ?

I chose inet_pton() over getaddrinfo() because getaddrinfo() depends
on libnss, which can cause warnings and linking issues in static
builds. In contrast, inet_pton() is fully part of libc, so it seemed
like a safer choice.

> Otherwise LGTM, thanks for following up!
> --
> pw-bot: cr

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ