From: Sabrina Dubroca <sd@queasysnail.net>
To: Feng zhou <zhoufeng.zf@bytedance.com>
Cc: edumazet@google.com, davem@davemloft.net, kuba@kernel.org,
pabeni@redhat.com, ast@kernel.org, daniel@iogearbox.net,
andrii@kernel.org, martin.lau@linux.dev, eddyz87@gmail.com,
song@kernel.org, yonghong.song@linux.dev,
john.fastabend@gmail.com, kpsingh@kernel.org, sdf@fomichev.me,
haoluo@google.com, jolsa@kernel.org, dsahern@kernel.org,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
bpf@vger.kernel.org, yangzhenze@bytedance.com,
wangdongdong.6@bytedance.com
Subject: Re: [PATCH] bpf: Fix bpf_get/setsockopt to tos not take effect when TCP over IPv4 via INET6 API
Date: Wed, 14 Aug 2024 23:30:17 +0200 [thread overview]
Message-ID: <Zr0h6a_ExRhw8Mxh@hog> (raw)
In-Reply-To: <20240814084504.22172-1-zhoufeng.zf@bytedance.com>
2024-08-14, 16:45:04 +0800, Feng zhou wrote:
> diff --git a/net/core/filter.c b/net/core/filter.c
> index 78a6f746ea0b..9798537044be 100644
> --- a/net/core/filter.c
> +++ b/net/core/filter.c
> @@ -5399,7 +5399,7 @@ static int sol_ip_sockopt(struct sock *sk, int optname,
> char *optval, int *optlen,
> bool getopt)
> {
> - if (sk->sk_family != AF_INET)
> + if (sk->sk_family != AF_INET && !is_tcp_sock_ipv6_mapped(sk))
> return -EINVAL;
I don't think this works when CONFIG_IPV6=m, because then
is_tcp_sock_ipv6_mapped will be part of the module and not usable in
net/core/filter.c. Stuff like this is usually done through ipv6_stub.
--
Sabrina
next prev parent reply other threads:[~2024-08-14 21:31 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-14 8:45 [PATCH] bpf: Fix bpf_get/setsockopt to tos not take effect when TCP over IPv4 via INET6 API Feng zhou
2024-08-14 21:30 ` Sabrina Dubroca [this message]
2024-08-15 12:20 ` kernel test robot
2024-08-15 14:53 ` kernel test robot
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=Zr0h6a_ExRhw8Mxh@hog \
--to=sd@queasysnail.net \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=dsahern@kernel.org \
--cc=eddyz87@gmail.com \
--cc=edumazet@google.com \
--cc=haoluo@google.com \
--cc=john.fastabend@gmail.com \
--cc=jolsa@kernel.org \
--cc=kpsingh@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=martin.lau@linux.dev \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=sdf@fomichev.me \
--cc=song@kernel.org \
--cc=wangdongdong.6@bytedance.com \
--cc=yangzhenze@bytedance.com \
--cc=yonghong.song@linux.dev \
--cc=zhoufeng.zf@bytedance.com \
/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