From: Stephen Hemminger <stephen@networkplumber.org>
To: Dave Seddon <dave.seddon.ca@gmail.com>
Cc: netdev@vger.kernel.org, David Ahern <dsahern@kernel.org>
Subject: Re: [PATCH iproute2] ip xfrm: copy only the mark payload in deleteall
Date: Tue, 24 Nov 2026 16:53:29 -0800 [thread overview]
Message-ID: <20261124165329.4dc7e4e7@phoenix.local> (raw)
In-Reply-To: <20261124060139.3393511-1-dave.seddon.ca@gmail.com>
On Mon, 23 Nov 2026 22:01:39 -0800
Dave Seddon <dave.seddon.ca@gmail.com> wrote:
> diff --git a/ip/xfrm_policy.c b/ip/xfrm_policy.c
> index 5261a292..1a41f2a9 100644
> --- a/ip/xfrm_policy.c
> +++ b/ip/xfrm_policy.c
> @@ -783,7 +783,7 @@ static int xfrm_policy_keep(struct nlmsghdr *n, void *arg)
>
> if (tb[XFRMA_MARK]) {
> int r = addattr_l(new_n, xb->size, XFRMA_MARK,
> - (void *)RTA_DATA(tb[XFRMA_MARK]), tb[XFRMA_MARK]->rta_len);
> + (void *)RTA_DATA(tb[XFRMA_MARK]), RTA_PAYLOAD(tb[XFRMA_MARK]));
Why the cast to void * here? RTA_DATA() already is macro that returns void *
and if it was a similar pointer (like char *) then C would do implicit conversion.
next prev parent reply other threads:[~2026-11-25 0:53 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-24 6:01 [PATCH iproute2] ip xfrm: copy only the mark payload in deleteall Dave Seddon
2026-11-25 0:53 ` Stephen Hemminger [this message]
2026-11-25 2:15 ` dave seddon
2026-11-25 3:07 ` dave seddon
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=20261124165329.4dc7e4e7@phoenix.local \
--to=stephen@networkplumber.org \
--cc=dave.seddon.ca@gmail.com \
--cc=dsahern@kernel.org \
--cc=netdev@vger.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.