From: Ido Schimmel <idosch@nvidia.com>
To: Eric Dumazet <edumazet@kernel.org>
Cc: Zhiling Zou <zhilinz@nebusec.ai>,
netdev@vger.kernel.org, dsahern@kernel.org, davem@davemloft.net,
pabeni@redhat.com, horms@kernel.org, leone4fernando@gmail.com,
vega@nebusec.ai
Subject: Re: [PATCH net v5 1/1] ipmr: only copy pktinfo to cache reports
Date: Sun, 18 Oct 2026 15:56:49 +0300 [thread overview]
Message-ID: <20261018125649.GA2499803@shredder> (raw)
In-Reply-To: <CAL4WiirgJTWD4sqz_v_1=gZx6DKC5psXxEB77hPk1PSGQGi2Yw@mail.gmail.com>
On Sat, Oct 17, 2026 at 01:05:49PM +0200, Eric Dumazet wrote:
> One remaining issue: for the synthetic skbs built by ipmr_get_route(),
> pkt->cb holds NETLINK_CB, not IPCB. ipv4_pktinfo_prepare() still reads
> it as IPCB: the iif comes from creds.pid, and IPCB(pkt)->flags
> (l3mdev bit) from netlink_skb_parms. Whatever ends up in the
> IP_PKTINFO cmsg for these reports is meaningless.
>
> These skbs are already identified by ip_hdr(skb)->version == 0, as
> done in ipmr_cache_resolve() and ipmr_destroy_unres(), and they only
> reach this point through the IGMPMSG_NOCACHE path.
>
> Could you skip pktinfo preparation for them in v6, and leave the
> report control block zeroed? Something like:
>
> memset(skb->cb, 0, sizeof(skb->cb));
>
> /* Route queries from ipmr_get_route() carry NETLINK_CB, not IPCB. */
> if (ip_hdr(pkt)->version) {
> memcpy(pkt_cb, pkt->cb, sizeof(pkt_cb));
> ipv4_pktinfo_prepare(mroute_sk, pkt, false);
> *PKTINFO_SKB_CB(skb) = *PKTINFO_SKB_CB(pkt);
> memcpy(pkt->cb, pkt_cb, sizeof(pkt_cb));
> }
Fine by me
next prev parent reply other threads:[~2026-10-18 12:57 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-17 5:39 [PATCH net v5 0/1] ipmr: only copy pktinfo to cache reports Zhiling Zou
2026-10-17 5:39 ` [PATCH net v5 1/1] " Zhiling Zou
2026-10-17 11:05 ` Eric Dumazet
2026-10-18 12:56 ` Ido Schimmel [this message]
2026-10-17 5:44 ` [PATCH net v5 0/1] " netdev-bot+sinfo
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=20261018125649.GA2499803@shredder \
--to=idosch@nvidia.com \
--cc=davem@davemloft.net \
--cc=dsahern@kernel.org \
--cc=edumazet@kernel.org \
--cc=horms@kernel.org \
--cc=leone4fernando@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=vega@nebusec.ai \
--cc=zhilinz@nebusec.ai \
/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