From: Ido Schimmel <idosch@idosch.org>
To: Ilya Maximets <i.maximets@ovn.org>
Cc: netdev@vger.kernel.org, "David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Simon Horman <horms@kernel.org>,
linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org,
dev@openvswitch.org, Eelco Chaudron <echaudro@redhat.com>,
Aaron Conole <aconole@redhat.com>, Shuah Khan <shuah@kernel.org>,
Jamal Hadi Salim <jhs@mojatatu.com>,
Davide Caratti <dcaratti@redhat.com>
Subject: Re: [PATCH net 1/2] net: dst_metadata: fix IP_DF bit not extracted from tunnel headers
Date: Tue, 9 Sep 2025 11:41:01 +0300 [thread overview]
Message-ID: <aL_oHVTjm6zw9AJO@shredder> (raw)
In-Reply-To: <20250905133105.3940420-2-i.maximets@ovn.org>
On Fri, Sep 05, 2025 at 03:30:55PM +0200, Ilya Maximets wrote:
> @@ -220,9 +221,15 @@ static inline struct metadata_dst *ip_tun_rx_dst(struct sk_buff *skb,
> int md_size)
> {
> const struct iphdr *iph = ip_hdr(skb);
> + struct metadata_dst *tun_dst;
> +
> + tun_dst = __ip_tun_set_dst(iph->saddr, iph->daddr, iph->tos, iph->ttl,
> + 0, flags, tunnel_id, md_size);
>
> - return __ip_tun_set_dst(iph->saddr, iph->daddr, iph->tos, iph->ttl,
> - 0, flags, tunnel_id, md_size);
> + if (iph->frag_off & htons(IP_DF))
> + __set_bit(IP_TUNNEL_DONT_FRAGMENT_BIT,
> + tun_dst->u.tun_info.key.tun_flags);
Shouldn't you check that tun_dst isn't NULL?
> + return tun_dst;
> }
next prev parent reply other threads:[~2025-09-09 8:41 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-05 13:30 [PATCH net 0/2] net: dst_metadata: fix DF flag extraction on tunnel rx Ilya Maximets
2025-09-05 13:30 ` [PATCH net 1/2] net: dst_metadata: fix IP_DF bit not extracted from tunnel headers Ilya Maximets
2025-09-09 8:41 ` Ido Schimmel [this message]
2025-09-09 9:27 ` Ilya Maximets
2025-09-05 13:30 ` [PATCH net 2/2] selftests: openvswitch: add a simple test for tunnel metadata Ilya Maximets
2025-09-09 14:58 ` Aaron Conole
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=aL_oHVTjm6zw9AJO@shredder \
--to=idosch@idosch.org \
--cc=aconole@redhat.com \
--cc=davem@davemloft.net \
--cc=dcaratti@redhat.com \
--cc=dev@openvswitch.org \
--cc=echaudro@redhat.com \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=i.maximets@ovn.org \
--cc=jhs@mojatatu.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=shuah@kernel.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 NNTP newsgroup(s).