public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Florian Weimer <fweimer@redhat.com>
To: Adhemerval Zanella via Libc-alpha <libc-alpha@sourceware.org>
Subject: Re: [PATCH 4/7] linux: Fix setsockopt fallback
Date: Mon, 05 Jul 2021 21:07:54 +0200	[thread overview]
Message-ID: <87lf6kk29h.fsf@oldenburg.str.redhat.com> (raw)
In-Reply-To: <20210705183027.3804093-5-adhemerval.zanella@linaro.org> (Adhemerval Zanella via Libc-alpha's message of "Mon, 5 Jul 2021 15:30:24 -0300")

* Adhemerval Zanella via Libc-alpha:

> The final 2 arguments for SO_TIMESTAMP/SO_TIMESTAMPNS are being set
> wrongly.
>
> Checked on x86_64-linux-gnu and i686-linux-gnu.
> ---
>  sysdeps/unix/sysv/linux/setsockopt.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/sysdeps/unix/sysv/linux/setsockopt.c b/sysdeps/unix/sysv/linux/setsockopt.c
> index a4780a9d33..fae7305c9d 100644
> --- a/sysdeps/unix/sysv/linux/setsockopt.c
> +++ b/sysdeps/unix/sysv/linux/setsockopt.c
> @@ -78,7 +78,7 @@ setsockopt32 (int fd, int level, int optname, const void *optval,
>  	  optname = COMPAT_SO_TIMESTAMP_OLD;
>  	if (optname == COMPAT_SO_TIMESTAMPNS_NEW)
>  	  optname = COMPAT_SO_TIMESTAMPNS_OLD;
> -	r = setsockopt_syscall (fd, level, optname, NULL, 0);
> +	r = setsockopt_syscall (fd, level, optname, optval, len);
>        }
>        break;
>      }

Maybe add a comment that the recvmsg code does conversation, so the old
socket option is also acceptable?

The patch itself looks okay to me.

Thanks,
Florian


  reply	other threads:[~2021-07-05 19:07 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-05 18:30 [PATCH 0/7] Linux 64-bit time_t socket fixes Adhemerval Zanella
2021-07-05 18:30 ` [PATCH 1/7] linux: Consolidate Linux getsockopt implementation Adhemerval Zanella
2021-07-05 18:58   ` Florian Weimer
2021-07-05 18:30 ` [PATCH 2/7] linux: Consolidate Linux setsockopt implementation Adhemerval Zanella
2021-07-05 18:59   ` Florian Weimer
2021-07-05 18:30 ` [PATCH 3/7] linux: Use the expected size for SO_TIMESTAMP{NS} convertion Adhemerval Zanella
2021-07-05 19:00   ` Florian Weimer
2021-07-06 13:06     ` Adhemerval Zanella
2021-07-05 18:30 ` [PATCH 4/7] linux: Fix setsockopt fallback Adhemerval Zanella
2021-07-05 19:07   ` Florian Weimer [this message]
2021-07-06 13:07     ` Adhemerval Zanella
2021-07-06 14:08       ` Florian Weimer
2021-07-05 18:30 ` [PATCH 5/7] support: Add support_socket_time64_timestamp Adhemerval Zanella
2021-07-05 18:46   ` Florian Weimer
2021-07-05 18:51     ` Adhemerval Zanella
2021-07-05 18:30 ` [PATCH 6/7] socket: Add recvmsg timestamp test Adhemerval Zanella
2021-07-05 19:32   ` Florian Weimer
2021-07-05 19:51     ` Adhemerval Zanella
2021-07-05 20:02       ` Florian Weimer
2021-07-05 20:35         ` Adhemerval Zanella
2021-07-06  9:29           ` Florian Weimer
2021-07-06 12:55             ` Adhemerval Zanella
2021-07-06 14:50               ` Florian Weimer
2021-07-05 18:30 ` [PATCH 7/7] socket: Add recvmmsg " Adhemerval Zanella
2021-07-05 19:12   ` Florian Weimer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87lf6kk29h.fsf@oldenburg.str.redhat.com \
    --to=fweimer@redhat.com \
    --cc=libc-alpha@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).