Wednesday, August 24, 2022

Re: [update] net/knot and net/py-libknot to 3.2.0

On 8/23/2022 11:33 PM, A Tammy wrote:
> On 8/23/22 20:29, Jeremie Courreges-Anglas wrote:
>> On Tue, Aug 23 2022, Jeremie Courreges-Anglas<jca@wxcvbn.org> wrote:
>>> On Tue, Aug 23 2022, aisha<openbsd.ports@aisha.cc> wrote:
>>>> On 8/23/2022 7:20 AM, Jeremie Courreges-Anglas wrote:
>>>>> On Mon, Aug 22 2022, aisha<openbsd.ports@aisha.cc> wrote:
>>>>>
>> Well, before cleaning up this port I got curious and looked what
>> happened if I specified --enable-quic. In that case an embedded copy of
>> ngtcp2 is built, but the knot code fails to build with this error:
>>
>> utils/common/netio.c:343:34: error: use of undeclared identifier 'IP_RECVTOS'
>> if (setsockopt(fd, IPPROTO_IP, IP_RECVTOS, &tos, sizeof(tos)) == -1) {
>>
>> We don't have IP_RECVTOS. It's useful to peek at the ECN bits on UDP
>> sockets. Adding it to our kernel looked trivial but while adding it
>> I fell into a rabbit hole trying to understand what happened with IP_TTL
>> and IP_RECVTTL... (looks like we copied the FreeBSD code which passed
>> userland IP_RECVTTL cmsgs to userland instead of IP_TTL).
The knot developers response

> Just to be sure, quic in knotd works on linux only (requires xdp).
Kdig should work with quic.
<https://matrix.to/#/!KyARDHjubBYDxQtezf:gitter.im/$LNTqUGntQE2dNyaIFiJ1C9xabBt1srhJILg9TKiw4jU?via=gitter.im&via=matrix.org&via=skyforge.at>

> If it doesn't (we tested freebsd only), we will take a look at that.
<https://matrix.to/#/!KyARDHjubBYDxQtezf:gitter.im/$uOFKcbieHiCEDSSC0IzURx8iklxZp-D077rI9zHVT58?via=gitter.im&via=matrix.org&via=skyforge.at>

> Conventional quic in knotd should be available since 3.3.

This makes me think we should disable quic for now.

In the meantime, they provided the following patch (its gonna be mangled
by thunderbird but whatever) along with a statement "We have realized
the patch isn't correct. But it somehow works"


--- a/src/utils/common/netio.c
+++ b/src/utils/common/netio.c
@@ -340,7 +340,7 @@ static int fd_set_recv_ecn(int fd, int family)
        unsigned int tos = 1;
        switch (family) {
        case AF_INET:
-               if (setsockopt(fd, IPPROTO_IP, IP_RECVTOS, &tos,
sizeof(tos)) == -1) {
+               if (setsockopt(fd, IPPROTO_IP, IP_TOS, &tos,
sizeof(tos)) == -1) {
                        return knot_map_errno();
                }
                break;

No comments:

Post a Comment