diff mbox series

[net] tcp: add SO_PEEK_OFF socket option tor TCPv6

Message ID 20240720140914.2772902-1-jmaloy@redhat.com (mailing list archive)
State Changes Requested
Delegated to: Netdev Maintainers
Headers show
Series [net] tcp: add SO_PEEK_OFF socket option tor TCPv6 | expand

Checks

Context Check Description
netdev/series_format success Single patches do not need cover letters
netdev/tree_selection success Clearly marked for net
netdev/ynl success Generated files up to date; no warnings/errors; no diff in generated;
netdev/fixes_present success Fixes tag present in non-next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 273 this patch: 273
netdev/build_tools success No tools touched, skip
netdev/cc_maintainers warning 2 maintainers not CCed: dsahern@kernel.org pabeni@redhat.com
netdev/build_clang success Errors and warnings before: 281 this patch: 281
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes fail Problems with Fixes tag: 1
netdev/build_allmodconfig_warn success Errors and warnings before: 281 this patch: 281
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 7 lines checked
netdev/build_clang_rust success No Rust files in patch. Skipping build
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0
netdev/contest success net-next-2024-07-21--09-00 (tests: 695)

Commit Message

Jon Maloy July 20, 2024, 2:09 p.m. UTC
From: Jon Maloy <jmaloy@redhat.com>

When we added the SO_PEEK_OFF socket option to TCP we forgot
to add it even for TCP on IPv6.

We do that here.

Fixes: 05ea491641d3 ("tcp: add support for SO_PEEK_OFF socket option")

Signed-off-by: Jon Maloy <jmaloy@redhat.com>
---
 net/ipv6/af_inet6.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Eric Dumazet July 21, 2024, 3:22 p.m. UTC | #1
On Sat, Jul 20, 2024 at 7:09 AM <jmaloy@redhat.com> wrote:
>
> From: Jon Maloy <jmaloy@redhat.com>
>
> When we added the SO_PEEK_OFF socket option to TCP we forgot
> to add it even for TCP on IPv6.
>
> We do that here.
>
> Fixes: 05ea491641d3 ("tcp: add support for SO_PEEK_OFF socket option")
>
> Signed-off-by: Jon Maloy <jmaloy@redhat.com>

Reviewed-by: Eric Dumazet <edumazet@google.com>

It would be nice to add a selftest for SO_PEEK_OFF for TCP and UDP,
any volunteers ?

Thanks.
Jason Xing July 21, 2024, 4:13 p.m. UTC | #2
On Sun, Jul 21, 2024 at 11:23 PM Eric Dumazet <edumazet@google.com> wrote:
>
> On Sat, Jul 20, 2024 at 7:09 AM <jmaloy@redhat.com> wrote:
> >
> > From: Jon Maloy <jmaloy@redhat.com>
> >
> > When we added the SO_PEEK_OFF socket option to TCP we forgot
> > to add it even for TCP on IPv6.
> >
> > We do that here.
> >
> > Fixes: 05ea491641d3 ("tcp: add support for SO_PEEK_OFF socket option")
> >
> > Signed-off-by: Jon Maloy <jmaloy@redhat.com>
>
> Reviewed-by: Eric Dumazet <edumazet@google.com>
>
> It would be nice to add a selftest for SO_PEEK_OFF for TCP and UDP,
> any volunteers ?

If Jon doesn't have much time, I volunteer :) :p

Thanks,
Jason
Jakub Kicinski July 23, 2024, 12:52 a.m. UTC | #3
On Sat, 20 Jul 2024 10:09:14 -0400 jmaloy@redhat.com wrote:
> Fixes: 05ea491641d3 ("tcp: add support for SO_PEEK_OFF socket option")
> 
> Signed-off-by: Jon Maloy <jmaloy@redhat.com>

Please repost with the selftest and the empty line between Fixes and
S-o-b removed.
Jon Maloy Aug. 14, 2024, 5:47 p.m. UTC | #4
On 2024-07-21 12:13, Jason Xing wrote:
> On Sun, Jul 21, 2024 at 11:23 PM Eric Dumazet <edumazet@google.com> wrote:
>> On Sat, Jul 20, 2024 at 7:09 AM <jmaloy@redhat.com> wrote:
>>> From: Jon Maloy <jmaloy@redhat.com>
>>>
>>> When we added the SO_PEEK_OFF socket option to TCP we forgot
>>> to add it even for TCP on IPv6.
>>>
>>> We do that here.
>>>
>>> Fixes: 05ea491641d3 ("tcp: add support for SO_PEEK_OFF socket option")
>>>
>>> Signed-off-by: Jon Maloy <jmaloy@redhat.com>
>> Reviewed-by: Eric Dumazet <edumazet@google.com>
>>
>> It would be nice to add a selftest for SO_PEEK_OFF for TCP and UDP,
>> any volunteers ?
> If Jon doesn't have much time, I volunteer :) :p
>
> Thanks,
> Jason
I have been offline for a few weeks, so I didn't see this until now.
You are totally welcome ;-)
///jon
diff mbox series

Patch

diff --git a/net/ipv6/af_inet6.c b/net/ipv6/af_inet6.c
index 90d2c7e3f5e9..ba69b86f1c7d 100644
--- a/net/ipv6/af_inet6.c
+++ b/net/ipv6/af_inet6.c
@@ -708,6 +708,7 @@  const struct proto_ops inet6_stream_ops = {
 	.splice_eof	   = inet_splice_eof,
 	.sendmsg_locked    = tcp_sendmsg_locked,
 	.splice_read	   = tcp_splice_read,
+	.set_peek_off      = sk_set_peek_off,
 	.read_sock	   = tcp_read_sock,
 	.read_skb	   = tcp_read_skb,
 	.peek_len	   = tcp_peek_len,